Compiled Knowledge version identification conforms to PEP 440 with MAJOR.MINOR.PATCH semantic versioning.
Here are some example version identifiers that conform:
4.5.6a stable release,4.5.6a78a prerelease of version4.5.6.
Versions will be tagged in the repository using the version identifier as the label, prepended with "v".
Here are the repository tags corresponding to the version identifiers above:
v4.5.6,v4.5.6a78.
- Check out the "main" branch.
- Update dependencies, using
poetry update. - Merge any new features and fixes for the release.
- Run
python setup.py build_ext --inplaceto compile Cython modules (must do before testing). - Run
tests/all_tests.pyfor unit testing, confirming all unit tests pass. - Run
ck_demos/all_demos.pyfor smoke testing, confirming no errors are reported. - Edit
pyproject.tomlto update the project version number (must do before building documentation). - Run
build_docs.pyand confirm the documentation builds okay. - View the documentation build to confirm it:
docs/_build/html/index.html.
Only proceed if the "main" branch is ready for release.
- Commit, tag and push the "main" branch. This will automatically release the documentation.
- Go to the project GitHub Actions, Upload Python Package.
- Select "Run workflow".
This manual release process will only upload wheels for the platform that these commands are run on.
- Commit, tag and push the "main" branch. This will automatically release the documentation.
- Ensure you are on an up-to-date checkout of the "main" branch.
- Delete any existing project
distdirectory. - Build a source distribution using:
python setup.py sdist. - Build a binary distribution using:
cibuildwheel --output-dir dist. - Upload the package to PyPI using:
python -m twine upload dist/*.
- Check the online version of the documentation: https://compiled-knowledge.readthedocs.io/.
- Check the PyPI release history: https://pypi.org/project/compiled-knowledge/#history.
- Open a CK client test project. Update the dependencies (e.g.,
poetry update). Ensure CK upgraded and that the test project works as expected.
If the post-release checks fail:
- Delete the broken PyPI release: https://pypi.org/project/compiled-knowledge/#history.
- Create a "fix/..." branch for a fix.
- When a fix is found, perform the release process above.