Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (54 loc) · 2.53 KB
/
Copy pathMakefile
File metadata and controls
76 lines (54 loc) · 2.53 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
SHELL := /bin/bash
.PHONY: benchmark benchmark-budget benchmark-profile catalogue-check catalogue-generate check check-ci check-rust develop-native native-corpus-generate self-check skills skills-content-check test test-e2e test-integration test-rust test-unit verify
BENCHMARK_PROJECT ?= ../sqlbuild
BENCHMARK_RUNS ?= 5
benchmark:
uv run python -m scripts.benchmark_check --project "$(BENCHMARK_PROJECT)" --runs "$(BENCHMARK_RUNS)"
benchmark-budget:
uv run python -m scripts.perfbudget_check
benchmark-profile:
uv run python -m scripts.benchmark_check --project "$(BENCHMARK_PROJECT)" --profile
catalogue-check:
uv run python -m scripts.catalogue_generate --check
catalogue-generate:
uv run python -m scripts.catalogue_generate
check: catalogue-check
uv run ruff format .
uv run ruff check --fix .
uv run ty check src tests scripts
@if command -v cargo >/dev/null; then uv run fensu check; else uv run fensu check --target python; fi
@command -v cargo >/dev/null && $(MAKE) --no-print-directory check-rust || true
check-ci: catalogue-check
uv run ruff format --check .
uv run ruff check .
uv run ty check src tests scripts
uv run fensu check
$(MAKE) --no-print-directory check-rust
check-rust:
cargo fmt --check
cargo clippy --all-targets --quiet -- -D warnings
cargo run -p fensu-cli --quiet -- check --target rust
test-rust:
cargo test --all --quiet
develop-native:
uv sync --reinstall-package fensu
native-corpus-generate:
PYTHONPATH=. FENSU_CORE_FIXTURE_OUTPUT=crates/fensu-native/tests/rules/fixtures/generated_rules.jsonl FENSU_CORE_PROJECT_FIXTURE_OUTPUT=crates/fensu-native/tests/rules/fixtures/project_rules.jsonl uv run pytest tests/unit/src/fensu/rules tests/integration/src/fensu/rules -q -n auto --dist loadfile -p scripts.native_corpus._helpers.capture_plugin
.PHONY: native-project-corpus-generate
native-project-corpus-generate:
PYTHONPATH=. FENSU_CORE_PROJECT_FIXTURE_OUTPUT=crates/fensu-native/tests/rules/fixtures/project_rules.jsonl uv run pytest tests/integration/src/fensu/rules/exemplars/main/annotations/test_parameter_annotation.py tests/integration/src/fensu/rules/exemplars/test_reachability.py -q -n auto --dist loadfile -p scripts.native_corpus._helpers.capture_plugin
self-check:
uv run fensu check
skills:
uv run fensu skills
skills-content-check:
cargo test -p fensu-cli --test skills --quiet
test:
uv run pytest tests -q -n auto
test-unit:
uv run pytest tests/unit -q -n auto
test-integration:
uv run pytest tests/integration -q -n auto
test-e2e:
uv run pytest tests/e2e -q -n auto
verify: check-ci test