How to Contribute to Development
Step 1: Set up a development environment (OSX and Linux only)
If needed, install miniconda by following the steps here.
If needed, install mamba:
conda install mambaClone a copy of this repo:
git clone https://gitlab.com/data-analysis5/phenotypes/process.phenotypes.git
# or
git clone git@gitlab.com:data-analysis5/phenotypes/process.phenotypes.git
Navigate into the repo directory:
cd process.phenotypesCreate a conda environment with, minimally, the dependencies defined in
r-dev.yaml. Make sure to activate your dev environment whenever you are writing/committing code!
# create the env
mamba env create -f r-dev.yaml
# activate the env
conda activate r-dev
Install commitizen as follows
npm install -g commitizen cz-conventional-changelog
commitizen init cz-conventional-changelog --save-dev --save-exact
Set up pre-commit hook scripts. This will apply linting and check for some common code formatting errors every time you commit. See https://pre-commit.com/ for more details.
pre-commit install
Install pre-commit in R (either in an R terminal or in Rstudio):
install.packages("precommit")
Step 2: Select an issue to work on, or submit one that you’d like to address
See the current issues for this project.
Step 3: Contribute code
All development work should branch off of the
devbranch. Make sure you’re on the right branch:git checkout devMake sure your repository is up-to-date with the remote:
git pull origin devCreate a new branch named for the feature you’re going to work on:
git checkout <feature_branch>Write code and commit often!
Stage changes with
git add .Commit code with
git cz; make sure to cite the issue number you’re working onPush your changes to the remote repository with
git push origin <feature_branch>
When you’re all done, submit a merge request here. Other developers will review your code, make comments, and merge in your changes when ready!