Skip to content
Vineet Bansal edited this page Jun 6, 2023 · 2 revisions

To contribute to cryoDRGN, we recommend the following steps:

  • Clone and check out the develop branch of cryoDRGN.

  • 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 cryoDRGN in developer mode, with the dev extras.
          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 cryoDRGN is 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 cryoDRGN better!

  • 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 develop branch. We intend to follow the Gitflow workflow to accept contributions to cryoDRGN and 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!

Clone this wiki locally