Skip to content

Commit

Permalink
Pull request review instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
agitter committed Aug 18, 2024
1 parent b4f8d51 commit 3eb0479
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,35 @@ Additional hooks are [available](https://github.com/pre-commit/pre-commit-hooks#
These are configured in `.pre-commit-config.yaml`.
SPRAS also runs [`ruff`](https://github.com/charliermarsh/ruff) as part of the pre-commit hooks to perform the Python code analysis, which supports many more [rules](https://beta.ruff.rs/docs/rules/).
These are configured in `pyproject.toml`.

## Reviewing pull requests
Contributors may help review pull requests from other contributors.
Part of the review process includes running the updated code locally.
This requires checking out a branch from the other contributor's fork.

We'll use pull request [170](https://github.com/Reed-CompBio/spras/pull/170) as an example from the `ntalluri` fork with branch `implement-eval`.
First, you need to add the `ntalluri` fork as a git remote from the command line so that you can pull branches from it.
```
git remote add ntalluri https://github.com/ntalluri/spras.git
```
The first `ntalluri` is the name we give to the new remote.
It doesn't have to match the GitHub user name, but that is a convenient convention.

Then, confirm the new remote was added
```
git remote -v
```
You should see the new remote along with your `origin` remote and any others you added previously.
Now you can pull and fetch branches from any of these remotes and push to any remotes where you have permissions.

To checkout the branch in the pull request locally run
```
git fetch ntalluri
git checkout implement-eval
```
Optionally run
```
git log
```
To confirm that the most recent commit matches the most recent commit in the pull request.
Now your local version of SPRAS matches the code in the pull request and you can test the code to confirm it runs as expected.

0 comments on commit 3eb0479

Please sign in to comment.