diff --git a/CHANGES b/CHANGES index d03be4c1..e4e42c57 100644 --- a/CHANGES +++ b/CHANGES @@ -11,7 +11,11 @@ ### Documentation -- Move CHANGES to sphinx-autoissues, #350 +- Render changelog in [`linkify_issues`] (~~#350~~, #355) +- Fix Table of contents rendering with sphinx autodoc with [`sphinx_toctree_autodoc_fix`] (#355) + +[`linkify_issues`]: https://gp-libs.git-pull.com/linkify_issues/ +[`sphinx_toctree_autodoc_fix`]: https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/ ## django-docutils 0.7.0 (2022-08-16) diff --git a/docs/api.md b/docs/api.md index ee2f2748..0b08aa1f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -27,8 +27,12 @@ ## Code block ```{eval-rst} -.. autoclass:: django_docutils.directives.CodeBlock :members: :inherited-members: :private-members: -:show-inheritance: :member-order: bysource +.. autoclass:: django_docutils.directives.CodeBlock + :members: + :inherited-members: + :private-members: + :show-inheritance: + :member-order: bysource ``` ## Exceptions diff --git a/docs/conf.py b/docs/conf.py index 7d666e4f..d2ab03f7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,15 +22,21 @@ "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", - "sphinx_autoissues", "sphinx_click.ext", # sphinx-click "sphinx_inline_tabs", "sphinx_copybutton", "sphinxext.opengraph", "sphinxext.rediraffe", "myst_parser", + "sphinx_toctree_autodoc_fix", + "linkify_issues", +] +myst_enable_extensions = [ + "colon_fence", + "substitution", + "replacements", + "strikethrough", ] -myst_enable_extensions = ["colon_fence", "substitution", "replacements"] templates_path = ["_templates"] @@ -83,9 +89,8 @@ ] } -# sphinx-autoissues -issuetracker = "github" -issuetracker_project = about["__github__"].replace("https://github.com/", "") +# linkify_issues +issue_url_tpl = "https://github.com/tony/django-docutils/issues/{issue_id}" # sphinxext.opengraph ogp_site_url = about["__docs__"] @@ -104,7 +109,6 @@ rediraffe_redirects = "redirects.txt" rediraffe_branch = "master~1" - htmlhelp_basename = "%sdoc" % about["__title__"] latex_documents = [ diff --git a/poetry.lock b/poetry.lock index 63e6c8e5..88f7b1fc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -367,6 +367,18 @@ pygments = "*" sphinx = ">=4.0,<6.0" sphinx-basic-ng = "*" +[[package]] +name = "gp-libs" +version = "0.0.1a9" +description = "Internal utilities for projects following git-pull python package spec" +category = "dev" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +docutils = ">=0.18.0,<0.19.0" +myst_parser = "*" + [[package]] name = "idna" version = "3.3" @@ -938,14 +950,6 @@ Sphinx = ">=5.1.1" testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "diff-cover (>=6.5.1)", "nptyping (>=2.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "sphobjinv (>=2.2.2)", "typing-extensions (>=4.3)"] type_comments = ["typed-ast (>=1.5.4)"] -[[package]] -name = "sphinx-autoissues" -version = "0.0.1" -description = "Sphinx integration with different issuetrackers" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" - [[package]] name = "sphinx-basic-ng" version = "0.0.1a12" @@ -1294,7 +1298,7 @@ test = [] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "c97033ad0878cdf00c4df23c9357f6e91dc8ee9433d9fb8ebde259b731aa2273" +content-hash = "71c89dc1b88e50ba9d763c22872e09bb0d24192c7ebd80c4d20dbf8173355c80" [metadata.files] alabaster = [ @@ -1491,6 +1495,10 @@ furo = [ {file = "furo-2022.6.21-py3-none-any.whl", hash = "sha256:061b68e323345e27fcba024cf33a1e77f3dfd8d9987410be822749a706e2add6"}, {file = "furo-2022.6.21.tar.gz", hash = "sha256:9aa983b7488a4601d13113884bfb7254502c8729942e073a0acb87a5512af223"}, ] +gp-libs = [ + {file = "gp-libs-0.0.1a9.tar.gz", hash = "sha256:835608ba29220c4d77e7e3f5a9ae27368ac1eb4b43f0cd1e6cdec9c27e9a9e3a"}, + {file = "gp_libs-0.0.1a9-py3-none-any.whl", hash = "sha256:2c055bd65f0880325a800775a2ee4c23dacc9eb8a56408fdb665a66da7d38ed3"}, +] idna = [ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, @@ -1823,10 +1831,6 @@ sphinx-autodoc-typehints = [ {file = "sphinx_autodoc_typehints-1.19.2-py3-none-any.whl", hash = "sha256:3d761de928d5a86901331133d6d4a2552afa2e798ebcfc0886791792aeb4dd9a"}, {file = "sphinx_autodoc_typehints-1.19.2.tar.gz", hash = "sha256:872fb2d7b3d794826c28e36edf6739e93549491447dcabeb07c58855e9f914de"}, ] -sphinx-autoissues = [ - {file = "sphinx-autoissues-0.0.1.tar.gz", hash = "sha256:a308fd914d700ff2aa2b4584c29975a030ede7171898130ec816eca7ec2c8ce8"}, - {file = "sphinx_autoissues-0.0.1-py3-none-any.whl", hash = "sha256:07503b774c3a64b97d2614fa409410316fbfeb87ba4553dbe3a7d2131b7453a0"}, -] sphinx-basic-ng = [ {file = "sphinx_basic_ng-0.0.1a12-py3-none-any.whl", hash = "sha256:e8b6efd2c5ece014156de76065eda01ddfca0fee465aa020b1e3c12f84570bbe"}, {file = "sphinx_basic_ng-0.0.1a12.tar.gz", hash = "sha256:cffffb14914ddd26c94b1330df1d72dab5a42e220aaeb5953076a40b9c50e801"}, diff --git a/pyproject.toml b/pyproject.toml index c53bf147..3832475d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,7 @@ bitly-api-py3 = "*" ### Docs ### sphinx = "*" furo = "*" +gp-libs = "*" sphinx-autobuild = "*" sphinx-autodoc-typehints = "*" sphinx-click = "*" @@ -64,7 +65,6 @@ sphinx-inline-tabs = "*" sphinxext-opengraph = "*" sphinx-copybutton = "*" sphinxext-rediraffe = "*" -sphinx-autoissues = "*" myst_parser = "*" ### Testing ### @@ -114,9 +114,9 @@ docs = [ "sphinx-copybutton", "sphinxext-opengraph", "sphinx-inline-tabs", - "sphinx-autoissues", "myst_parser", "furo", + "gp-libs", ] test = [ "pytest", @@ -137,11 +137,11 @@ lint = [ "mypy", "django-stubs", "types-docutils", - "types-pygments", + "types-pygments", "types-six", "types-requests", "types-tqdm", - "lxml-stubs" + "lxml-stubs", ] [tool.mypy] @@ -160,7 +160,7 @@ module = [ "dirtyfields.*", "django_extensions.*", "django_slugify_processor.*", - "django_docutils.*" + "django_docutils.*", ] ignore_missing_imports = true