1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
Description: Fix for docs
Several fix for docs (a) remove datetime stamp for copyright to
prevent reprotest error, (b) replace external URLs in to local
paths, (c) remove and prevent conf.py attempt to various git repos
and aiida.
Forwarded: not-needed
Author: Yogeswaran Umasankar <yogu@debian.org>
Last-Update: 2024-08-14
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,13 +1,15 @@
"""The configuration for this packages documentation."""
-from datetime import date
-
+#from datetime import date
+import os
+import sys
+sys.path.insert(0, os.path.abspath("../src"))
from autodoc2 import __version__
# -- Project information -----------------------------------------------------
project = "sphinx-autodoc2"
version = __version__
-copyright = f"{date.today().year}, Chris Sewell"
+#copyright = f"{date.today().year}, Chris Sewell"
author = "Chris Sewell"
# -- General configuration ---------------------------------------------------
@@ -21,8 +23,8 @@ extensions = [
]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
intersphinx_mapping = {
- "python": ("https://docs.python.org/3/", None),
- "sphinx": ("https://www.sphinx-doc.org/en/master", None),
+ "python": ("/usr/share/doc/python3-doc/html", None),
+ "sphinx": ("/usr/share/doc/sphinx-doc/html", None),
}
myst_enable_extensions = ["fieldlist", "deflist"]
@@ -31,31 +33,9 @@ myst_enable_extensions = ["fieldlist", "
html_theme = "furo"
html_title = "sphinx-autodoc2"
# html_logo = "logo.svg"
-html_theme_options = {
- "top_of_page_button": "edit",
- "source_repository": "https://github.com/chrisjsewell/sphinx-autodoc2/",
- "source_branch": "main",
- "source_directory": "docs/",
- "announcement": "<em>Just released 🎉, feedback welcomed at "
- "<a href='https://github.com/chrisjsewell/sphinx-autodoc2/discussions'>sphinx-autodoc2</a></em>",
-}
# --- Autodoc configuration ------
-autodoc2_packages = [
- "../src/autodoc2",
- {
- "path": "aiida",
- "from_git_clone": (
- "https://github.com/aiidateam/aiida-core.git",
- "v2.2.2",
- ),
- "exclude_dirs": [
- "__pycache__",
- # "migrations",
- ],
- },
-]
autodoc2_render_plugin_regexes = [(r"autodoc2\.db", "myst")]
autodoc2_replace_annotations = [
("re.Pattern", "typing.Pattern"),
@@ -63,34 +43,8 @@ autodoc2_replace_annotations = [
autodoc2_docstring_parser_regexes = [
(r"autodoc2\.sphinx\.docstring\._example", "myst"),
]
-autodoc2_deprecated_module_regexes = [
- r"aiida\.parsers\.parser",
-]
-autodoc2_module_all_regexes = [r"aiida\.[^\.]+"]
-autodoc2_skip_module_regexes = [
- r"aiida\.[^\.]+\..*",
- r"aiida\.(__main__|calculations|restapi|sphinxext|storage|workflows)",
-]
# autodoc2_docstrings = "all"
-nitpick_ignore_regex = [
- (r"py:.*", r"typing_extensions.*"),
- (r"py:.*", r"astroid.*"),
- (r"py:.*", r"docutils.*"),
- # TODO for some reason in:
- # .. py:function:: format_args(args_info: autodoc2.utils.ARGS_TYPE ...
- # ARGS_TYPE is treated as a class rather than data
- ("py:class", r"autodoc2\.utils\..*_TYPE"),
- # from aiida
- (r"py:.*", r"types\.FunctionType"),
- (
- r"py:.*",
- r"(aiida|circus|click|disk_objectstore|importlib_metadata|kiwipy|plumpy|pgsu|requests).*",
- ),
- (r"py:.*", r"(DaemonException|Manager|PersistenceError)"),
- (r"py:.*", r"QueryBuilder\._get_ormclass"),
-]
-
# --- Additional configuration ----
import typing as t # noqa: E402
|