Skip to content

Automate more of the Python upgrade #319

@DominicOram

Description

@DominicOram

When a new python version is released we currently have the checklist in https://github.com/DiamondLightSource/python-copier-template/blob/main/.github/workflows/new_python.yml. Many of these steps could be done automatically by renovate e.g. something like:

{
  "regexManagers": [
    {
      "fileMatch": ["^\\.github/workflows/.*\\.ya?ml$"],
      "matchStrings": [
        "python-version:\\s*\

\[(?<currentVersions>[^\\]

]+)\\]

"
      ],
      "datasourceTemplate": "python",
      "depNameTemplate": "python",
      "versioningTemplate": "pep440"
    }
  ]
}

in the renovate.json should update the versions under test.

There are probably differing opinions of how much of this we do automatically, semi-automatically or manually based on risk. My preference would be to split the move into two steps:

  • Adding the new version as supported - e.g. adding it to the versions under test and to the classifiers. I would say if the tests pass then merge this w/o human input
  • Deprecating the old one. I think this does need human intervention as it's risky and there may be valid reasons it's hard. However, we can probably still get renovate to make the PR for it.

Acceptance Criteria

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