diff --git a/doc/conf.py b/doc/conf.py index bb3298ee4ddd1d33dffba7a084c2f40e7deb0756..744477df7cb004b048c200fc2002edbdee4eb992 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,81 +1,19 @@ -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' +import os +from urllib.request import urlopen -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.doctest", - "sphinx.ext.intersphinx", - "sphinx.ext.coverage", - "sphinx.ext.mathjax", - "sphinx.ext.viewcode", - "sphinx_copybutton", -] +_conf_url = \ + "https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py" +with urlopen(_conf_url) as _inf: + exec(compile(_inf.read(), _conf_url, "exec"), globals()) -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] +copyright = "2016-21, sumpy contributors" -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = ".rst" - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = "sumpy" -copyright = "2016, Andreas Kloeckner" -author = "Andreas Kloeckner" - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = "2016.1" -# The full version, including alpha/beta/rc tags. -release = "2016.1" - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -html_theme = "furo" +os.environ["AKPYTHON_EXEC_FROM_WITHIN_WITHIN_SETUP_PY"] = "1" +ver_dic = {} +exec(compile(open("../sumpy/version.py").read(), "../sumpy/version.py", "exec"), + ver_dic) +version = ".".join(str(x) for x in ver_dic["VERSION"]) +release = ver_dic["VERSION_TEXT"] intersphinx_mapping = { "https://docs.python.org/3/": None, @@ -89,5 +27,3 @@ intersphinx_mapping = { "https://docs.sympy.org/latest/": None, "https://matplotlib.org/": None, } - -autoclass_content = "class" diff --git a/doc/index.rst b/doc/index.rst index f0ad00740c610a41790142380d15600814dcc99f..66c36e9adf7218883555955bf4677224062fc005 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -3,11 +3,10 @@ Welcome to sumpy's documentation! .. automodule:: sumpy -Example -------- - -See :download:`example/curve-pot.py <../examples/curve-pot.py>` -for a usage example. +Sumpy is mainly a 'scaffolding' package for Fast Multipole and quadrature methods. +If you're building one of those and need code generation for the required Multipole +and local expansions, come right on in. Together with boxtree, there is a full, +symbolically kernel-independent FMM implementation here. Contents -------- @@ -31,3 +30,8 @@ Indices and tables * :ref:`modindex` * :ref:`search` +Example +------- + +.. literalinclude:: ../examples/curve-pot.py +