-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
125 lines (89 loc) · 3.08 KB
/
Copy pathjustfile
File metadata and controls
125 lines (89 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# Show all available recipes.
default:
@just --list
# Install project and dev dependencies, then install pre-commit hooks.
install:
uv sync --dev
uv run pre-commit install --hook-type pre-commit --hook-type pre-push
# Install pre-commit hooks only (run after cloning if hooks are missing).
hooks:
uv run pre-commit install --hook-type pre-commit --hook-type pre-push
# Upgrade lockfile to latest compatible versions.
update-lock:
uv lock --upgrade
# Run API with project defaults from settings.
run:
uv run taxtracker
# Frontend workflows (pnpm + Oxc).
frontend-install:
cd frontend && pnpm install
frontend-dev:
cd frontend && pnpm dev
frontend-build:
cd frontend && pnpm build
frontend-test:
cd frontend && pnpm test
frontend-test-e2e:
cd frontend && pnpm test:e2e
frontend-typecheck:
cd frontend && pnpm typecheck
frontend-lint:
cd frontend && pnpm lint
frontend-lint-fix:
cd frontend && pnpm lint:fix
frontend-format:
cd frontend && pnpm format:fix
frontend-check:
cd frontend && pnpm lint && pnpm typecheck && pnpm test && pnpm build
# Run API with explicit host/port overrides.
run-host host="127.0.0.1" port="8000":
uv run uvicorn taxtracker.cli.app:app --reload --host {{host}} --port {{port}}
# Run full test suite (coverage threshold enforced by pytest config).
test:
uv run pytest
test-unit:
uv run pytest tests/unit
test-integration:
uv run pytest tests/integration
# Enforce a separate high bar for calculation and data services.
test-services:
uv run pytest --override-ini='addopts=--cov=taxtracker.services.tax_calculator --cov=taxtracker.services.projections --cov=taxtracker.services.w4_calculator --cov=taxtracker.services.w4_withholding --cov=taxtracker.services.record_tax_calculator --cov-report=term-missing --cov-fail-under=90 -q'
test-fast:
uv run pytest -m "not slow"
test-file file:
uv run pytest {{file}}
test-name file pattern:
uv run pytest {{file}} -k {{pattern}}
# Linting and formatting.
lint:
uv run ruff check src/ tests/ scripts/
lint-fix:
uv run ruff check --fix src/ tests/ scripts/
format:
uv run ruff format src/ tests/ scripts/
format-check:
uv run ruff format --check src/ tests/ scripts/
# Static type checking.
typecheck:
uv run ty check
# Dependency vulnerability scan.
security:
uvx uv-secure
# Refresh local PSLmodels validation data.
psl-snapshot:
uv run python scripts/fetch_pslmodels_data.py snapshot
# Generate draft tax data for a target year.
psl-draft year:
uv run python scripts/fetch_pslmodels_data.py draft --year {{year}}
# Focused PSLmodels cross-validation test.
test-psl:
uv run pytest tests/unit/test_pslmodels_cross_check.py -v
# CI-style local gates.
check: format-check lint typecheck test-fast frontend-check
ci: lint typecheck test frontend-check
# Remove common local caches and coverage outputs.
clean:
rm -rf .pytest_cache .ruff_cache .mypy_cache htmlcov .coverage
# Full App Run that includes frontend build with api static hosting
app: frontend-build run