-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 985 Bytes
/
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
DEFAULT_GOAL := help
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
.PHONY: install
install: ## Install dev requirements into the current python environment
pip install -r requirements-dev.txt
pre-commit install
pre-commit install --hook-type commit-msg
.PHONY: build-dev
build-dev: ## Build the package in debug and install it into the virtualenv
maturin develop
.PHONY: build
build: ## Build the optimised release binaries
maturin build -r
.PHONY: lint
lint: ## Run linting checks with cargo, flake8, isort, and black
cargo fmt --check
cargo clippy -- -D warnings
flake8 python/
black --check python/
isort -c python/
.PHONY: test
test: build ## Run the test suite using cargo and pytest
cargo test
pytest tests
.PHONY: bench-py
bench-py: build ## Run the Python benchmarks
pytest benches/bench.py --benchmark-columns="min, max, mean, median"
.PHONY: bench-rs
bench-rs: ## Run the Rust benchmarks
cargo bench