-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (38 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
.PHONY: develop test install-python-dependencies install-py-dev
reset-python:
pre-commit clean
rm -rf .venv
.PHONY: reset-python
develop: install-python-dependencies install-rs-dev
test:
OPHIO_SETTINGS=test pytest -vv tests -v -m "not ci_only"
tests: test
# install-rs-dev/install-py-dev mimick sentry's naming conventions
INDEX_URL=--index-url https://pypi.devinfra.sentry.io/simple
install-python-dependencies:
pip install $(INDEX_URL) -r requirements-build.txt
pip install $(INDEX_URL) -r requirements.txt
pip install $(INDEX_URL) -e .
.PHONY: install-python-dependencies
install-rs-dev:
@which cargo || (echo "!!! You need an installation of Rust in order to develop ophio. Go to https://rustup.rs to get one." && exit 1)
. scripts/rust-envvars && maturin develop
.PHONY: install-rs-dev
install-py-dev: install-python-dependencies
.PHONY: install-py-dev
test-rust:
. scripts/rust-envvars && \
cargo test --workspace
.PHONY: test-rust
lint-rust:
. scripts/rust-envvars && \
cargo clippy --workspace --all-targets --no-deps -- -D warnings
.PHONY: lint-rust
format-rust:
. scripts/rust-envvars && \
cargo +stable fmt --all
.PHONY: format-rust
format-rust-ci:
. scripts/rust-envvars && \
cargo +stable fmt --all --check
.PHONY: format-rust-ci