forked from skinnider/NPS-generation
-
Notifications
You must be signed in to change notification settings - Fork 5
Developer Setup
Vineet Bansal edited this page Aug 27, 2024
·
4 revisions
To contribute to CLM, follow these guidelines to set up a local environment for running the application.
- Conda (miniconda or anaconda)
-
Create a new conda environment named
clmwith Python version 3.10.conda create --name clm python=3.10 pip -
Activate the environment.
conda activate clmThe command prompt will change to indicate the new conda environment by prepending
(clm). -
When you are done with the development, deactivate the
clmenvironment and return to(base)by the following command:conda deactivate
-
Clone the repository and enter it:
git clone git@github.com:skinniderlab/CLM.git cd CLM -
Install the package in editable mode and any optional dependencies:
pip install -e .[dev]
This step is crucial to see if clm is working correctly.
cd <path/to/repo/clone>
pytest
- Make sure that
clmis installed in editable mode as described above. Start a new branch, prefixed with your initials (e.g.jd/)
cd <path/to/repo/clone>
git checkout -b jd/my_awesome_branch
- 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
-
Tweak/modify the code, make
clmbetter! Send a PR towards themasterbranch.
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.