-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
68 lines (49 loc) · 1.25 KB
/
Makefile
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
.PHONY: lint format dev-setup dev-install prod-install test install-test-requirements benchmarks
# Commands
## Python
ruff = ruff check python/ *.py
format = ruff format python/ *.py
mypy = mypy python/ *.py
pytest = pytest -v
## Rust
clippy = cargo clippy
fmt = cargo fmt
cargo-test = cargo test --no-default-features --features tests
## Docs
pdoc = pdoc -o docs python/fastexcel
lint-python:
$(ruff)
$(format) --check --diff
$(mypy)
lint-rust:
$(clippy)
lint: lint-rust lint-python
format-python:
$(ruff) --fix
$(format)
format-rust:
$(fmt)
$(clippy) --fix --lib -p fastexcel --allow-dirty --allow-staged
format: format-rust format-python
install-build-requirements:
pip install -U -r build-requirements.txt
install-test-requirements: install-build-requirements
uv pip install -U -r test-requirements.txt
install-doc-requirements: install-build-requirements
uv pip install -r doc-requirements.txt
dev-setup: install-test-requirements install-doc-requirements
pre-commit install
dev-install:
maturin develop --uv -E pandas,polars
prod-install:
./prod_install.sh
test-rust:
$(cargo-test)
test-python:
$(pytest)
test: test-rust test-python
doc:
$(pdoc)
test-ci: dev-install test
benchmarks: prod-install
pytest ./python/tests/benchmarks/speed.py