-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
74 lines (53 loc) · 1.57 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
71
72
73
74
SHELL := /bin/bash
PROJECT := graphsense-lib
VENV := venv
RELEASE := 'v25.01.0'
RELEASESEM := 'v2.4.7'
all: format lint test build
tag-version:
-git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASESEM) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1)
git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASE) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1)
dev:
pip install -e .[dev] --force-reinstall --upgrade
pre-commit install
test:
pytest -v -m "not slow" --cov=src
test-all:
pytest --cov=src
install-dev:
pip install -e .[dev] --force-reinstall --upgrade
install:
pip install .
lint:
flake8 tests src
format:
isort --profile black src
black tests src
docs:
tox -e docs
docs-latex:
tox -e docs-latex
pre-commit:
pre-commit run --all-files
build:
tox -e clean
tox -e build
tpublish: build version
tox -e publish
publish: build version
tox -e publish -- --repository pypi
version:
python -m setuptools_scm
generate-tron-grpc-code:
python -m grpc_tools.protoc\
--python_out=./src/\
--grpc_python_out=./src/\
--proto_path=./src/\
./src/graphsenselib/ingest/tron/grpc/api/tron_api.proto
python -m grpc_tools.protoc\
--python_out=./src/\
--proto_path=./src/\
./src/graphsenselib/ingest/tron/grpc/core/*.proto
click-bash-completion:
_GRAPHSENSE_CLI_COMPLETE=bash_source graphsense-cli
.PHONY: all test install lint format build pre-commit docs test-all docs-latex publish tpublish tag-version click-bash-completion generate-tron-grpc-code