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
28 changes: 0 additions & 28 deletions .github/workflows/qodana_code_quality.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Pre-commit hooks for OpenMLR
# Install: make hooks
# Run manually: make hooks-run

repos:
# ── Backend (Python) ── ruff linter + formatter ──
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff
name: ruff lint (backend)
args: [--fix]
files: ^backend/
- id: ruff-format
name: ruff format (backend)
files: ^backend/

# ── Frontend (TypeScript/React) ── eslint ──
- repo: local
hooks:
- id: eslint
name: eslint (frontend)
entry: bash -c 'cd frontend && npx eslint --max-warnings 50 "$@"' --
language: system
files: ^frontend/src/.*\.(ts|tsx)$
types: [file]
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ install-backend: ## Install Python backend dependencies
install-frontend: ## Install frontend dependencies
cd $(FRONTEND) && pnpm install

# ─── Git Hooks ────────────────────────────────────────────

.PHONY: hooks
hooks: ## Install pre-commit hooks (ruff + eslint)
cd $(BACKEND) && uv run pre-commit install

.PHONY: hooks-run
hooks-run: ## Run all pre-commit hooks on entire repo
cd $(BACKEND) && uv run pre-commit run --all-files

.PHONY: hooks-update
hooks-update: ## Update pre-commit hook versions
cd $(BACKEND) && uv run pre-commit autoupdate

# ─── Development ──────────────────────────────────────────

.PHONY: dev
Expand Down
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ dev-dependencies = [
"aiosqlite>=0.20.0",
"httpx>=0.28.0",
"ruff>=0.8.0",
"pre-commit>=4.0.0",
]

[tool.ruff]
Expand Down
14 changes: 0 additions & 14 deletions qodana.yaml

This file was deleted.

Loading