Table of Contents
- Pinax Starter Project and App Release
- High Level Release Process
- How to Know What Changes to Make
- Release Management
- Release Process
- Development Files
- Development Tools Overview
- Spread the Word
The contents of each individual starter project branch of the Pinax starter projects repo becomes a tagged release available on the Pinax starter projects repo releases page.
The contents of each Pinax app repo becomes a tagged release available on the repo releases page and published to the Python Package Index (PyPi), where developers store packages for reuse by themselves and other developers.
You can search PyPI for all of the Pinax published packages!
- Apps included in last release
- pinax-starter-app
- pinax-cli
- pinax-templates
- Any apps that can be brought up to date
- Drop support for Python and Django versions that are no longer officially supported
- Add support for Python and Django versions that are officially supported
- Automation improvements
- Increased DRY-ness.
- Continuous Integration (CI) improvements
- Packaging improvements
Generally, Pinax supports the officially supported versions of Python and Django.
For more information, see the following Django docs:
- Django supported versions chart
- Django supported versions policy
- "Upgrading Django to a newer version"
- "What Python version should I use with Django?"
- Django release notes "Python Compatibility" section (Example: Release 3.0 "Python Compatibility")
The Latest GitHub Features
- Update wiki with current and historical release info (See: https://github.com/pinax/pinax/wiki)
- Use a spreadsheet to track updates to individual apps
- Use GitHub milestones within repos, as needed
- Pinax releases follow the CalVer (Calendar Versioning) specification.
- Use
yy.mm
for a limited timeframe, whereyy
is the year andmm
is the month. - Use
yy.xx
for an unlimited timeframe, whereyy
is the year
- Pinax individual app releases follow the SemVer (Semantic Versioning) specification.
In each repo "tags" section click on "Releases" and "Draft a new release"
- Target branch should be set to master
- For "Tag version" use
v1.2.3
format - For "Release title" use
1.2.3
format - Use the README.md Change Log entry for release notes, either by copy and paste or markdown hyperlink
Some of this guidance was taken from the PyPI packaging tutorial.
setuptools
, wheel
, and twine
should be installed
Force removal of untracked files and directories
$ git clean -fdx
Generate distribution packages for the package
$ python3 setup.py sdist bdist_wheel
Upload to PyPI test instance... go to the test instance page to double check that everything looks right
$ python3 -m twine upload --repository testpypi dist/*
Install new package from test instance
$ python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps
Upload to PyPI
$ python3 -m twine upload dist/*
Install new package from PyPI
$ pip install <package>
This method (pre-Python 3) did not use twine
, which is now considered a best practice.
Force removal of untracked files and directories
$ git clean -fdx
Publish to PyPI
$ python setup.py sdist bdist_wheel upload
- Supported versions matrix updated with supported Python and Django versions
- Dependencies up-to-date, accurate, and documented (
setup.py
andREADME.md
) -
setup.py
consistent across all apps - Consistent use of SemVer and
Change Log
- Ensure that community health files in the global community health file are up-to-date
- Make the relevant updates to the app repo, based on the guidance in release plan
- Make the relevant GitHub Actions and tox updates based on the guidance on the release plan
- Run the
Makefile
using theMake
command to test the new supported versions matrix - Fix the errors you see in the terminal until you see green at the end of the process
- Update
Change Log
- Update app version number in
setup.py
(Pinax uses SemVer) - Create a pull request
Before publishing
- Accurate pull request; unit test(s) included, if needed
- Updated app version number in
setup.py
(Pinax apps use SemVer) - Updated
Change Log
, using new app version number
Publishing
- Ensure
AUTHORS
file is up-to-date (it's possible the process will be automated) - Tag the release
- Package should be automatically published to PyPI or test instance of PyPI by new PyPI GitHub Action anytime a tagged commit is pushed
After publishing
- App PyPI page renders properly (Note: if you need to re-publish, PyPI will not let you use the existing version number; consider publishing to the test instance of PyPI first)
Must Have
- Accurate installation instructions (Apps included in the most recent release should all have basic installation instructions)
Nice to Have
- Improved usage docs
- New tutorials
- New or improved Pinax Starter Project
- New or improved demo that showcases a Pinax Starter Project or app
- Ensure repo has a correct, up-to-date
LICENSE
, if needed (Most Pinax repos include an MIT License; some dates could be incorrect at this time, especially for deprecated or non-app repos) - Mark deprecated repos as deprecated, especially in the repo description line
- Add repo tags (Possible tags: django-project-template, python, django, pinax)
Several of the files outside of the Pinax project and app folders are configuration files used in the development process.
Folder/File | Description |
---|---|
.gitignore | Tells git which files to exclude when work is pushed to GitHub |
Pipfile | |
setup.cfg | |
update.sh | A shell script used to automate commands |
Folder/File | Description |
---|---|
.circleci/config.yml | |
.coveragerc | |
.gitignore | Tells git which files to exclude when work is pushed to GitHub |
MANIFEST.in | |
Makefile | |
makemigrations.py | |
runtests.py | |
setup.py | |
tox.ini | A tox config file |
tox is used to test the supported versions matrix. detox, a tox plugin used to run tox testenvs in parallel, has been used in Pinax extensively in the past, but will be replaced with tox parallel mode. detox is now an archived project.
All apps should include a Makefile
.
Run the Makefile
:
$ Make
Codecov is used to provide coverage reports. Coverage is required to collect coverage metrics.
Flake8 is used to check style and complexity. Flake8 includes Doc8 style checker, pydocstyle docstring style checker, and McCabe complexity checker.
Flake8 Quotes, a Flake8 extension for quote linting, is used to enforce double quotes. This is a Pinax design choice.
isort is used to programmatically sort imports.
Release blog post
- Release stats
- Credit to contributors, including new features