Skip to content

Commit

Permalink
Update Sphinx configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 4, 2021
1 parent 93fc63b commit 6c7397a
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 85 deletions.
93 changes: 8 additions & 85 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,89 +12,12 @@

sys.path.append('.')

config = SphinxConfig()

github_username = "repo-helper"
github_repository = "mkrecipe"
author = "Dominic Davis-Foster"
project = "mkrecipe"
copyright = "2020-2021 Dominic Davis-Foster"
language = "en"
package_root = "mkrecipe"
extensions = [
"sphinx_toolbox",
"sphinx_toolbox.more_autodoc",
"sphinx_toolbox.more_autosummary",
"sphinx_toolbox.documentation_summary",
"sphinx_toolbox.tweaks.param_dash",
"sphinx_toolbox.tweaks.latex_toc",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinxcontrib.httpdomain",
"sphinxcontrib.extras_require",
"sphinx.ext.todo",
"sphinxemoji.sphinxemoji",
"notfound.extension",
"sphinx_copybutton",
"sphinxcontrib.default_values",
"sphinxcontrib.toctree_plus",
"sphinx_debuginfo",
"seed_intersphinx_mapping",
"sphinx_click",
"configconfig.autoconfig",
"html_section",
]
sphinxemoji_style = "twemoji"
gitstamp_fmt = "%d %b %Y"
templates_path = ["_templates"]
html_static_path = ["_static"]
source_suffix = ".rst"
master_doc = "index"
suppress_warnings = ["image.nonlocal_uri"]
pygments_style = "default"
html_theme = "furo"
html_theme_path = ["../.."]
html_show_sourcelink = True
toctree_plus_types = [
"class",
"confval",
"data",
"directive",
"enum",
"exception",
"flag",
"function",
"method",
"namedtuple",
"protocol",
"role",
"typeddict",
]
add_module_names = False
hide_none_rtype = True
all_typevars = True
overloads_location = "bottom"
documentation_summary = "A tool to create recipes for building conda packages from distributions on PyPI."
autodoc_exclude_members = [
"__dict__",
"__class__",
"__dir__",
"__weakref__",
"__module__",
"__annotations__",
"__orig_bases__",
"__parameters__",
"__subclasshook__",
"__init_subclass__",
"__attrs_attrs__",
"__init__",
"__new__",
"__getnewargs__",
"__abstractmethods__",
"__hash__",
]

github_url = f"https://github.com/{github_username}/{github_repository}"
config = SphinxConfig(globalns=globals())
project = config["project"]
author = config["author"]
documentation_summary = config.description

github_url = "https://github.com/{github_username}/{github_repository}".format_map(config)

rst_prolog = f""".. |pkgname| replace:: mkrecipe
.. |pkgname2| replace:: ``mkrecipe``
Expand Down Expand Up @@ -131,14 +54,14 @@
man_pages = [("index", slug, project, [author], 1)]
texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")]

toctree_plus_types = set(toctree_plus_types)
toctree_plus_types = set(config["toctree_plus_types"])

autodoc_default_options = {
"members": None, # Include all members (methods).
"special-members": None,
"autosummary": None,
"show-inheritance": None,
"exclude-members": ','.join(autodoc_exclude_members),
"exclude-members": ','.join(config["autodoc_exclude_members"]),
}

nitpicky = True
80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,83 @@ python-implementations = [ "CPython", "PyPy",]
platforms = [ "Windows", "macOS", "Linux",]
license-key = "MIT"
additional-files = [ "include mkrecipe/recipe_template.ymlt",]

[tool.sphinx-pyproject]
github_username = "repo-helper"
github_repository = "mkrecipe"
author = "Dominic Davis-Foster"
project = "mkrecipe"
copyright = "2020-2021 Dominic Davis-Foster"
language = "en"
package_root = "mkrecipe"
extensions = [
"sphinx_toolbox",
"sphinx_toolbox.more_autodoc",
"sphinx_toolbox.more_autosummary",
"sphinx_toolbox.documentation_summary",
"sphinx_toolbox.tweaks.param_dash",
"sphinx_toolbox.tweaks.latex_toc",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinxcontrib.httpdomain",
"sphinxcontrib.extras_require",
"sphinx.ext.todo",
"sphinxemoji.sphinxemoji",
"notfound.extension",
"sphinx_copybutton",
"sphinxcontrib.default_values",
"sphinxcontrib.toctree_plus",
"sphinx_debuginfo",
"seed_intersphinx_mapping",
"sphinx_click",
"configconfig.autoconfig",
"html_section",
]
sphinxemoji_style = "twemoji"
gitstamp_fmt = "%d %b %Y"
templates_path = [ "_templates",]
html_static_path = [ "_static",]
source_suffix = ".rst"
master_doc = "index"
suppress_warnings = [ "image.nonlocal_uri",]
pygments_style = "default"
html_theme = "furo"
html_theme_path = [ "../..",]
html_show_sourcelink = true
toctree_plus_types = [
"class",
"confval",
"data",
"directive",
"enum",
"exception",
"flag",
"function",
"method",
"namedtuple",
"protocol",
"role",
"typeddict",
]
add_module_names = false
hide_none_rtype = true
all_typevars = true
overloads_location = "bottom"
autodoc_exclude_members = [
"__dict__",
"__class__",
"__dir__",
"__weakref__",
"__module__",
"__annotations__",
"__orig_bases__",
"__parameters__",
"__subclasshook__",
"__init_subclass__",
"__attrs_attrs__",
"__init__",
"__new__",
"__getnewargs__",
"__abstractmethods__",
"__hash__",
]

0 comments on commit 6c7397a

Please sign in to comment.