Release Procedure

This section describes the release procedure for PetroFit.

Release Steps

1. Navigate to the PetroFit releases page and draft a new release. This will automatically create a git tag that can be used to create the new release. For the title of the release use, for example, Version 0.3 or Version 0.3.2 for minor releases. You should name the tag v0.3 or v0.3.2 for these examples. All releases should come from the main branch.

2. To upload to PyPi, first clone or pull the main branch of the repository. Make sure that all the tags have been fetched via:

git fetch --tags
  1. Create a source distribution sdist using setup.py:

python setup.py sdist
  1. Navigate to the dist/ folder and identify the sdist file. Make sure the version is correct.

  2. Upload to PyPi using (for example v0.3.2):

twine upload petrofit-0.3.2.tar.gz

6 Upload a frozen conda environment file to the petrofit_environments repository:

conda env export | grep -v "^prefix: " > v0.3.2_environment.yml

Things to Check

  • Check if tox Python version should be upgraded.

  • Check if requirements.txt needs to be changed.

  • Check if the Dockerfile needs to be changed.

  • Make sure release date is in CHANGES.md.