diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c1e64630..ac1a1c98 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -33,4 +33,4 @@ All upgrading should be done via the migration script or regenerating the templa ### Cookiecutter template - +- Fixed a compatibility issue in the macros doc script with `mkdocsstrings` 0.28. diff --git a/cookiecutter/{{cookiecutter.github_repo_name}}/docs/_scripts/macros.py b/cookiecutter/{{cookiecutter.github_repo_name}}/docs/_scripts/macros.py index 86777ebd..9afe325c 100644 --- a/cookiecutter/{{cookiecutter.github_repo_name}}/docs/_scripts/macros.py +++ b/cookiecutter/{{cookiecutter.github_repo_name}}/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml b/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml index ef45b2ec..4f95d637 100644 --- a/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml +++ b/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml @@ -99,8 +99,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[{{cookiecutter.type}}] == 0.11.0", ] dev-mypy = [ diff --git a/docs/_scripts/macros.py b/docs/_scripts/macros.py index 47c7111e..82d79d7d 100644 --- a/docs/_scripts/macros.py +++ b/docs/_scripts/macros.py @@ -75,8 +75,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/pyproject.toml b/pyproject.toml index 539bb9a9..456b3da2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Copyright © 2023 Frequenz Energy-as-a-Service GmbH [build-system] -requires = ["setuptools == 75.6.0", "setuptools_scm[toml] == 8.1.0"] +requires = ["setuptools == 75.8.0", "setuptools_scm[toml] == 8.1.0"] build-backend = "setuptools.build_meta" [project] @@ -69,8 +69,8 @@ extra-lint-examples = [ dev-flake8 = [ "flake8 == 7.1.1", "flake8-docstrings == 1.7.0", - "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml - "pydoclint == 0.5.14", + "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml + "pydoclint == 0.6.0", "pydocstyle == 6.3.0", ] dev-formatting = ["black == 24.10.0", "isort == 5.13.2"] @@ -81,13 +81,13 @@ dev-mkdocs = [ "mkdocs-gen-files == 0.5.0", "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", - "mkdocs-material == 9.5.49", - "mkdocstrings[python] == 0.27.0", + "mkdocs-material == 9.6.2", + "mkdocstrings[python] == 0.28.0", "mkdocstrings-python == 1.13.0", ] dev-mypy = [ "mypy == 1.14.1", - "types-setuptools >= 67.6.0, < 76", # Should match the build dependency + "types-setuptools >= 67.6.0, < 76", # Should match the build dependency "types-Markdown == 3.7.0.20241204", "types-PyYAML == 6.0.12.20241230", "types-babel == 2.11.0.15", @@ -100,14 +100,14 @@ dev-pylint = [ # dev-pytest already defines a dependency to pylint because of the examples # For checking the noxfile, docs/ script, and tests "frequenz-repo-config[dev-mkdocs,dev-noxfile,dev-pytest]", - "setuptools >= 67.6.0, < 76", # Should match the build dependency + "setuptools >= 67.6.0, < 76", # Should match the build dependency ] dev-pytest = [ "pytest == 8.3.4", - "pylint == 3.3.3", # We need this to check for the examples + "pylint == 3.3.4", # We need this to check for the examples "cookiecutter == 2.6.0", # For checking the cookiecutter scripts - "jinja2 == 3.1.5", # For checking the cookiecutter scripts - "sybil >= 6.1.1, < 10", # Should be consistent with the extra-lint-examples dependency + "jinja2 == 3.1.5", # For checking the cookiecutter scripts + "sybil >= 6.1.1, < 10", # Should be consistent with the extra-lint-examples dependency ] dev = [ "frequenz-repo-config[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]", diff --git a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/docs/_scripts/macros.py b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/docs/_scripts/macros.py index f84712e4..2ae42657 100644 --- a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/docs/_scripts/macros.py +++ b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml index 89fd49dc..336868e5 100644 --- a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml @@ -58,8 +58,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[actor] == 0.11.0", ] dev-mypy = [ diff --git a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/docs/_scripts/macros.py b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/docs/_scripts/macros.py index f84712e4..2ae42657 100644 --- a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/docs/_scripts/macros.py +++ b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml index b399b89f..577b2092 100644 --- a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml @@ -69,8 +69,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[api] == 0.11.0", ] dev-mypy = [ diff --git a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/docs/_scripts/macros.py b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/docs/_scripts/macros.py index f84712e4..2ae42657 100644 --- a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/docs/_scripts/macros.py +++ b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml index e0da856b..831d049a 100644 --- a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml @@ -57,8 +57,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[app] == 0.11.0", ] dev-mypy = [ diff --git a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/docs/_scripts/macros.py b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/docs/_scripts/macros.py index f84712e4..2ae42657 100644 --- a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/docs/_scripts/macros.py +++ b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml index e8e51aff..9dfacc94 100644 --- a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml @@ -54,8 +54,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[lib] == 0.11.0", ] dev-mypy = [ diff --git a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/docs/_scripts/macros.py b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/docs/_scripts/macros.py index f84712e4..2ae42657 100644 --- a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/docs/_scripts/macros.py +++ b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/docs/_scripts/macros.py @@ -47,8 +47,8 @@ def _hook_macros_plugin(env: macros.MacrosPlugin) -> None: update_env = python_handler.update_env # override the `update_env` method of the Python handler - def patched_update_env(markdown: md.Markdown, config: dict[str, Any]) -> None: - update_env(markdown, config) + def patched_update_env(md: md.Markdown, config: dict[str, Any]) -> None: + update_env(md=md, config=config) # get the `convert_markdown` filter of the env convert_markdown = python_handler.env.filters["convert_markdown"] diff --git a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml index 7fd4d4ef..3a5021d3 100644 --- a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml @@ -58,8 +58,8 @@ dev-mkdocs = [ "mkdocs-literate-nav == 0.6.1", "mkdocs-macros-plugin == 1.3.7", "mkdocs-material == 9.5.45", - "mkdocstrings[python] == 0.27.0", - "mkdocstrings-python == 1.12.2", + "mkdocstrings[python] == 0.28.0", + "mkdocstrings-python == 1.14.0", "frequenz-repo-config[model] == 0.11.0", ] dev-mypy = [