-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
69 lines (56 loc) · 1.3 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
69
.DEFAULT_GOAL := all
black = black tsdownsample tests
install:
pip install .
.PHONY: install-dev-requirements
install-dev-requirements:
pip install -r tests/requirements.txt
pip install -r tests/requirements-linting.txt
.PHONY: format
format:
ruff --fix tsdownsample tests
$(black)
cargo fmt
.PHONY: lint-python
lint-python:
ruff tsdownsample tests
$(black) --check --diff
.PHONY: lint-rust
lint-rust:
cargo fmt --version
cargo fmt --all -- --check
cargo clippy --version
cargo clippy -- -D warnings -A incomplete_features -W clippy::dbg_macro -W clippy::print_stdout
.PHONY: lint
lint: lint-python lint-rust
.PHONY: mypy
mypy:
mypy tsdownsample
.PHONY: test
test:
pytest --benchmark-skip --cov=tsdownsample --cov-report=term-missing --cov-report=html --cov-report=xml
.PHONY: bench
bench:
pytest --benchmark-only --benchmark-max-time=5
.PHONY: all
all: lint mypy test
.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -f `find . -type f -name '*.cpython-*' `
rm -rf dist
rm -rf build
rm -rf target
rm -rf .cache
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf htmlcov
rm -rf *.egg-info
rm -rf .ruff*
rm -f .coverage
rm -f .coverage.*
rm -rf build
rm -f tsdownsample/*.so