Skip to content

Commit

Permalink
[DOC] Move pre-commit setup to README.md (#368)
Browse files Browse the repository at this point in the history
* Add pre-commit setup to README.md
  • Loading branch information
alyssadai authored Oct 31, 2024
1 parent 03c4e1f commit 41d87d4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,18 @@ that is as close as possible to the environment we run in production.
Confirm that everything works well by running the tests:
`pytest .`

### Update python lock-file
### Setting up code formatting and linting (recommended)

[pre-commit](https://pre-commit.com/) is configured in the development environment for this repository, and can be set up to automatically run a number of code linters and formatters on any commit you make according to the consistent code style set for this project.

Run the following from the repository root to install the configured pre-commit "hooks" for your local clone of the repo:
```bash
pre-commit install
```

pre-commit will now run automatically whenever you run `git commit`.

### Updating Python lock-file
The `requirements.txt` file is automatically generated from the `setup.cfg`
constraints. To update it, we use `pip-compile` from the `pip-tools` package.
Here is how you can use these tools to update the `requirements.txt` file.
Expand Down

0 comments on commit 41d87d4

Please sign in to comment.