Skip to content

Commit

Permalink
Update CONTRIBUTING.md to document rye usage (#347)
Browse files Browse the repository at this point in the history
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Co-authored-by: Mattt Zmuda <mattt@replicate.com>
  • Loading branch information
aron and mattt authored Sep 12, 2024
1 parent 0043199 commit e051739
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ You can also create a git hook which will sign off all your commits automaticall

First, create the hook file and make it executable:

```sh
```console
cd your/checkout/of/replicate-python
touch .git/hooks/prepare-commit-msg
chmod +x .git/hooks/prepare-commit-msg
```

Then paste the following into the file:

```
```sh
#!/bin/sh

NAME=$(git config user.name)
Expand All @@ -86,18 +86,15 @@ git interpret-trailers --if-exists doNothing --trailer \

## Development

To run the tests:
The Python project is managed using [`rye`](https://rye.astral.sh).
Run the setup script to install Rye and install the project's dependencies.

```sh
pip install -r requirements-dev.txt
pytest
```console
./script/setup
```

To install the package in development:

```sh
pip install -e .
```
You can run the `format`, `lint`, and `test` scripts before commiting
to validate your changes locally before going through CI.

### Environment variables

Expand Down
2 changes: 1 addition & 1 deletion script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ then
case "$REPLY" in
[yY])
echo "Installing rye..."
curl -sSf https://rye-up.com/get | sh
curl -sSf https://rye.astral.sh/get | sh
echo "rye has been successfully installed."
;;
*)
Expand Down

0 comments on commit e051739

Please sign in to comment.