Automating Python and Django version update scans for Jazzband projects
- Dominant language
- No language data
- Stars
- 28
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to propose we set up automation for checking version updates for Jazzband projects for adding new Python and Django versions to Python package requirements, package classifiers, unit and integration test matrices for GitHub Actions and acceptance testing criteria for GitHub PRs.
### Background
We already have 50+ packages under Jazzband that need regular version updates and maintenance when new Python and Django versions come out; for some packages this takes a couple of minutes to adjust, for others it can multiple hours per package to update, remembering to update all packages for the whole organization can be error-prone and time-intensive. All packages deserve a proper maintenance and dependency version checking model if they are part of this organization.
### Proposal
(Semi) automated checks for Python and Django version bumps and deprecations when new versions come out and old versions go out of fashion.
### Feature requirements
With checkmark indicating proposed "required" and blanks indicating "nice-to-have" features:
- [x] GitHub CI test matrix checking; does the project support a sane and up-to-date test matrix?
- [x] Tox test matrix checking; same quetsion
- [x] Python version requirement checking; EOL version still supported, newest yet supported?
- [x] Python package classifiers checking; are all supported versions included in the package classifiers?
- [x] Check (C)Python versions; for at least GitHub Actions and Tox, sometimes it would be good to check e.g. PyPy versions as well?
- [x] Check Django versions; does the package support all currently supported Django versions; are the EOL versions included?
Taking the idea further, it would be nice to automate the updates too:
- [ ] Submit an issue for indicating update needs
- [ ] Update Python package classifiers in configuration files
- [ ] Update Python version requirements in configuration files
- [ ] Update Django version requirements in configuration files
- [ ] Submit a PR with updated versions for the maintainer to check and run tests against
- [ ] Run checks and updates as part of regular automation such as GitHub Actions or another autonomous tool
- [x] Simple and easy joint maintenance and development model if a custom tool is used and/or implemented
### Options
Options include at least:
- Open-source friendly SaaS or package-or-security-update-as-a-service tools that check all repositories periodically for version update needs; is there an alternative available that can at least check Jazzband specific configuration files, or even update them automatically?
- Commercial-off-the-shelf tools that do the same with a purchase or sponsorship model
- Custom tools under e.g. Jazzband that search for specifiers and report missing / found versions and classifiers per repository with specific rules: e.g. "package X missing Django 4.0, Python 3.10 in GitHub Actions" or "package X supporting EOL Python 3.6".
### Pros, cons, and thoughts on diferent options
- FOSS or COTS tools require very little maintenance, but can be hard to customize for our specific needs
- Custom tools offer flexibility but require maintenance; on the other hand if there isn't a tool for this in the fairly established Python ecosystem, Jazzband could be a good home for a tool like that
### Terminology and definitions used in this issue
- **Package classifier** defines metadata about the package for users with the `classifiers` keyword in Python packaging manifest in e.g. `setup.py` file.
- **Python version requirement** defines the minimum (and maximum) supported version in e.g. `setup.py` with `python_requires` keyword.
- **Django version requirement** defines the minimum (and maximum) supported Django version for the package with e.g. the `install_requires` keyword in `setup.py`.
Example `setup.py` that configured current minimum Python 3.7 and Django 2.2 version scheme for supported releases:
```
#!/usr/bin/env python
from setuptools import setup
setup(
# ... other requirements
name="example-classifiers-project",
python_requires=">=3.7",
install_requires=["django>=2.2", "setuptools"],
classifiers=[
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
)
```
Contributor guide
Assessment
This issue has not been assessed yet.