Maintainer Guidelines¶
Release Procedure¶
To generate a new release, adhere to these steps:
-
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_filename
insimmate.database.third_parties.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.
-
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. If there were substantial changes, use grayskull to modify the version number, sha256, and dependencies.
-
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 # additionally, ensure spyder can also be installed in the same environment conda install -n my_env -c conda-forge spyder -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
- The
main
branch of the official repo checked out simmate_dev
environment is active- The base Simmate directory as the current working directory
- Clear any custom
~/simmate
configs (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.toml
and 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.py
if needed. -
Run
pytest
again 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.
Website CSS¶
The Hyper theme, as outlined in our main docs here, must be built and hosted separately from any Simmate server due to licensing. To build/host the assets, adhere to these steps:
- Download the Hyper theme (private access): e.g.,
Hyper_v4.6.0.zip
- Unpack the zip file and navigate to this directory:
cd Hyper_v4.6.0/Bootstrap_5x/Hyper/
- Install prerequisites into a new conda environment and activate it:
conda create -n hyper -c conda-forge nodejs yarn git conda activate hyper
- Install gulp using npm (conda install of gulp doesn't work):
npm install gulp -g
- In the main directory, install all Hyper dependencies using the
yarn.lock
file:yarn install
- Edit themes/colors in the following files (e.g., change primary to
#0072ce
):/src/assests/scss/config/saas/ >> go into each folder's _variables.scss
- Build the assets:
gulp build
- Upload assets (in
dist
folder) to your CDN for serving.