-
Couldn't load subscription status.
- Fork 84
Developer Setup
To contribute to cryoDRGN, we recommend the following steps:
-
Clone and check out the
developbranch ofcryoDRGN. -
Create and activate a new conda environment with Python 3.8 or 3.9 (preferred)
conda create --name cryodrgn python=3.9 && conda activate cryodrgn
-
Start a new branch, install
cryoDRGNin developer mode, with thedevextras.
cd <path_to_cryodrgn_repo>
git checkout -b <your_awesome_branch_name>
pip install -e .[dev]
- Install the pre-commit hook. This will allow you to identify style/formatting/coding issues every time you commit your code. Pre-commit automatically formats the files in your repository according to certain standards, and/or warns you if certain best practices are not followed.
pre-commit install
- Run the unit tests. This step may take a few minutes, but this is crucial to see if
cryoDRGNis working correctly.
pytest tests
If any tests fail, do not proceed, but carefully go through the above procedure. Contact us on Github issues if you still can't figure it out.
-
Tweak/modify the code, make
cryoDRGNbetter! -
Add new tests for any features you add. Re-run the unit tests to make sure you didn't break anything.
pytest tests
- Push your code to Github; send a PR towards the
developbranch. We intend to follow the Gitflow workflow to accept contributions tocryoDRGNand release new versions.
Our CI will automatically run the pre-commit and pytest steps for PRs towards the protected branches, so running these steps on your local installation will prevent surprises for you later.
Thank you for contributing to cryoDRGN!