Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.68 KB
/
Copy pathMakefile
File metadata and controls
45 lines (37 loc) · 1.68 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
lint:
python -m pip install --upgrade pip uv
python -m uv pip install --quiet --upgrade pycln isort ruff yamllint
# python -m yamllint .
python -m ruff check --fix --exit-zero
python -m pycln .
python -m isort .
python -m ruff format orso
update:
python -m pip install --upgrade pip uv
python -m uv pip install --upgrade -r tests/requirements.txt
python -m uv pip install --upgrade -r requirements.txt
test:
python -m pip install --quiet --upgrade pytest coverage
python -m coverage run -m pytest --color=yes
python -m coverage report --include=orso/** --fail-under=60 -m
ci:
python -m pip install --quiet --upgrade mypy
python -m mypy --ignore-missing-imports --python-version 3.10 --no-strict-optional --check-untyped-defs orso
compile:
python -m pip install --upgrade pip uv
python -m uv pip install --upgrade setuptools nanobind
python setup.py build_ext --inplace
# Vendored draken headers (DESIGN.md §2, §3). `sync-draken` copies them from an
# opteryx-core checkout (default ../opteryx-core, override with DRAKEN_SOURCE=path) and
# records the commit in native/draken/SOURCE; `check-draken` fails if the copy has
# drifted from that record. Never edit the copies by hand.
sync-draken:
python tools/sync_draken.py $(if $(DRAKEN_SOURCE),--source $(DRAKEN_SOURCE))
check-draken:
python tools/sync_draken.py --check
# Micro-benchmarks. `make bench` prints the table; BASELINE=path compares against a
# saved run; `make bench-baseline` records one for the current version.
bench:
python benchmarks/bench.py $(if $(BASELINE),-c $(BASELINE)) $(if $(FILTER),-k $(FILTER))
bench-baseline:
python benchmarks/bench.py -o benchmarks/baseline_$$(python -c 'import orso; print(orso.__version__)').json