- Switch to branch
devel
and pull to make sure everything is in sync with remote origin.
git checkout devel
git pull
-
Change the version in
bdikit/__init__.py
to the new version, e.g.,2.0.0
(using the format MAJOR.MINOR.PATCH). -
In
CHANGELOG.md
, change the first version, e.g.2.0.0.dev0 (yyyy-mm-dd)
to the to-be-released version and date and list all changes included in the release. -
Commit with title "Bump version for release {version}" and push to remote. This commit will include the file changes done in steps 2 and 3 above.
git commit -m "Bump version for release 0.x.y"
git push origin devel
- Switch to master
main
, pull to make sure everything is in sync with remote origin, and then mergedevel
into themain
;
git checkout main
git pull
git merge devel
- Push the local
main
to the remote repo. This will trigger the CI tests, build the package and upload it tohttps://test.pypi.org/project/bdi-kit/
.
git push origin main
- Verify that CI and the publication to TestPyPI completed successfully and test the package. E.g., using Python 3.10:
# Create a new venv and activate it
mkdir /tmp/bdikit-test/ && cd /tmp/bdikit-test/
python3.10 -m venv ./venv-test
source venv-test/bin/activate
# Install bdi-kit
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple bdi-kit
# You can now install jupyter to test the library
pip install jupyter
jupyter notebook
- Switch back to the repository, and create a git tag with version name, e.g., for version 2.0.0 run:
cd ${bdikit-source-path}
# Create tag
git tag 2.0.0
# List all tags to verify the tag was created
git tag -l
- Push the tag to the remote repository. This will trigger the CI tests, and
build and publish the package to
https://pypi.org/project/bdi-kit/
.
git push --tags
-
Head to GitHub Actions page (https://github.com/VIDA-NYU/bdi-kit/actions), locate the workflow run ("Publish to PyPI 🐍") triggered for the new release tag and approve its execution. When the workflow finishes, the library should be available at https://pypi.org/project/bdi-kit/.
-
Head to https://github.com/VIDA-NYU/bdi-kit/releases/ and update the release with the CHANGELOG for the released version.
-
Switch to
devel
branch and merge the release (to make suredevel
is always on top ofmain
). If you didn't make any changes tomain
, this will do nothing.
git checkout devel
git merge main
-
Change the version in
bdikit/__init__.py
appending.dev0
to the future version, e.g.2.1.0.dev0
. Add a new empty version on top ofCHANGELOG.md
, e.g.2.1.0.dev0 (yyyy-mm-dd)
. -
Commit with message
Bump version for development
.
git add CHANGELOG.md bdikit/__init__.py
git commit -m "Bump version for development"
git push