Releasing a new version¶
- Update the changelog
- Get the list of contributors
- Bump the version number
- Rebuild the documentation
- Make a PR
- Clean all untracked files
- Build and release the pip package
- Create a git tag and possibly branch
- Create a release on GitHub
- Build and release the conda packages
- Change to development version
Ideally, the Changelog (located at
nbgrader/docs/source/changelog.rst) should be updated as things are
changed. In practice, this doesn’t always happen as people forget to include
changes to the changelog in PRs. However, the changelog should be fully
up-to-date at the time of a release. To ensure that it is up-to-date, filter
PRs on GitHub by the current milestone and make sure to include all major
changes. In addition, please include a full list of merged PRs, which can be
found using the
changelog.py script in the
tools directory, for
This will print out the list of merged PRs for the given milestone, which should then be included in the changelog.
To get the list of contributors, you can use the
tools directory, for example:
This will print out the list of users who have submitted issues and/or PRs. This list should then be included in the changelog.
The version number needs to be changed in the following files:
Regenerate all the documentation for this release by running:
Make sure the linkcheck and spellcheck pass, and commit the results.
At this point, make a pull request with the changes you have made so far. Make sure all the tests pass. After this point, you shouldn’t need to make any more changes to the source: the remaining steps all have to do with building and releasing packages and creating branches/tags on GitHub.
Make sure there are no old files lying around the repository. First, see what needs to be cleaned:
git clean -ndx
After verifying this doesn’t include anything important, clean them for real:
git clean -fdx
To build the pip package, run the
release.py script in the
This will do a few things, including converting the README file to rst (so it will display correctly on PyPI), building the source distribution, installing the source distribution into a temporary conda environment, and running tests in that environment.
Once you have verified that the tests pass, you can upload the package to PyPI with:
python setup.py sdist upload
If this is a new major release, create a new
.x branch. For example, if
this is the 0.3.0 release, create a branch called
Additionally, regardless of whether this is a major release, create a tag for
the release. Release tags should be prefixed with
v, for example,
After pushing the tag (and branch, if necessary) to GitHub, create the actual release on GitHub. To do this, go to https://github.com/jupyter/nbgrader/releases and click the button for “Draft a new release”. Choose the tag you just created and set the title as “nbgrader <tag>”, where “<tag>” is the name of the tag (e.g. v0.3.0). Put in the release notes, which should be pretty much the same as what is in the changelog.
The conda recipe has been moved to a separate repository (“feedstock”) and now
nbgrader to the
conda-forge channel automatically via CI.
Releasing a new
nbgrader version on conda requires the updating of the
jinja2 variables in the
file in the nbgrader-feedstock repository via a pull
version variable must correspond to the git tag created above and the
sha256 variable is the sha256 hash for the source code
downloaded from the given git tag/release on GitHub. This sha256 hash can be
obtained via running
openssl, for example:
openssl sha256 v0.3.0.tar.gz
Note: For more information and/or contributing to nbgrader recipe please see the nbgrader-feedstock.
Bump the version again, this time to development. For example, if the release
0.3.0, then the new version should be
0.4.0.dev0. Remember that the version needs to be changed in these files: