Skip to content

Releasing

Luca Martial edited this page Mar 19, 2023 · 40 revisions

Releasing

Preparing a release

Version naming

Semantic Versioning guidelines are as follows: MAJOR.MINOR.PATCH-IDENTIFIER.NUMBER

Examples:

  • Beta release: version="1.0.0-beta.1"
  • Release candidate: version="1.0.0-rc.1"
  • Stable release: version="1.0.0"

Branches

Releases should be made from release/ branches. Once the stable release is up and running on PyPI, the release/ branch can be merged into main.

Steps to follow

  1. Test installing your package locally by running pip install -e . from the project's root directory
  2. If install is successful, run unit tests in release branch
  3. If all tests pass, upload the beta release or release candidate to PyPI
  4. Test & use your release with pip install nlptest==version-name --pre (don't forget the --pre flag)
  5. Iterate as many times as necessary, if satisfied with release

Uploading the release to PyPI

Step 1: Package the nlptest Python package

In the project's root directory, run:

python setup.py sdist bdist_wheel

This command creates a dist directory containing source distribution (.tar.gz) and wheel distribution (.whl) files.

Step 2: Upload the nlptest package to PyPI

Use twine to upload your package to PyPI:

twine upload dist/*

You'll be prompted to enter your PyPI username and password.

Clone this wiki locally