First create something that work (to provide business value).
Then something that’s beautiful (to lower maintenance costs).
Finally works on performance (to avoid wasting time on premature optimizations).
This project follows Semantic Versioning.
Which boils down to the following rules of thumb regarding stability:
Patch releases (
0.x.(n+1)upgrades) are bug-fix only. These releases must not break anything and keeps backward-compatibility with
Minor releases (
0.(n+1).0upgrades) includes any non-bugfix changes. These releases must be backward-compatible with any
0.n.*version but are allowed to drop compatibility with the
0.(n-1).*series and below.
Major releases (
(n+1).0.0upgrades) are not planned yet, unless we introduce huge changes to the project.
Setup a development environment¶
This step is required for all the other sections from this page.
Check out latest development branch:
$ git clone email@example.com:kdeldycke/meta-package-manager.git $ cd ./meta-package-manager $ git checkout develop
Install package in editable mode with all development dependencies:
$ pip install poetry $ poetry install
Now you’re ready to hack and abuse git!
Install test dependencies and run unit-tests:
$ poetry run pytest
Run isort utility to sort Python imports:
$ poetry run isort --apply
$ poetry run pycodestyle $ poetry run pylint meta_package_manager
The documentation you’re currently reading can be built locally with Sphinx:
$ poetry install --extras docs $ poetry run sphinx-build -b html ./docs ./docs/html
And once in a while, it’s good to upgrade the graph of package dependencies:
$ poetry show --all --no-dev --tree
Check your starting from a clean
$ git checkout develop
Revision should already be set to the next version, so we just need to set the released date in the changelog:
$ vi ./CHANGES.rst
Create a release commit, tag it and merge it back to
$ git add ./meta_package_manager/__init__.py ./CHANGES.rst $ git commit -m "Release vX.Y.Z" $ git tag "vX.Y.Z" $ git push $ git push --tags $ git checkout master $ git pull $ git merge "vX.Y.Z" $ git push
$ poetry build
For a smooth release, you also need to validate the rendering of package’s long description on PyPi, as well as metadata:
$ poetry check $ poetry run twine check ./dist/*
Publish packaging to PyPi:
$ poetry publish
Update revision with bump2version
and set it back to development state by increasing the
$ git checkout develop $ poetry run bumpversion --verbose patch $ git add ./meta_package_manager/__init__.py ./CHANGES.rst $ git commit -m "Post release version bump." $ git push
Now if the next revision is no longer bug-fix only, bump the
revision level instead:
$ poetry run bumpversion --verbose minor $ git add ./meta_package_manager/__init__.py ./CHANGES.rst $ git commit -m "Next release no longer bug-fix only. Bump revision." $ git push