Fix mkdocsstrings config#412
Merged
llucax merged 2 commits intofrequenz-floss:v0.x.xfrom Jun 16, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the mkdocstrings configuration in generated and template docs by renaming the deprecated import key to inventories and relocating the paths setting to the correct indentation under the python handler.
- Rename
import:toinventories:in all mkdocs.yml files - Move
paths:out of theoptions:block directly under thepython:handler - Add a migration helper in
cookiecutter/migrate.pyand update release notes
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests_golden/integration/.../model/frequenz-model-test/mkdocs.yml | Rename import → inventories and adjust paths location |
| tests_golden/integration/.../lib/frequenz-test-python/mkdocs.yml | Rename import → inventories and adjust paths location |
| tests_golden/integration/.../app/frequenz-app-test/mkdocs.yml | Rename import → inventories and adjust paths location |
| tests_golden/integration/.../api/frequenz-api-test/mkdocs.yml | Rename import → inventories and adjust paths location |
| tests_golden/integration/.../actor/frequenz-actor-test/mkdocs.yml | Rename import → inventories and adjust paths location |
| mkdocs.yml | Rename import → inventories and adjust paths location |
| cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml | Rename import → inventories and adjust templated paths |
| cookiecutter/migrate.py | Add migrate_mkdocs_yaml to move paths and rename keys |
| RELEASE_NOTES.md | Document import→inventories change and fix relocation note |
Comments suppressed due to low confidence (2)
cookiecutter/migrate.py:53
- The docstring claims it removes the old
options:line, but the code only removes thepaths:line. Update the docstring (or code) to accurately reflect the actual behavior.
rewrite the file in place to move `paths` directly under `python:` and remove the old `options:` and its `paths:` line.
cookiecutter/migrate.py:71
- [nitpick] This logic relies on hardcoded spaces for indentation, which is brittle. Consider parsing YAML or deriving indentation levels dynamically for more robust migrations.
if line.startswith(" python:"):
2e06695 to
213e42a
Compare
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Marenz
approved these changes
Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
importconfig key toinventoriespathskey in mkdocs.yml