Skip to content

Latest commit

 

History

History
76 lines (63 loc) · 2.86 KB

HOW_TO_RELEASE.md

File metadata and controls

76 lines (63 loc) · 2.86 KB

How to release a new version

  1. Switch to branch devel and pull to make sure everything is in sync with remote origin.
    git checkout devel
    git pull
  1. Change the version in bdikit/__init__.py to the new version, e.g., 2.0.0 (using the format MAJOR.MINOR.PATCH).

  2. 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.

  3. 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
  1. Switch to master main, pull to make sure everything is in sync with remote origin, and then merge devel into the main;
git checkout main
git pull
git merge devel
  1. Push the local main to the remote repo. This will trigger the CI tests, build the package and upload it to https://test.pypi.org/project/bdi-kit/.
git push origin main
  1. 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
  1. 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
  1. 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
  1. 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/.

  2. Head to https://github.com/VIDA-NYU/bdi-kit/releases/ and update the release with the CHANGELOG for the released version.

  3. Switch to devel branch and merge the release (to make sure devel is always on top of main). If you didn't make any changes to main, this will do nothing.

git checkout devel
git merge main
  1. 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 of CHANGELOG.md, e.g. 2.1.0.dev0 (yyyy-mm-dd).

  2. Commit with message Bump version for development.

git add CHANGELOG.md bdikit/__init__.py
git commit -m "Bump version for development"
git push