Contributions to the package are very welcome!
The preferred workflow for contributing to Kulprit is to fork the GitHub repository, clone it to your local machine, and develop on a feature branch.
-
Fork the project repository by clicking on the 'Fork' button near the top right of the main repository page. This creates a copy of the code under your GitHub user account.
-
Clone your fork of the Kulprit repo from your GitHub account to your local disk, and add the base repository as a remote:
git clone [email protected]:<your GitHub handle>/kulprit.git cd pymc git remote add upstream [email protected]:bambinos/kulprit.git
-
Create a
feature
branch to hold your development changes:git checkout -b my-feature
Always use a
feature
branch. It's good practice to never routinely work on themain
branch of any repository. -
Project requirements are in
requirements.txt
, and libraries used for development are inrequirements-dev.txt
. The easiest (and recommended) way to set up a development environment is via miniconda:conda create --name kulprit-dev
conda activate kulprit-dev pip install -e . pip install -r requirements-dev.txt
-
Develop the feature on your feature branch.
git checkout my-feature # no -b flag because the branch is already created
-
Before committing, run
pre-commit
checks.pip install pre-commit pre-commit install
-
Add changed files using
git add
and thengit commit
files:$ git add modified_files $ git commit
to record your changes locally.
-
After committing, it is a good idea to sync with the base repository in case there have been any changes:
git fetch upstream git rebase upstream/main
Then push the changes to the fork in your GitHub account with:
git push -u origin my-feature
-
Go to the GitHub web page of your fork of the PyMC repo. Click the 'Pull request' button to send your changes to the project's maintainers for review. This will send a notification to the committers.