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
6 changes: 3 additions & 3 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ fi
PATH_add "$PWD/.venv/bin"
export VIRTUAL_ENV="$PWD/.venv"

if [ ! -d .venv ]; then
if [ ! -x .venv/bin/prek ]; then
uv sync
fi

if [[ ! -f .git/hooks/pre-commit ]] || ! grep -q pre-commit .git/hooks/pre-commit 2>/dev/null; then
pre-commit install --install-hooks
if [[ ! -f .git/hooks/pre-commit ]] || ! grep -q prek .git/hooks/pre-commit 2>/dev/null; then
prek install --prepare-hooks -f
Comment thread
joshuarli marked this conversation as resolved.
Resolved
fi
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
- name: Install dependencies
run: uv sync
- name: Pre-commit
run: uv run pre-commit run --all-files
run: uv sync --frozen
- name: Prek
run: .venv/bin/prek run --all-files --show-diff-on-failure
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ repos:
language: system
types: [shell]
args: [--norc]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
- repo: builtin
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Python CLI that manages Docker Compose and supervisor dependencies for Sentry se

## Commands

- Set up: `direnv allow`. [.envrc](.envrc) runs `uv sync` and installs the pre-commit hooks.
- Set up: `direnv allow`. [.envrc](.envrc) runs `uv sync` and installs the prek hooks.
- Test: `pytest -n4`. Tests marked `integration` call real GitHub.
- Lint, format, and type check: `pre-commit run --all-files` (ruff, mypy, shellcheck).
- Lint, format, and type check: `prek run --all-files` (ruff, mypy, shellcheck).

## Invariants

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev = [
"build",
"freezegun",
"mypy",
"pre-commit",
"prek>=0.5.10",
"pytest>=9.0.3",
"pytest-cov",
"ruff",
Expand Down
109 changes: 14 additions & 95 deletions uv.lock

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

Loading