Skip to content

bump_country_package.py broken after pyproject.toml migration #3324

@anth-volk

Description

@anth-volk

Problem

The migration to pyproject.toml in #3277 deleted setup.py and replaced changelog_entry.yaml with changelog.d/ towncrier fragments. However, gcp/bump_country_package.py — the script called by policyengine-us and policyengine-uk CI to automatically open version-bump PRs — was not updated. It still:

  1. Reads/writes setup.py (line 29-43), which no longer exists. This causes a FileNotFoundError at runtime.
  2. Writes changelog_entry.yaml (lines 53-56), which is the deprecated changelog format. The repo now uses changelog.d/ fragments.
  3. Has an indentation bug on line 40 where setup_py.replace(...) is outside the if match: block, which would cause an AttributeError if the regex didn't match.

As a result, no automated country-package bump PRs can be created until this is fixed.

Expected fix

  • Read/write pyproject.toml instead of setup.py
  • Create a changelog.d/{branch_name}.changed.md fragment instead of changelog_entry.yaml
  • Fix the indentation bug so the replace is inside the if match: block

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions