From 23c9023780535251778077cd7d957c0067ecb0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 1 Feb 2022 21:39:31 +0100 Subject: [PATCH 1/2] refactor: Use the new `mkdocstrings_handlers` namespace --- mkdocs.yml | 2 +- pyproject.toml | 2 +- scripts/fixsetup.sh | 1 - src/{mkdocstrings => mkdocstrings_handlers}/py.typed | 0 .../handlers => mkdocstrings_handlers}/python/__init__.py | 4 ++-- .../handlers => mkdocstrings_handlers}/python/collector.py | 0 .../handlers => mkdocstrings_handlers}/python/renderer.py | 2 +- .../python/templates}/material/_base/attribute.html | 0 .../python/templates}/material/_base/children.html | 0 .../python/templates}/material/_base/class.html | 0 .../python/templates}/material/_base/docstring.html | 0 .../templates/material/_base/docstring/admonition.html | 5 +++++ .../templates}/material/_base/docstring/attributes.html | 0 .../python/templates}/material/_base/docstring/examples.html | 0 .../material/_base/docstring/other_parameters.html | 0 .../templates}/material/_base/docstring/parameters.html | 0 .../python/templates}/material/_base/docstring/raises.html | 0 .../python/templates}/material/_base/docstring/receives.html | 0 .../python/templates}/material/_base/docstring/returns.html | 0 .../python/templates}/material/_base/docstring/warns.html | 0 .../python/templates}/material/_base/docstring/yields.html | 0 .../python/templates}/material/_base/expression.html | 0 .../python/templates}/material/_base/function.html | 0 .../python/templates}/material/_base/labels.html | 0 .../python/templates}/material/_base/module.html | 0 .../python/templates}/material/_base/signature.html | 0 .../python/templates}/material/attribute.html | 0 .../python/templates}/material/children.html | 0 .../python/templates}/material/class.html | 0 .../python/templates}/material/docstring.html | 0 .../python/templates}/material/docstring/attributes.html | 0 .../python/templates}/material/docstring/examples.html | 0 .../templates}/material/docstring/other_parameters.html | 0 .../python/templates}/material/docstring/parameters.html | 0 .../python/templates}/material/docstring/raises.html | 0 .../python/templates}/material/docstring/receives.html | 0 .../python/templates}/material/docstring/returns.html | 0 .../python/templates}/material/docstring/warns.html | 0 .../python/templates}/material/docstring/yields.html | 0 .../python/templates}/material/expression.html | 0 .../python/templates}/material/function.html | 0 .../python/templates}/material/labels.html | 0 .../python/templates}/material/module.html | 0 .../python/templates}/material/signature.html | 0 .../python/templates}/material/style.css | 0 .../python/templates}/mkdocs/exceptions.html | 0 .../python/templates}/mkdocs/keyword_args.html | 0 .../python/templates}/mkdocs/parameters.html | 0 .../python/templates}/mkdocs/return.html | 0 .../python/templates}/mkdocs/style.css | 0 .../python/templates}/mkdocs/yield.html | 0 .../python/templates}/readthedocs/exceptions.html | 0 .../python/templates}/readthedocs/other_parameters.html | 0 .../python/templates}/readthedocs/parameters.html | 0 .../python/templates}/readthedocs/returns.html | 0 .../python/templates}/readthedocs/style.css | 0 .../python/templates}/readthedocs/yields.html | 0 tests/test_collector.py | 2 +- tests/test_themes.py | 2 +- 59 files changed, 12 insertions(+), 8 deletions(-) rename src/{mkdocstrings => mkdocstrings_handlers}/py.typed (100%) rename src/{mkdocstrings/handlers => mkdocstrings_handlers}/python/__init__.py (94%) rename src/{mkdocstrings/handlers => mkdocstrings_handlers}/python/collector.py (100%) rename src/{mkdocstrings/handlers => mkdocstrings_handlers}/python/renderer.py (99%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/attribute.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/children.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/class.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring.html (100%) create mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/attributes.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/examples.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/other_parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/raises.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/receives.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/returns.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/warns.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/docstring/yields.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/expression.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/function.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/labels.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/module.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/_base/signature.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/attribute.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/children.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/class.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/attributes.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/examples.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/other_parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/raises.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/receives.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/returns.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/warns.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/docstring/yields.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/expression.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/function.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/labels.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/module.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/signature.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/material/style.css (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/exceptions.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/keyword_args.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/return.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/style.css (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/mkdocs/yield.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/exceptions.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/other_parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/parameters.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/returns.html (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/style.css (100%) rename src/{mkdocstrings/templates/python => mkdocstrings_handlers/python/templates}/readthedocs/yields.html (100%) diff --git a/mkdocs.yml b/mkdocs.yml index 9be7c230..8aaa1c22 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -73,7 +73,7 @@ plugins: import: - https://mkdocstrings.github.io/objects.inv watch: - - src/mkdocstrings + - src/mkdocstrings_handlers extra: social: diff --git a/pyproject.toml b/pyproject.toml index 712b079c..faaa9c33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ Funding = "https://github.com/sponsors/mkdocstrings" [tool.pdm] version = {use_scm = true} -includes = ["src/mkdocstrings"] +includes = ["src/mkdocstrings_handlers"] [tool.pdm.dev-dependencies] duty = ["duty>=0.7"] diff --git a/scripts/fixsetup.sh b/scripts/fixsetup.sh index 368474f1..94b63559 100755 --- a/scripts/fixsetup.sh +++ b/scripts/fixsetup.sh @@ -7,5 +7,4 @@ for python_version in ${PYTHON_VERSIONS}; do rm -rf "__pypackages__/${python_version}/lib/mkdocstrings" rm -f "__pypackages__/${python_version}/lib/mkdocstrings.pth" cp -r ../mkdocstrings/src/mkdocstrings "__pypackages__/${python_version}/lib/" - cp -r src/mkdocstrings/* "__pypackages__/${python_version}/lib/mkdocstrings" done diff --git a/src/mkdocstrings/py.typed b/src/mkdocstrings_handlers/py.typed similarity index 100% rename from src/mkdocstrings/py.typed rename to src/mkdocstrings_handlers/py.typed diff --git a/src/mkdocstrings/handlers/python/__init__.py b/src/mkdocstrings_handlers/python/__init__.py similarity index 94% rename from src/mkdocstrings/handlers/python/__init__.py rename to src/mkdocstrings_handlers/python/__init__.py index fbcd5ade..b61f4c5e 100644 --- a/src/mkdocstrings/handlers/python/__init__.py +++ b/src/mkdocstrings_handlers/python/__init__.py @@ -6,10 +6,10 @@ from griffe.logger import patch_loggers from mkdocstrings.handlers.base import BaseHandler -from mkdocstrings.handlers.python.collector import PythonCollector -from mkdocstrings.handlers.python.renderer import PythonRenderer from mkdocstrings.inventory import Inventory from mkdocstrings.loggers import get_logger +from mkdocstrings_handlers.python.collector import PythonCollector +from mkdocstrings_handlers.python.renderer import PythonRenderer patch_loggers(get_logger) diff --git a/src/mkdocstrings/handlers/python/collector.py b/src/mkdocstrings_handlers/python/collector.py similarity index 100% rename from src/mkdocstrings/handlers/python/collector.py rename to src/mkdocstrings_handlers/python/collector.py diff --git a/src/mkdocstrings/handlers/python/renderer.py b/src/mkdocstrings_handlers/python/renderer.py similarity index 99% rename from src/mkdocstrings/handlers/python/renderer.py rename to src/mkdocstrings_handlers/python/renderer.py index 68cb9d20..fcbf91e3 100644 --- a/src/mkdocstrings/handlers/python/renderer.py +++ b/src/mkdocstrings_handlers/python/renderer.py @@ -54,7 +54,7 @@ class PythonRenderer(BaseRenderer): Attributes: fallback_theme: The theme to fallback to. default_config: The default rendering options, - see [`default_config`][mkdocstrings.handlers.python.PythonRenderer.default_config]. + see [`default_config`][mkdocstrings_handlers.python.PythonRenderer.default_config]. """ fallback_theme = "material" diff --git a/src/mkdocstrings/templates/python/material/_base/attribute.html b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/attribute.html rename to src/mkdocstrings_handlers/python/templates/material/_base/attribute.html diff --git a/src/mkdocstrings/templates/python/material/_base/children.html b/src/mkdocstrings_handlers/python/templates/material/_base/children.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/children.html rename to src/mkdocstrings_handlers/python/templates/material/_base/children.html diff --git a/src/mkdocstrings/templates/python/material/_base/class.html b/src/mkdocstrings_handlers/python/templates/material/_base/class.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/class.html rename to src/mkdocstrings_handlers/python/templates/material/_base/class.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring.html diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html new file mode 100644 index 00000000..13bac623 --- /dev/null +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html @@ -0,0 +1,5 @@ +{{ log.debug() }} +
+ {{ section.title|convert_markdown(heading_level, html_id)|strip_p }} + {{ section.value.contents|convert_markdown(heading_level, html_id) }} +
\ No newline at end of file diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/attributes.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/attributes.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/examples.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/examples.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/other_parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/other_parameters.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/parameters.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/raises.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/raises.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/receives.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/returns.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/warns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/warns.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html diff --git a/src/mkdocstrings/templates/python/material/_base/docstring/yields.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/docstring/yields.html rename to src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html diff --git a/src/mkdocstrings/templates/python/material/_base/expression.html b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/expression.html rename to src/mkdocstrings_handlers/python/templates/material/_base/expression.html diff --git a/src/mkdocstrings/templates/python/material/_base/function.html b/src/mkdocstrings_handlers/python/templates/material/_base/function.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/function.html rename to src/mkdocstrings_handlers/python/templates/material/_base/function.html diff --git a/src/mkdocstrings/templates/python/material/_base/labels.html b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/labels.html rename to src/mkdocstrings_handlers/python/templates/material/_base/labels.html diff --git a/src/mkdocstrings/templates/python/material/_base/module.html b/src/mkdocstrings_handlers/python/templates/material/_base/module.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/module.html rename to src/mkdocstrings_handlers/python/templates/material/_base/module.html diff --git a/src/mkdocstrings/templates/python/material/_base/signature.html b/src/mkdocstrings_handlers/python/templates/material/_base/signature.html similarity index 100% rename from src/mkdocstrings/templates/python/material/_base/signature.html rename to src/mkdocstrings_handlers/python/templates/material/_base/signature.html diff --git a/src/mkdocstrings/templates/python/material/attribute.html b/src/mkdocstrings_handlers/python/templates/material/attribute.html similarity index 100% rename from src/mkdocstrings/templates/python/material/attribute.html rename to src/mkdocstrings_handlers/python/templates/material/attribute.html diff --git a/src/mkdocstrings/templates/python/material/children.html b/src/mkdocstrings_handlers/python/templates/material/children.html similarity index 100% rename from src/mkdocstrings/templates/python/material/children.html rename to src/mkdocstrings_handlers/python/templates/material/children.html diff --git a/src/mkdocstrings/templates/python/material/class.html b/src/mkdocstrings_handlers/python/templates/material/class.html similarity index 100% rename from src/mkdocstrings/templates/python/material/class.html rename to src/mkdocstrings_handlers/python/templates/material/class.html diff --git a/src/mkdocstrings/templates/python/material/docstring.html b/src/mkdocstrings_handlers/python/templates/material/docstring.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring.html rename to src/mkdocstrings_handlers/python/templates/material/docstring.html diff --git a/src/mkdocstrings/templates/python/material/docstring/attributes.html b/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/attributes.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html diff --git a/src/mkdocstrings/templates/python/material/docstring/examples.html b/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/examples.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/examples.html diff --git a/src/mkdocstrings/templates/python/material/docstring/other_parameters.html b/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/other_parameters.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html diff --git a/src/mkdocstrings/templates/python/material/docstring/parameters.html b/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/parameters.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html diff --git a/src/mkdocstrings/templates/python/material/docstring/raises.html b/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/raises.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/raises.html diff --git a/src/mkdocstrings/templates/python/material/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/receives.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/receives.html diff --git a/src/mkdocstrings/templates/python/material/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/returns.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/returns.html diff --git a/src/mkdocstrings/templates/python/material/docstring/warns.html b/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/warns.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/warns.html diff --git a/src/mkdocstrings/templates/python/material/docstring/yields.html b/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html similarity index 100% rename from src/mkdocstrings/templates/python/material/docstring/yields.html rename to src/mkdocstrings_handlers/python/templates/material/docstring/yields.html diff --git a/src/mkdocstrings/templates/python/material/expression.html b/src/mkdocstrings_handlers/python/templates/material/expression.html similarity index 100% rename from src/mkdocstrings/templates/python/material/expression.html rename to src/mkdocstrings_handlers/python/templates/material/expression.html diff --git a/src/mkdocstrings/templates/python/material/function.html b/src/mkdocstrings_handlers/python/templates/material/function.html similarity index 100% rename from src/mkdocstrings/templates/python/material/function.html rename to src/mkdocstrings_handlers/python/templates/material/function.html diff --git a/src/mkdocstrings/templates/python/material/labels.html b/src/mkdocstrings_handlers/python/templates/material/labels.html similarity index 100% rename from src/mkdocstrings/templates/python/material/labels.html rename to src/mkdocstrings_handlers/python/templates/material/labels.html diff --git a/src/mkdocstrings/templates/python/material/module.html b/src/mkdocstrings_handlers/python/templates/material/module.html similarity index 100% rename from src/mkdocstrings/templates/python/material/module.html rename to src/mkdocstrings_handlers/python/templates/material/module.html diff --git a/src/mkdocstrings/templates/python/material/signature.html b/src/mkdocstrings_handlers/python/templates/material/signature.html similarity index 100% rename from src/mkdocstrings/templates/python/material/signature.html rename to src/mkdocstrings_handlers/python/templates/material/signature.html diff --git a/src/mkdocstrings/templates/python/material/style.css b/src/mkdocstrings_handlers/python/templates/material/style.css similarity index 100% rename from src/mkdocstrings/templates/python/material/style.css rename to src/mkdocstrings_handlers/python/templates/material/style.css diff --git a/src/mkdocstrings/templates/python/mkdocs/exceptions.html b/src/mkdocstrings_handlers/python/templates/mkdocs/exceptions.html similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/exceptions.html rename to src/mkdocstrings_handlers/python/templates/mkdocs/exceptions.html diff --git a/src/mkdocstrings/templates/python/mkdocs/keyword_args.html b/src/mkdocstrings_handlers/python/templates/mkdocs/keyword_args.html similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/keyword_args.html rename to src/mkdocstrings_handlers/python/templates/mkdocs/keyword_args.html diff --git a/src/mkdocstrings/templates/python/mkdocs/parameters.html b/src/mkdocstrings_handlers/python/templates/mkdocs/parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/parameters.html rename to src/mkdocstrings_handlers/python/templates/mkdocs/parameters.html diff --git a/src/mkdocstrings/templates/python/mkdocs/return.html b/src/mkdocstrings_handlers/python/templates/mkdocs/return.html similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/return.html rename to src/mkdocstrings_handlers/python/templates/mkdocs/return.html diff --git a/src/mkdocstrings/templates/python/mkdocs/style.css b/src/mkdocstrings_handlers/python/templates/mkdocs/style.css similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/style.css rename to src/mkdocstrings_handlers/python/templates/mkdocs/style.css diff --git a/src/mkdocstrings/templates/python/mkdocs/yield.html b/src/mkdocstrings_handlers/python/templates/mkdocs/yield.html similarity index 100% rename from src/mkdocstrings/templates/python/mkdocs/yield.html rename to src/mkdocstrings_handlers/python/templates/mkdocs/yield.html diff --git a/src/mkdocstrings/templates/python/readthedocs/exceptions.html b/src/mkdocstrings_handlers/python/templates/readthedocs/exceptions.html similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/exceptions.html rename to src/mkdocstrings_handlers/python/templates/readthedocs/exceptions.html diff --git a/src/mkdocstrings/templates/python/readthedocs/other_parameters.html b/src/mkdocstrings_handlers/python/templates/readthedocs/other_parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/other_parameters.html rename to src/mkdocstrings_handlers/python/templates/readthedocs/other_parameters.html diff --git a/src/mkdocstrings/templates/python/readthedocs/parameters.html b/src/mkdocstrings_handlers/python/templates/readthedocs/parameters.html similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/parameters.html rename to src/mkdocstrings_handlers/python/templates/readthedocs/parameters.html diff --git a/src/mkdocstrings/templates/python/readthedocs/returns.html b/src/mkdocstrings_handlers/python/templates/readthedocs/returns.html similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/returns.html rename to src/mkdocstrings_handlers/python/templates/readthedocs/returns.html diff --git a/src/mkdocstrings/templates/python/readthedocs/style.css b/src/mkdocstrings_handlers/python/templates/readthedocs/style.css similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/style.css rename to src/mkdocstrings_handlers/python/templates/readthedocs/style.css diff --git a/src/mkdocstrings/templates/python/readthedocs/yields.html b/src/mkdocstrings_handlers/python/templates/readthedocs/yields.html similarity index 100% rename from src/mkdocstrings/templates/python/readthedocs/yields.html rename to src/mkdocstrings_handlers/python/templates/readthedocs/yields.html diff --git a/tests/test_collector.py b/tests/test_collector.py index 23513436..3f56437b 100644 --- a/tests/test_collector.py +++ b/tests/test_collector.py @@ -2,7 +2,7 @@ import pytest -from mkdocstrings.handlers.python.collector import CollectionError, PythonCollector +from mkdocstrings_handlers.python.collector import CollectionError, PythonCollector def test_collect_missing_module(): diff --git a/tests/test_themes.py b/tests/test_themes.py index 779e4433..44426fb6 100644 --- a/tests/test_themes.py +++ b/tests/test_themes.py @@ -22,8 +22,8 @@ "mkdocstrings.loggers", "mkdocstrings.plugin", "mkdocstrings.handlers.base", - "mkdocstrings.handlers.python", "mkdocstrings.handlers.rendering", + "mkdocstrings_handlers.python", ], ) @pytest.mark.skipif(sys.version_info < (3, 7), reason="material is not installed on Python 3.6") From 83cf39ac00b6e02154849234bb094e8086caa43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 1 Feb 2022 21:40:16 +0100 Subject: [PATCH 2/2] chore: Prepare release 0.4.0 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cb9926c..58af7589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.4.0](https://github.com/mkdocstrings/python/releases/tag/0.4.0) - 2022-02-01 + +[Compare with 0.3.0](https://github.com/mkdocstrings/python/compare/0.3.0...0.4.0) + +### Code Refactoring +- Use the new `mkdocstrings_handlers` namespace ([23c9023](https://github.com/mkdocstrings/python/commit/23c9023780535251778077cd7d957c0067ecb0dc) by Timothée Mazzucotelli). + + ## [0.3.0](https://github.com/mkdocstrings/python/releases/tag/0.3.0) - 2022-01-14 [Compare with 0.2.0](https://github.com/mkdocstrings/python/compare/0.2.0...0.3.0)