Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/prek.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Prek checks
on: [push, pull_request]

jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: j178/prek-action@v2
6 changes: 3 additions & 3 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ One of the best ways is follow [maturin offical documentation](https://www.matur
```bash
> python3 -m venv .venv
> source .venv/bin/activate
> pip install -U pip maturin pre-commit pytest pytest-anyio pydantic pgpq
> pip install -U pip maturin prek pytest pytest-anyio pydantic pgpq
```

Then you need to build `PSQLPy` project.
Expand All @@ -33,12 +33,12 @@ maturin develop
After this step project is built and installed in your python environment you created in previous step.

## Linting and type checking
We have pre-commit configured with all our settings. We highly recommend you to install it as a git hook using pre-commit install command.
We have prek configured with all our settings. We highly recommend you to install it as a git hook using prek install command.

But even without installation, you can run all lints manually:

```bash
pre-commit run -a
prek run -a
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion psqlpy-stress/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ piccolo = "^1.12.0"


[tool.poetry.group.dev.dependencies]
pre-commit = "*"
prek = "*"
mypy = "*"
ruff = "*"

Expand Down
Loading