Skip to content

Commit

Permalink
fix pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
phlmn committed Jan 8, 2025
1 parent 9d1c370 commit 1bd63ed
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
25 changes: 12 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
exclude: .*/pnpm-lock.yaml$
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -30,39 +29,39 @@ repos:
hooks:
- id: backend-pyright
name: Run typechecker for backend
entry: pdm run -p backend/ pyright backend/transcribee_backend
entry: poe -C worker/ pyright
language: system
files: backend/.*
pass_filenames: false
- repo: local
hooks:
- id: worker-pyright
name: Run typechecker for worker
entry: pdm run -p worker/ pyright worker/transcribee_worker
entry: poe -C worker/ pyright
language: system
files: worker/.*
pass_filenames: false
- repo: local
hooks:
- id: backend-openapi
name: update openapi-schema of the backend
entry: pdm run -p backend/ generate_openapi --file openapi-schema.yml
entry: poe -C backend/ generate_openapi --file openapi-schema.yml
language: system
files: backend/.*
pass_filenames: false
- repo: local
hooks:
- id: backend-tests
name: run backend tests
entry: pdm run -p backend/ test
entry: poe -C backend/ test
language: system
files: backend/.*
pass_filenames: false
- repo: local
hooks:
- id: backend-tests
name: run worker tests
entry: pdm run -p worker/ test
entry: poe -C worker/ test
language: system
files: worker/.*
pass_filenames: false
Expand All @@ -72,39 +71,39 @@ repos:
hooks:
- id: eslint
name: eslint
entry: pnpm --prefix frontend/ run check:eslint
entry: npm --prefix frontend/ run check:eslint
language: system
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
pass_filenames: false
- repo: local # openapi-schema typescript from the openapi-schema of the backend
hooks:
- id: openapi-typescript
name: openapi-typescript
entry: pnpm --prefix frontend/ run generate-openapi
entry: npm --prefix frontend/ run generate-openapi
language: system
files: backend/openapi-schema.yml
pass_filenames: false
- repo: local
hooks:
- id: tsc
name: tsc
entry: pnpm --prefix frontend/ run check:tsc
entry: npm --prefix frontend/ run check:tsc
language: system
files: frontend/.*
pass_filenames: false
- repo: local
hooks:
- id: format
name: format
entry: pnpm --prefix frontend/ run format
entry: npm --prefix frontend/ run format
language: system
files: frontend/.*
pass_filenames: false
- repo: local
hooks:
- id: pnpm_test
name: pnpm test
entry: pnpm --prefix frontend/ run test
- id: npm_test
name: npm test
entry: npm --prefix frontend/ run test
language: system
files: frontend/.*
pass_filenames: false
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ create_api_token = "scripts/create_api_token.py"
reset_task = "scripts/reset_task.py"
generate_openapi = "python -m scripts.generate_openapi"
test = "pytest tests/"
pyright = "pyright transcribee_backend/"

[tool.setuptools]
packages = ["transcribee_backend"]
Expand Down
4 changes: 2 additions & 2 deletions packaging/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ trap 'kill 0' SIGINT

pids=()

uv --directory backend sync & pids+=($!)
uv --directory worker sync & pids+=($!)
uv --directory backend sync --dev & pids+=($!)
uv --directory worker sync --dev & pids+=($!)
npm --prefix frontend/ install & pids+=($!)

# Wait until all install commands are finished
Expand Down
1 change: 1 addition & 0 deletions worker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ transcribee-worker = "transcribee_worker.run:main"
[tool.poe.tasks]
start = "transcribee-worker"
test = "pytest tests/"
pyright = "pyright transcribee_worker/"

[tool.uv]
override-dependencies = [
Expand Down

0 comments on commit 1bd63ed

Please sign in to comment.