Skip to content

Releases: frequenz-floss/frequenz-repo-config-python

v0.12.3

27 Feb 11:06
v0.12.3
3fc1a3b
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Enhancements

  • Add tips for Mac users in the upgrading section of the documentation.
  • Add a final note letting the user know the script run finished in the migration script.

Bug Fixes

Cookiecutter template

  • Fixed an outdated link to instructions on how to continue when the cookiecutter template generation finishes.

What's Changed

  • Clear release notes by @llucax in #356
  • Update link in cookiecutter end instructions by @llucax in #360
  • Add notes to the upgrading section and a comment that the script finished by @TalweSingh in #358

New Contributors

Full Changelog: v0.12.2...v0.12.3

v0.12.2

11 Feb 13:30
v0.12.2
0704c59
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Bug Fixes

  • Update dependencies for templates and docs to the latest patch version.

What's Changed

  • Update the dependency to the latest patch version by @llucax in #355

Full Changelog: v0.12.1...v0.12.2

v0.12.1

11 Feb 12:44
v0.12.1
862eb5b
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Upgrading

Even if this is a patch release, it will require a dependency bump for mkdocstrings-python to v1.14.6 or newer, but since these are only dev dependencies and things will break if you update the dependencies anyway, it seems like a reasonable trade-off.

Bug Fixes

  • The new mkdocstrings-macros pluglet didn't work with the latest mkdocstrings-python version.

What's Changed

  • Fix the mkdocstrings-macros pluglet by @llucax in #352

Full Changelog: v0.12.0...v0.12.1

v0.12.0

10 Feb 14:06
v0.12.0
7d21f0b
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Summary

This release introduces a new MkDocs macros pluglet system that simplifies documentation setup and provides enhanced functionality for version information and code annotations. It also includes changes to how pytest warnings are handled in templates.

Upgrading

  • The nox default pytest session doesn't pass -W=all -vv to pytest anymore. You can use the pyproject.toml file to configure default options for pytest, for example:

    [tool.pytest.ini_options]
    addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv"

Cookiecutter template

All upgrading should be done via the migration script or regenerating the templates.

curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.12.0/cookiecutter/migrate.py | python3

But you might still need to adapt your code:

  • pytest now uses -Werror by default (but still treat deprecations as normal warnings), so if your tests run with warnings, they will now be turned to errors, and you'll need to fix them.

  • Projects using docs/_scripts/macros.py with customized scripts can use the new provided utility functions. See the mkdocstrings_macros documentation for the new features and setup.

New Features

  • Two new modules were introduced to facilitate the configuration of macros for use within docstrings via mkdocstrings: mkdocstrings_macros and annotations.

Cookiecutter template

  • pytest now uses -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning by default. Deprecations are still treated as warnings, as when testing with the pytest_min session is normal to get deprecation warnings as we are using old versions of dependencies.

Bug Fixes

Cookiecutter template

  • Fixed a compatibility issue in the macros doc script with mkdocsstrings 0.28.

What's Changed

Full Changelog: v0.11.0...v0.12.0

v0.11.0

21 Nov 09:16
v0.11.0
fea7837
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Summary

This version accumulates a few improvements, and bumps the dependency of setuptools to use v75, which is compatible with PEP625, which is necessary to be able to keep uploading to PyPI, so you should upgrade to this version as soon as possible.

The migration script was also rewritten in Python, so it should be more compatible with different OSes.

Upgrading

  • The frequenz.repo.config.github.abort() function now takes most arguments as keyword-only arguments.
  • The Queue PRs for v0.x.x GitHub ruleset was renamed to Queue PRs for the default branch and now targets the default branch. It also only have the merge queue restriction, all other restrictions were removed as they are already present in the Protect version branches ruleset. You might want to re-import this ruleset to your repositories.

Cookiecutter template

  • Run the migration script to incorporate the changes to the cookiecutter templates for this release.

  • API projects don't include the google-common-protos dependency by default, if you need that dependency you need to update your configuration in pyproject.toml:

    [tool.frequenz-repo-config.protobuf]
    include_paths = ["submodules/api-common-protos", "submodules/frequenz-api-common/proto"]

    (you need to adapt the list of include path to all the submodules you are including in your API)

New Features

  • Added a new GitHub branch ruleset for Rust projects.

Cookiecutter template

  • Group GitHub Actions dependabot updates.
  • API projects don't include the google-common-protos dependency by default.
  • API projects updated the grpcio dependency to 1.66.1.
  • API projects updated the frequenz-api-common dependency to 0.6.
  • Bump most of the dependencies.
  • Change edit_uri default branch to v0.x.x in mkdocs.yml.
  • Added a new default option asyncio_default_fixture_loop_scope = "function" for pytest-asyncio as not providing a value is deprecated.
  • The migration script is now written in Python, so it should be (hopefully) more compatible with different OSes.
  • Disable more pylint checks that are also checked by mypy to avoid false positives.
  • Remove the redundant --platform from the testing dockerfile.

Bug Fixes

  • Sybil now parses the __init__.py file as well. Previously it was disabled due to an upstream bug.

What's Changed

  • Fix TODO typos for workflows/release-notes-checks by @daniel-zullo-frequenz in #291
  • Reset release notes and migration script for the next release by @llucax in #292
  • Group dependabot updates for GitHub Actions by @llucax in #293
  • Bump types-pyyaml from 6.0.12.20240311 to 6.0.12.20240724 by @dependabot in #297
  • Update types-setuptools requirement from <71,>=67.6.0 to >=67.6.0,<72 by @dependabot in #296
  • Update setuptools requirement from <71,>=67.6.0 to >=67.6.0,<72 by @dependabot in #295
  • Bump the required group with 5 updates by @dependabot in #294
  • Bump the required group with 4 updates by @dependabot in #300
  • Update setuptools requirement from <72,>=67.6.0 to >=67.6.0,<73 by @dependabot in #301
  • Pin protobuf related dependencies by @llucax in #309
  • Bump the required group across 1 directory with 10 updates by @dependabot in #310
  • Bump types-pyyaml from 6.0.12.20240724 to 6.0.12.20240808 by @dependabot in #307
  • Update setuptools requirement from <73,>=67.6.0 to >=67.6.0,<75 by @dependabot in #306
  • Fix the labeler configuration example by @llucax in #304
  • Update types-setuptools requirement from <72,>=67.6.0 to >=67.6.0,<75 by @dependabot in #308
  • Update setuptools requirement from <75,>=67.6.0 to >=67.6.0,<76 by @dependabot in #314
  • Bump the required group with 4 updates by @dependabot in #312
  • Update sybil requirement from <7,>=6.1.1 to >=6.1.1,<9 by @dependabot in #315
  • Change edit_uri default branch to v0.x.x in mkdocs.yml by @cwasicki in #311
  • Update types-setuptools requirement from <75,>=67.6.0 to >=67.6.0,<76 by @dependabot in #313
  • Bump types-pyyaml from 6.0.12.20240808 to 6.0.12.20240917 by @dependabot in #316
  • Bump SDK dependency to 1.0.0rc901 by @llucax in #317
  • Add asyncio_default_fixture_loop_scope = "function" option by @llucax in #318
  • Add GitHub branch ruleset for Rust by @llucax in #320
  • Sybil: Parse init by @Marenz in #321
  • Bump the required group with 7 updates by @dependabot in #322
  • Bump the required group with 2 updates by @dependabot in #325
  • Bump setuptools-scm[toml] from 7.1.0 to 8.1.0 by @dependabot in #326
  • Update sybil requirement from <9,>=6.1.1 to >=6.1.1,<10 by @dependabot in #327
  • Port the migration script to Python by @llucax in #329
  • Disable more pylint checks that are also checked by mypy by @llucax in #330
  • Bump dependencies in the template by @llucax in #331
  • Remove the redundant --platform from the Dockerfile by @llucax in #332
  • Prepare for the v0.11.0 release by @llucax in #333

New Contributors

Full Changelog: v0.10.0...v0.11.0

v0.11.0-rc1

20 Nov 16:25
v0.11.0-rc1
fea7837
Compare
Choose a tag to compare
v0.11.0-rc1 Pre-release
Pre-release

Frequenz Repository Configuration Release Notes

Summary

This version accumulates a few improvements, and bumps the dependency of setuptools to use v75, which is compatible with PEP625, which is necessary to be able to keep uploading to PyPI, so you should upgrade to this version as soon as possible.

The migration script was also rewritten in Python, so it should be more compatible with different OSes.

Upgrading

  • The frequenz.repo.config.github.abort() function now takes most arguments as keyword-only arguments.
  • The Queue PRs for v0.x.x GitHub ruleset was renamed to Queue PRs for the default branch and now targets the default branch. It also only have the merge queue restriction, all other restrictions were removed as they are already present in the Protect version branches ruleset. You might want to re-import this ruleset to your repositories.

New Features

  • Added a new GitHub branch ruleset for Rust projects.

Cookiecutter template

  • Group GitHub Actions dependabot updates.
  • API projects don't include the google-common-protos dependency by default.
  • API projects updated the grpcio dependency to 1.66.1.
  • API projects updated the frequenz-api-common dependency to 0.6.
  • Bump most of the dependencies.
  • Change edit_uri default branch to v0.x.x in mkdocs.yml.
  • Added a new default option asyncio_default_fixture_loop_scope = "function" for pytest-asyncio as not providing a value is deprecated.
  • The migration script is now written in Python, so it should be (hopefully) more compatible with different OSes.
  • Disable more pylint checks that are also checked by mypy to avoid false positives.
  • Remove the redundant --platform from the testing dockerfile.

Bug Fixes

  • Sybil now parses the __init__.py file as well. Previously it was disabled due to an upstream bug.

What's Changed

  • Fix TODO typos for workflows/release-notes-checks by @daniel-zullo-frequenz in #291
  • Reset release notes and migration script for the next release by @llucax in #292
  • Group dependabot updates for GitHub Actions by @llucax in #293
  • Bump types-pyyaml from 6.0.12.20240311 to 6.0.12.20240724 by @dependabot in #297
  • Update types-setuptools requirement from <71,>=67.6.0 to >=67.6.0,<72 by @dependabot in #296
  • Update setuptools requirement from <71,>=67.6.0 to >=67.6.0,<72 by @dependabot in #295
  • Bump the required group with 5 updates by @dependabot in #294
  • Bump the required group with 4 updates by @dependabot in #300
  • Update setuptools requirement from <72,>=67.6.0 to >=67.6.0,<73 by @dependabot in #301
  • Pin protobuf related dependencies by @llucax in #309
  • Bump the required group across 1 directory with 10 updates by @dependabot in #310
  • Bump types-pyyaml from 6.0.12.20240724 to 6.0.12.20240808 by @dependabot in #307
  • Update setuptools requirement from <73,>=67.6.0 to >=67.6.0,<75 by @dependabot in #306
  • Fix the labeler configuration example by @llucax in #304
  • Update types-setuptools requirement from <72,>=67.6.0 to >=67.6.0,<75 by @dependabot in #308
  • Update setuptools requirement from <75,>=67.6.0 to >=67.6.0,<76 by @dependabot in #314
  • Bump the required group with 4 updates by @dependabot in #312
  • Update sybil requirement from <7,>=6.1.1 to >=6.1.1,<9 by @dependabot in #315
  • Change edit_uri default branch to v0.x.x in mkdocs.yml by @cwasicki in #311
  • Update types-setuptools requirement from <75,>=67.6.0 to >=67.6.0,<76 by @dependabot in #313
  • Bump types-pyyaml from 6.0.12.20240808 to 6.0.12.20240917 by @dependabot in #316
  • Bump SDK dependency to 1.0.0rc901 by @llucax in #317
  • Add asyncio_default_fixture_loop_scope = "function" option by @llucax in #318
  • Add GitHub branch ruleset for Rust by @llucax in #320
  • Sybil: Parse init by @Marenz in #321
  • Bump the required group with 7 updates by @dependabot in #322
  • Bump the required group with 2 updates by @dependabot in #325
  • Bump setuptools-scm[toml] from 7.1.0 to 8.1.0 by @dependabot in #326
  • Update sybil requirement from <9,>=6.1.1 to >=6.1.1,<10 by @dependabot in #327
  • Port the migration script to Python by @llucax in #329
  • Disable more pylint checks that are also checked by mypy by @llucax in #330
  • Bump dependencies in the template by @llucax in #331
  • Remove the redundant --platform from the Dockerfile by @llucax in #332
  • Prepare for the v0.11.0 release by @llucax in #333

New Contributors

Full Changelog: v0.10.0...v0.11.0-rc1

v0.10.0

10 Jul 11:34
v0.10.0
bfd45a8
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Summary

This release includes quite a few enhancements and bug fixes for the cookiecutter template, but most importantly a new script for migrating to new templates, generating the templates is no longer needed for upgrading.

Upgrading

Cookiecutter template

  • A new script for migrating to new templates (instead of regenerating all files) is provided. It can't handle the upgrade 100% automatically, but should make the migration process much easier and less error prone.

    To run it, the simplest way is to fetch it from GitHub and run it directly:

    curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.10.0/cookiecutter/migrate.sh | sh

    Make sure the version you want to migrate to is correct in the URL.

    For jumping multiple versions you should run the script multiple times, once for each version.

    And remember to follow any manual instructions for each run.

New Features

  • A new GitHub ruleset is provided to configure the merge queue, so branch protection rules are not needed anymore.

Enhancements

  • The generated docs now show the symbol type in the table of contents.

Cookiecutter template

  • The Markdown dependency was bumped so we don't need to add a type: ignore due to incorrect type hints.
  • The generated docs now show the symbol type in the table of contents.
  • The dependecies were updated to the latest versions.
  • Disabled some pylint checks that are already checked by other tools.
  • The generated documentation now uses symlinks for aliases, which allows deep linking when using aliases too.

Bug Fixes

  • The code example extractor relied on a bug in the upstream sybil project that was recently fixed, thus our code also needed to be fixed.

Cookiecutter template

  • Fixed a bug where the pip cache post action fails in the CI workflow because of permissions issues.
  • Make the nox-cross-arch-all job fail if any nox-cross-arch matrix job fails.
  • Fix credentials not being passed to the test-installation job in the CI workflow.
  • Make sure credentials are configured for all jobs that check out the repository in the CI workflow.
  • Disable the new check-class-attributes check in pydoclint 0.5.3, as we use a different way to document class attributes.
  • Fix permissions issues with the release-notes-check workflow when the repository Actions configuration is set up without full access.

What's Changed

  • Clear release notes by @llucax in #233
  • Add a migration script by @llucax in #240
  • Fix Markdown type:ignore by @llucax in #241
  • mkdocs: Show symbol type in the ToC by @llucax in #244
  • Configure the merge queue via a ruleset by @llucax in #242
  • Bump dependencies by @llucax in #245
  • Bump the required group across 1 directory with 6 updates by @dependabot in #248
  • Make dependabot check for updates monthly on Wednesday by @llucax in #250
  • Bump actions/setup-python from 4 to 5 by @dependabot in #254
  • Bump actions/cache from 3 to 4 by @dependabot in #252
  • Don't recursively scan for pyproject.toml when calculating the cache key by @llucax in #260
  • Bump the required group across 1 directory with 3 updates by @dependabot in #259
  • Fix CI failing with setuptools dependency missing by @Marenz in #258
  • Pin sybil to < 6.1 by @llucax in #262
  • Downgrade sybil to 6.0.3 by @llucax in #264
  • Fail the nox-cross-arch-all job if any matrix job fails by @llucax in #261
  • Bump actions/{up,down}load-artifact from 3 to 4 by @dependabot in #251
  • Fix the Queue PRs for v0.x.x.json ruleset by @llucax in #263
  • Fix the condition to run the nox-cross-arch-all job by @llucax in #265
  • Fix the migration script by @llucax in #268
  • Fix code example extractor relying on bug in sybil by @Marenz in #256
  • Update types-setuptools requirement from <70,>=67.6.0 to >=67.6.0,<71 by @dependabot in #273
  • Update setuptools requirement from <70,>=67.6.0 to >=67.6.0,<71 by @dependabot in #272
  • Bump the required group with 7 updates by @dependabot in #271
  • Disable some pylint checks that are checked by other tools by @llucax in #280
  • mkdocs: Use symlink alias types by @llucax in #281
  • Bump docker/build-push-action from 5 to 6 by @dependabot in #284
  • Bump brettcannon/check-for-changed-files from 1.2.0 to 1.2.1 by @dependabot in #285
  • Bump the required group with 8 updates by @dependabot in #283
  • Fix credentials not passed or configured the CI workflow by @llucax in #286
  • Disable the new check-class-attributes check in pydoclint 0.5.3 by @llucax in #288
  • Prepare for the v0.10.0 release by @llucax in #290
  • Add pull-requests read permission to the release-notes-check workflow by @llucax in #289

New Contributors

Full Changelog: v0.9.1...v0.10.0

v0.9.2

02 May 08:11
v0.9.2
6648093
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Bug Fixes

  • Pin sybil to < 6.1

    Sybil 6.1.0 fixes a bug which we thought it was proper behavior, so
    upgrading to it would break our tests.

Full Changelog: v0.9.1...v0.9.2

v0.9.1

26 Feb 15:18
v0.9.1
b3925ca
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Bug Fixes

  • Fix that new repositories were initialized with the previous version 0.8.0.

What's Changed

Full Changelog: v0.9.0...v0.9.1

v0.9.0

20 Feb 14:24
v0.9.0
3e198ce
Compare
Choose a tag to compare

Frequenz Repository Configuration Release Notes

Summary

This release brings support for pytest 8, a couple of bug fixes and many improvements to the cookiecutter template.

Upgrading

  • Once you upgraded, you'll be able to upgrade to pytest 8, and indirectly to sybil 6, which includes types hints. If you do so, you should remove the mypy exception for sybil in the pyproject.toml file.

    Search for the tool.mypy.overrides section and remove the "sybil", "sybil.*" enties from the module list.

Cookiecutter template

To upgrade without regenerating the project, you can follow these steps:

  • Run the following command to add the new pylint ignore rules:

    sed '/  # Checked by flake8/a\  "redefined-outer-name",\n  "unused-import",' -i pyproject.toml
  • It is recommended to update this rule in your repository to use the new bypass rule for the Protect version branches ruleset that allows maintainers to force-merge.

    You can do this by re-importing the ruleset or manually:

    Go to the repository settings -> Rules -> Rulesets -> Protect version branches -> Bypass list -> Add bypass -> Select Maintain role and change the dropdown bypass rule to use Pull requests instead of Always.

  • The labeler action was upgraded to 5.0.0. This needs a new configuration file.

    If you haven't diverged much from the default configuration (and you are not using exclusion rules), you can update the configuration file by running this script in the root of your repository:

    import sys
    lines = []
    state = "looking"
    with open(".github/labeler.yml", encoding="utf-8") as fin:
        for line in fin:
            if "changed-files:" in line:
                sys.stderr.write("Already fixed, aborting...\n")
                sys.exit(1)
            match state:
                case "looking":
                    if not line.startswith(("#", " ", "\t")) and line.rstrip().endswith(":"):
                        line = f"{line}  - changed-files:\n    - any-glob-to-any-file:\n"
                        state = "in-label"
                case "in-label":
                    if not line.lstrip().startswith("-"):
                        state = "looking"
                    else:
                        line = f"    {line}"
            lines.append(line)
    with open(".github/labeler.yml", "w", encoding="utf-8") as fout:
        fout.writelines(lines)

    This will update the file in place, you can inspect the changes with git diff.

  • For API projects, you can manually add instructions to update the mkdocs.yml when the frequenz-api-common dependency is updated.

    awk -i inplace '/^sed s..frequenz-api-common/ { print; print "sed '"'"'s|https://frequenz-floss.github.io/frequenz-api-common/v[0-9].[0-9]/objects.inv|https://frequenz-floss.github.io/frequenz-api-common/v'"'"'${ver_minor}'"'"'/objects.inv|'"'"' -i mkdocs.yml"; next }1' CONTRIBUTING.md
    
  • Run the following command to fix the test-installation CI job when using git URLs in pyproject.toml:

    patch -p1 <<'EOF'
    diff --git a/.github/containers/test-installation/Dockerfile b/.github/containers/test-installation/Dockerfile
    index 772b2ae..2494545 100644
    --- a/.github/containers/test-installation/Dockerfile
    +++ b/.github/containers/test-installation/Dockerfile
    @@ -6,7 +6,12 @@
    
     FROM --platform=${TARGETPLATFORM} python:3.11-slim
    
    -RUN python -m pip install --upgrade --no-cache-dir pip
    +RUN apt-get update -y && \
    +    apt-get install --no-install-recommends -y \
    +    git && \
    +    apt-get clean && \
    +    rm -rf /var/lib/apt/lists/* && \
    +    python -m pip install --upgrade --no-cache-dir pip
    
     COPY dist dist
     RUN pip install dist/*.whl && \
    EOF
    
  • If your repository uses submodules and do cross-arch tests, you need to update the nox-cross-arch job in the .github/workflows/ci.yaml workflow and add the option submodules: true to the checkout action, for example:

    steps:
      - name: Fetch sources
        uses: actions/checkout@v4
        with:
          submodules: recursive

New Features

  • Add support for pytest 8.

Cookiecutter template

  • Some checks that are already performed by flake8 are now disabled in pylint to avoid double reporting.
  • The repository ruleset Protect version branches has been updated to allow repository maintainers to skip protection rules in PRs.
  • The labeler action was upgraded to 5.0.0, which allows for more complex matching rules.
  • Instruction were added to update the mkdocs.yml when the frequenz-api-common dependency is updated.

Bug Fixes

Cookiecutter template

  • Fix the test-installation CI job when dependencies in pyproject.toml contain git URLs.
  • Fix cross-arch testing for respositories with submodules.

What's Changed

  • Clear release notes by @llucax in #206
  • Make copyright year fakable in golden tests by @llucax in #212
  • Make GitHub Pages configuration more accesible by @llucax in #214
  • Add a few more checks to the pylint ignore list by @llucax in #208
  • Allow repository maintainers to force-merge by @llucax in #213
  • Upgrade to labeler 5.0.0 by @llucax in #211
  • Add missing instruction to update dependencies by @llucax in #223
  • ci: Support using git for dependencies in test-installation by @Marenz in #222
  • Update pytest and sybil by @Marenz in #221
  • Fetch submodules when doing cross-arch tests by @llucax in #225
  • Prepare release notes for v0.9.0 by @llucax in #227

Full Changelog: v0.8.0...v0.9.0