Developing

Releasing a new version

The following steps have to be completed in order to release a new version of locuaz:

  1. Make sure you have all the dependencies:

    pip install twine build sphinx sphinx-rtd-theme
    

sphinx packages may fail to install with pip, try with mamba:

mamba install sphinx sphinx_rtd_theme
  1. After commiting all changes, be sure that the release shows up on history.rst and list all fixes and additions.

  2. Update the version on locuaz/__init__.py:

__version__ = "0.7.0"

and on setup.cfg:

[metadata]
name = locuaz
version = 0.7.0
author =  Patricio Barletta
...
  1. Make sure you’re on the right conda environment so you can build the documentation, the project and that twine doesn’t report any errors on the distribution .tar.gaz nor the wheels:

    sphinx-build -b html docs/source/ docs/build/html/
    pyproject-build
    twine check dist/*
    
  2. Commit locuaz/__init__.py, and setup.cfg with a message along the lines of “Bump up version to X.X.X”:

    git add locuaz/__init__.py setup.cfg
    git commit -m "Bump up version to 0.7.0"
    git push origin main
    
  3. Tag the release:

git tag 0.7.0
git push origin --tags
  1. The last step will trigger a GHAction to publish the project on pypi. Get the sha256 hash from the project’s pypi

  2. Use the sha256 to update the version on the conda recipe:

{% set name = "locuaz" %}
{% set version = "0.7.0" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/locuaz-{{ version }}.tar.gz
  sha256: 93eed64eddba7ef6137d894aa26e3000ea51953153a26f2efeeb773990674f0a
  1. Make sure you can build the conda recipe locally:

    conda mambabuild .
    
  2. Make a PR to the feedstock and update it following conda-forge instructions

  3. Update the locuaz version on the apptainer definition file here:

    pip install locuaz==0.7.0 --root-user-action=ignore
    

And here:

%labels
Author Patricio Barletta
Version 0.7.0
  1. Build the container:

    sudo apptainer build locuaz.sif locuaz.def
    
  2. Log into the GitHub container registry:

    apptainer remote login --username pgbarletta docker://ghcr.io
    
  3. Upload the image to the GitHub registry:

    apptainer push locuaz.sif oras://ghcr.io/pgbarletta/locuaz.sif:0.7.0
    

The last line takes a while to finish. Check this blog post for more info on apptainer.

Modifying the schema

If at any time there’s a change on the schema.yaml file, some documentation needs to be updated:

  1. configurationfile.rst

  2. Tutorials: tutorialsimple.rst, tutorialtleap.rst and tutorialligand.rst.

  3. The configuration files in the example folders: /simple_tutorial/config_simple.yaml, /tleap_tutorial/config_nb.yaml and /ligand_tutorial/config_ligand.yaml. Then, update these new config files to the onedrive.

Modifying the conda dependencies

If at any time there’s a change on the conda dependencies, the README also needs to be updated:

  1. Update usr_deps.yaml

  2. Update the dependencies in README.rst