Releasing new versions (GCST only)

This page describes some of the steps required for releasing new versions of GCPy on Github, PyPi, and conda-forge.

  1. Update CHANGELOG.md as necessary.

  2. For clarity, update version numbers to the new release (X.Y.Z) in the following locations:

    • CHANGELOG.md

    • setup.py

    • gcpy/_version.py

    • docs/source/conf.py

    • gcpy/benchmark/run_benchmark.py

    • gcpy/benchmark/modules/run_1yr_fullchem_benchmark.py

    • gcpy/benchmark/modules/run_1yr_tt_benchmark.py

    This can be done by running the utility script:

    $ cd /path/to/GCPy/.release
    $ ./changeVersionNumbers.sh X.Y.Z
    
  3. Update branches accordingly:

    $ git checkout main
    $ git merge dev                             # Merge dev into main
    $ git checkout dev
    $ git merge main                            # Update dev with main
    $ git checkout docs/dev
    $ git merge main
    $ git checkout main                         # Update docs/dev with main
    $ git tag X.Y.Z                             # Create tag
    $ git push origin main dev docs/dev X.Y.Z   # Push everything to origin
    
  4. Publish the release on Github.

  5. A GitHub Action will push the geoschem-gcpy package to the Python Package Index (PyPi).

  6. Verify the new release is visible at https://pypi.org/project/geoschem-gcpy/. This may take a few minutes).

  7. After a period of time (around an hour), you will be notified of a new PR at https://github.com/conda-forge/geoschem-gcpy-feedstock indicating conda-forge has detected a new release on PyPi. You should be able to merge this PR without any additinal interference once all checks have passed.

  8. If any checks on the feedstock should fail, this typically indicates Python package incompatibilities. Follow these steps to resolve these:

    1. Clone a local copy of https://github.com/geoschem/geoschem-gcpy-feedstock and check out the feedstock PR’s branch.

    2. Look at the errors on the PR’s GitHub Actions tab and the Azure Pipelines page. You should be able to figure out which package is the one causing the issue.

    3. Edit the Python packages in the file recipes/meta.yaml and also increment the build number setting by one. If packages have been pegged to a specific version, try removing the peg.

    4. Push your updates to the feedstock PR branch and wait for all checks to pass.

    5. If checks are still failing, repeat steps 2-4 above and then wait to see if the checks pass.

    6. Merge the feedstock PR manually after all checks have passed.

  9. Once the feedstock PR has been merged and after another period of waiting, you should see builds for the new release when running conda search -f geoschem-gcpy or by checking https://anaconda.org/conda-forge/geoschem-gcpy. This indicates the new version is publicly available for installation through conda-forge.