Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- We use Python 3.12, so ensure that the code is compatible and up to date with this version.
- When adding a new package that requires installation, add it using `uv add <pkg>` so it gets properly declared.
- When running a CLI such as `pytest`, always run it using `uv run`, e.g. `uv run pytest`.
- Always run `uv run pre-commit run --all-files` to determine whether your code is compliant with the pre-commit hooks, including linters.
- Always run `uv run prek run --all-files` to determine whether your code is compliant with the pre-commit hooks, including linters.
- When importing internal modules, do not include the "src" folder in the import path as it is already defined in pyproject.toml
- Limit line length to 100 characters.
- Never create functions that return more than one output value (i.e. Never return tuples). Use dedicated return classes.
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
with:
persist-credentials: false

- name: Setup git user config
run: |
git config --global user.name placeholder
git config --global user.email placeholder@example.com

- name: Set up uv
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
with:
Expand All @@ -48,10 +43,10 @@ jobs:
env:
PYTHON_VERSION: ${{ matrix.python-version }}

- name: Run pre-commit
- name: Run Prek
if: matrix.checks
run: |
uv run pre-commit run --all-files
uv run --frozen prek run --all-files

- name: Run pyright
if: matrix.checks
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ uv sync

### Pre-commit Hooks

This project uses the `pre-commit` framework to manage Git hooks. To install the hooks,
This project uses the `prek` framework to manage Git hooks. To install the hooks,
run:

```shell
uv run pre-commit install
uv run prek install
```

## Testing
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ dev = [
"pip>=25.1.1",
"pre-commit>=4.2.0",
"pre-commit-update>=0.8.0",
"prek>=0.3.3",
"pyinstrument>=5.1.1",
"pyright[nodejs]>=1.1.403",
"ruff>=0.13.2",
Expand Down
8 changes: 4 additions & 4 deletions tasks/scripts/configure_project.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash

output=$(uv pip show pre-commit &> /dev/null)
output=$(uv pip show prek &> /dev/null)
if [ $? -eq 0 ]
then
echo Installing pre-commit hooks...
output=$(uv run pre-commit install 2>&1)
echo Installing prek hooks...
output=$(uv run prek install 2>&1)
if [ $? -ne 0 ]
then
echo "$output"
echo "Error: pre-commit install failed."
echo "Error: prek install failed."
exit 1
fi
fi
Expand Down
28 changes: 28 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.