-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
70 lines (55 loc) · 1.56 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
70
clean:
rm -rf python/sentry_kafka_schemas/schema_types/ *.egg-info dist/
.PHONY: clean
install-build-requirements:
pip install -r python/requirements-build.txt
# the script also imports the python library, so dependencies need to be preinstalled
pip install -r python/requirements.txt
yarn
.PHONY: install-build-requirements
python/sentry_kafka_schemas/schema_types: schemas/ topics/ install-build-requirements
python python/generate_python_types.py
view-rust-types:
cargo run --features build_deps --bin generate-schema-types
.PHONY: view-rust-types
build: python/sentry_kafka_schemas/schema_types
pip install wheel
python setup.py sdist bdist_wheel
.PHONY: build
install: python/sentry_kafka_schemas/schema_types
pip install -e .
pip install -r python/requirements-test.txt
.PHONY: install
format:
black python/ scripts/ docs/
isort --overwrite-in-place python/ scripts/ docs/
cargo fmt
yarn prettier --write .
.PHONY: format
type-checking:
mypy scripts/ python/ --strict --config-file python/mypy.ini
.PHONY: type-checking
types: type-checking
.PHONY: types
lint: lint-python
.PHONY: lint
lint-python:
flake8 python/ scripts/ docs/
.PHONY: lint-python
lint-rust:
cargo clippy -- -W clippy::pedantic
.PHONY: lint-rust
tests:
pytest -n auto python/ -vv
.PHONY: tests
tests-rust:
cargo test
.PHONY: tests-rust
install-docs:
pip install -U -r python/requirements-doc.txt
.PHONY: install-docs
docs: install install-docs
mkdir -p build/
python docs/source/generate_services.py > build/services.rst.inc
sphinx-build -b html docs/source docs/build
.PHONY: docs