-
Notifications
You must be signed in to change notification settings - Fork 173
How to cut a new release
Notes for myself.
We're assuming that you're working on your local machine, and not in a dev container, as this step is intended to be a one-time setup per computer; if you're in a dev container, then skip over this step.
Shamelessly copied over from https://truveris.github.io/articles/configuring-pypirc/
Make a .pypirc
file:
touch ~/.pypirc
Now edit the file:
nano ~/.pypirc
Paste in the following block
[distutils]
index-servers=
pypi
testpypi
[pypi]
username: brodan
password: xxxxxxxxxxxxxxxx
[testpypi]
repository: https://test.pypi.org/legacy/
username: brodan
password: yyyyyyyyyyyyyyyy
If you do releases from your local machine, you can take advantage of the .pypirc
setup earlier.
Be sure to set up the conda
environment:
# Change directory to cloned repo
cd /path/to/pyjanitor # change /path/to/pyjanitor to wherever you put cloned pyjanitor
# Create environment
conda env create -f environment-dev.yml
# Activate the development environment:
conda activate pyjanitor-dev
# Install pyjanitor into environment in development mode
pip install -e .
If there's anything not passing, it must be fixed before a release can be cut.
On the GitHub main page for the repo, inspect the build status on Azure pipelines.
The build stage "Run all pyjanitor tests" should be passing on the linux py37
and macOS py37
builds.
(These are the only two builds that reliably fail when asked to fail; the Windows one keeps passing regardless.)
If the notebooks are failing, so be it.
Move everything "on deck" under a new header for the release.
bumpversion --dry-run <PUT ONE OF: major, minor, patch> --allow-dirty --verbose
Inspect the output to make sure the changes that will happen are all correct.
git add .
git commit -m "PUT YOUR COMMIT MESSAGE HERE"
bumpversion <PUT ONE OF: major, minor, patch> --verbose
bumpversion
is configured to automatically commit changes.
If the pre-commit hooks error out, fix whatever needs fixing
and re-commit the changes.
Depending on whether tagging happened or not, you might need to tag the current commit after committing.
git tag -a v<NEW VERSION HERE>
git push --tags
This should, in most cases, suffice:
make release
If it doesn't, open up the Makefile and execute each command in order.
master
branch is where we keep an "archival" of all releases.
Intent is sort of like a backup to the tags.
git checkout master
git merge dev
git push --tags