Maintainer Guidelines¶
Release Procedure¶
To generate a new release:
-
Modify the Simmate version number in
pyproject.toml(link) -
Update the changelog with the new release and its release date.
-
Confirm all tests pass using the pre-built database. If they don't, generate a new one using the commands below, rename your db file (e.g.,
prebuild-2022-07-05.sqlite3), compress the db file into a zip file, upload it to the Simmate CDN, and modify thearchive_filenameinsimmate.database.utilites.load_default_sqlite3_build.simmate database reset --confirm-delete --no-use-prebuilt simmate database load-remote-archives -
Generate a release on Github, which will automatically release to pypi.
-
For the conda release, wait for the autotick bot to initiate a pull request for the simmate feedstock. Check the status here (under "Queued").
-
Review the autotick bot's changes before merging. Changes to dependencies will likely require manual updates.
-
After merging, wait for the conda-forge channels to update their indexes (about 30 minutes). Then, test the conda install with:
# for a normal release conda create -n my_env -c conda-forge simmate -y
Full Test Suite¶
Unit tests that require third-party programs (like VASP) are disabled by default. However, it's advisable to run a full test before new releases. To execute all unit tests that call programs like VASP:
-
Ensure you have the following prerequisites:
- A Linux environment with VASP & Bader installed
- Dev version of Simmate installed (
uv sync --all-extras) - The
mainbranch of the official repo checked out - Virtual environment is active (
source .venv/bin/activate) - The base Simmate directory as the current working directory
- Clear any custom
~/simmateconfigs (i.e., ensure default settings)
-
Confirm the default test suite works:
pytest -
Reset your database, switch to the pre-built, and update it. This simulates the database of a new user:
simmate database reset --confirm-delete --use-prebuilt simmate database update -
Open
pyproject.tomland modify the following line to run the VASP tests:# original line addopts = "--no-migrations --durations=15 -m 'not blender and not vasp'" # updated line addopts = "--no-migrations --durations=15 -m 'not blender'" -
(Optional) By default, all VASP tests run using
mpirun -n 12 vasp_std > vasp.out. Modify this insrc/simmate/workflows/tests/test_all_workflow_runs.pyif needed. -
Run
pytestagain to pick up these tests. It's advisable to run specific tests and enable logging (-s) for monitoring:# option 1 pytest # option 2(recommended) pytest src/simmate/workflows/test/test_all_workflow_runs.py -s -
If all tests pass, proceed with the new release. Discard your changes afterwards.