Pull request step-by-step#
The preferred workflow for contributing to ArviZ 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 ArviZ repo from your GitHub account to your local disk.
$ git clone email@example.com:<your GitHub handle>/arviz.git
$ git clone https://github.com/<your GitHub handle>/arviz.git
Navigate to your arviz directory and add the base repository as a remote:
$ cd arviz $ git remote add upstream firstname.lastname@example.org:arviz-devs/arviz.git
$ cd arviz $ git remote add upstream https://github.com/arviz-devs/arviz
featurebranch to hold your development changes:
$ git checkout -b my-feature
Always create a new
featurebranch before making any changes. Make your changes in the
featurebranch. It’s good practice to never routinely work on the
mainbranch of any repository.
Project requirements are in
requirements.txt, and libraries used for development are in
requirements-dev.txt. To set up a development environment, you may (probably in a virtual environment) run:
$ pip install -r requirements.txt $ pip install -r requirements-dev.txt $ pip install -r requirements-docs.txt # to generate docs locally
Develop the feature on your feature branch. Add your changes using git commands,
git addand then
git commit, like:
$ git add modified_files $ git commit -m "commit message here"
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 your GitHub account with:
$ git push -u origin my-feature
Go to the GitHub web page of your fork of the ArviZ repo. Click the ‘Pull request’ button to send your changes to the project’s maintainers for review. This will send an email to the committers.
Now that the PR is ready to submit, check the Pull request checklist.