Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Jun 3, 2025

This updates the cookiecutter templates to ignore warnings by using the separate filterwarnings options instead of using command-line options.

This allows using regex, which is needed to add a new ignore for protobuf gencode version warnings, that includes the protobuf version, which will change dynamically.

Copilot AI review requested due to automatic review settings June 3, 2025 08:59
@llucax llucax requested a review from a team as a code owner June 3, 2025 08:59
@github-actions github-actions bot added the part:template Affects the cookiecutter template files label Jun 3, 2025
Copy link

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 improves pytest warning filtering by replacing command-line -W options with a dedicated filterwarnings configuration across multiple pyproject.toml files and updates the migration script accordingly.

  • Consolidates warning filters to use regular expressions for dynamic protobuf version warnings
  • Updates cookiecutter templates and a migration utility to support filterwarnings
  • Adjusts RELEASE_NOTES to document the change

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml Updated warning options to use filterwarnings
tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml Updated warning options to use filterwarnings
tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml Updated warning options to use filterwarnings
tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml Updated warning options to use filterwarnings
tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml Updated warning options to use filterwarnings
pyproject.toml Updated warning options to use filterwarnings
cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml Updated warning options to use filterwarnings
cookiecutter/migrate.py Added migration logic for converting -W flags to filterwarnings
RELEASE_NOTES.md Updated release notes to mention new warning ignore changes

@llucax llucax force-pushed the api-warnings branch 2 times, most recently from e85a9cd to ee270d7 Compare June 3, 2025 09:20
@llucax llucax self-assigned this Jun 3, 2025
@llucax llucax added the type:enhancement New feature or enhancement visitble to users 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 09:21
Copy link
Collaborator

@flora-hofmann-frequenz flora-hofmann-frequenz left a comment

Choose a reason for hiding this comment

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

LGTM

@llucax
Copy link
Contributor Author

llucax commented Jun 3, 2025

Thanks @flora-hofmann-frequenz, it looks you don't have power to approve so I still need another approval from @frequenz-floss/python-sdk-team.

@flora-hofmann-frequenz
Copy link
Collaborator

Thanks @flora-hofmann-frequenz, it looks you don't have power to approve so I still need another approval from @frequenz-floss/python-sdk-team.

Looks like I don't, sorry :-(

Copy link
Contributor

@daniel-zullo-frequenz daniel-zullo-frequenz left a comment

Choose a reason for hiding this comment

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

I have a few optional comments to check for, LGTM otherwise

@llucax llucax added this pull request to the merge queue Jun 3, 2025
@daniel-zullo-frequenz daniel-zullo-frequenz removed this pull request from the merge queue due to a manual request Jun 3, 2025
@daniel-zullo-frequenz
Copy link
Contributor

I remove it from the merging queue in case you'd like to address any of the comments

@daniel-zullo-frequenz
Copy link
Contributor

nitpick: there is also a typo in the commit message Update version for the migratio script in the release notes

@llucax
Copy link
Contributor Author

llucax commented Jun 3, 2025

Updated.

llucax added 2 commits June 3, 2025 13:55
This updates the cookiecutter templates to ignore warnings by using the
separate `filterwarnings` options instead of using command-line options.

This allows using regex, which is needed to add a new ignore for
protobuf gencode version warnings, that includes the protobuf version,
which will change dynamically.

Signed-off-by: Leandro Lucarella <[email protected]>
@llucax
Copy link
Contributor Author

llucax commented Jun 3, 2025

nitpick: there is also a typo in the commit message Update version for the migratio script in the release notes

Fixed too.

@llucax llucax added this pull request to the merge queue Jun 3, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 9406b99 Jun 3, 2025
5 checks passed
@llucax llucax deleted the api-warnings branch June 3, 2025 12:15
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:enhancement New feature or enhancement visitble to users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants