Skip to content

Conversation

llucax
Copy link
Contributor

@llucax llucax commented Jun 3, 2025

  • Updated the deprecated import config key to inventories
  • Fix wrongly located paths key in mkdocs.yml

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 11:28
@llucax llucax requested a review from a team as a code owner June 3, 2025 11:28
@llucax llucax requested a review from shsms June 3, 2025 11:28
@llucax llucax self-assigned this Jun 3, 2025
@github-actions github-actions bot added the part:template Affects the cookiecutter template files label Jun 3, 2025
@llucax llucax added this to the v0.14.0 milestone Jun 3, 2025
@llucax llucax enabled auto-merge June 3, 2025 11:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: to inventories: in all mkdocs.yml files
  • Move paths: out of the options: block directly under the python: handler
  • Add a migration helper in cookiecutter/migrate.py and 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 importinventories and adjust paths location
tests_golden/integration/.../lib/frequenz-test-python/mkdocs.yml Rename importinventories and adjust paths location
tests_golden/integration/.../app/frequenz-app-test/mkdocs.yml Rename importinventories and adjust paths location
tests_golden/integration/.../api/frequenz-api-test/mkdocs.yml Rename importinventories and adjust paths location
tests_golden/integration/.../actor/frequenz-actor-test/mkdocs.yml Rename importinventories and adjust paths location
mkdocs.yml Rename importinventories and adjust paths location
cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml Rename importinventories and adjust templated paths
cookiecutter/migrate.py Add migrate_mkdocs_yaml to move paths and rename keys
RELEASE_NOTES.md Document importinventories 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 the paths: 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:"):

@llucax llucax force-pushed the mkdocs-fixes branch 3 times, most recently from 2e06695 to 213e42a Compare June 3, 2025 11:43
@llucax llucax added the type:bug Something isn't working label Jun 3, 2025
@llucax llucax requested a review from Marenz June 6, 2025 09:35
@llucax llucax changed the title Fix a mkdocsstrings config Fix mkdocsstrings config Jun 10, 2025
@llucax llucax added this pull request to the merge queue Jun 16, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 35bbd3f Jun 16, 2025
5 checks passed
@llucax llucax deleted the mkdocs-fixes branch June 16, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:template Affects the cookiecutter template files type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants