Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
add pre-commit instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored and skrawcz committed Nov 1, 2022
1 parent 4ea33c9 commit 223c4de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions developer_setup.md
Expand Up @@ -32,6 +32,12 @@ pip install \
-r ./requirements-test.txt
```

Set up `pre-commit`, which will run some lightweight formatting and linting tasks on every commit.

```shell
pre-commit install
```

### Create a pull request

Make sure your local copy of the `main` branch is up to date with the official `hamilton` repo.
Expand All @@ -47,7 +53,7 @@ git push origin main
Create a new branch.

```shell
git checkout -b feat/somme-feature
git checkout -b feat/some-feature
```

Make changes, commit them, and push them to your fork.
Expand All @@ -56,7 +62,13 @@ Make changes, commit them, and push them to your fork.
git push origin HEAD
```

Test your changes locally by following the steps in ["How to run unit tests"](#how-to-run-unit-tests).
Test your changes locally with `pre-commit`...

```shell
pre-commit run --all-files
```

...and by following the steps in ["How to run unit tests"](#how-to-run-unit-tests).

Navigate to https://github.com/stitchfix/hamilton/pulls and open a pull request.

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
@@ -1,6 +1,6 @@
[flake8]
max-line-length = 100
exclude = build/,.git/
exclude = build/,.git/,venv/
ignore =
E203, # whitespace before ':' \
E402, # module level import not at top of file \
Expand Down

0 comments on commit 223c4de

Please sign in to comment.