Developing
Releasing a new version
The following steps have to be completed in order to release a new version of locuaz:
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
After commiting all changes, be sure that the release shows up on
history.rstand list all fixes and additions.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
...
Make sure you’re on the right conda environment so you can build the documentation, the project and that
twinedoesn’t report any errors on the distribution.tar.gaznor the wheels:sphinx-build -b html docs/source/ docs/build/html/ pyproject-build twine check dist/*
Commit
locuaz/__init__.py, andsetup.cfgwith 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
Tag the release:
git tag 0.7.0
git push origin --tags
The last step will trigger a GHAction to publish the project on pypi. Get the sha256 hash from the project’s pypi
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
Make sure you can build the conda recipe locally:
conda mambabuild .
Make a PR to the feedstock and update it following conda-forge instructions
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
Build the container:
sudo apptainer build locuaz.sif locuaz.def
Log into the GitHub container registry:
apptainer remote login --username pgbarletta docker://ghcr.io
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:
configurationfile.rstTutorials:
tutorialsimple.rst,tutorialtleap.rstandtutorialligand.rst.The configuration files in the example folders:
/simple_tutorial/config_simple.yaml,/tleap_tutorial/config_nb.yamland/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:
Update
usr_deps.yamlUpdate the dependencies in
README.rst