File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ PYTHON ?= python3
2+
3+ .PHONY : ci ci-lint ci-rust ci-test ci-quality
4+
5+ ci : ci-lint ci-rust ci-test ci-quality
6+
7+ ci-lint :
8+ $(PYTHON ) -m pip install --upgrade pip
9+ pip install pre-commit
10+ pip install -e " .[dev]"
11+ pre-commit run --all-files
12+ ruff check src tests
13+ black --check src tests
14+ mypy src
15+
16+ ci-rust :
17+ cd diffctx && DIFFCTX_YAML_CASES_LIMIT=" 20" cargo test --lib
18+ cd diffctx && cargo build --release
19+ cd diffctx && DIFFCTX_YAML_CASES_LIMIT=" 20" cargo test --release --test yaml_cases
20+ cd diffctx && ./target/release/diffctx-test || true
21+
22+ ci-test :
23+ $(PYTHON ) -m pip install --upgrade pip
24+ pip install " maturin>=1.10,<1.11"
25+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY=" 1" pip install -e " .[dev,full,mcp]" --no-build-isolation
26+ pytest -v --cov=src/diffctx --cov-report=xml \
27+ --cov-report=term-missing --cov-branch --junitxml=test-results.xml
28+ coverage report --fail-under=40
29+
30+ ci-quality :
31+ $(PYTHON ) -m pip install --upgrade pip
32+ pip install -e " .[dev]"
33+ radon cc src/diffctx/ --min B --show-complexity --total-average
34+ radon mi src/diffctx/ --min B --show
35+ radon cc src/diffctx/ --min C --total-average || \
36+ (echo " High complexity detected" && exit 1)
37+ lint-imports
You can’t perform that action at this time.
0 commit comments