-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (43 loc) · 1.53 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
all: setup examples
.PHONY: clean examples
EXAMPLES = $(wildcard examples/*.py)
setup:
@echo "Setting up environment..."
@python3 -m pip install -q --upgrade pip
@python3 -m pip install -qr requirements.txt -U
@python3 -m pip install -qr requirements-doc.txt -U
@python3 -m pip install -qr requirements-test.txt -U
@echo "Installing/updating dev tools..."
@python3 -m pip install -q ruff twine -U
examples: setup
@for file in $(EXAMPLES); do \
echo "building example: $$file"; \
PYTHONPATH=. python $$file; \
done
profile: setup
PYTHONPATH=. python -m cProfile -o output.prof examples/kitchen_sink.py
snakeviz output.prof
docs: setup clean
@cd docs && make html
@open docs/build/html/index.html
clean:
@rm -f output.prof
@rm -rf htmlcov
@rm -rf build dist *.egg-info __pycache__
cd docs && make clean
format:
@ruff format report_creator
@ruff check report_creator
@python scripts/utils/ruffen-docs.py README.md
release: setup clean
@find ./ -name '*.pyc' -exec rm -f {} \;
@find ./ -name 'Thumbs.db' -exec rm -f {} \;
@find ./ -name '*~' -exec rm -f {} \;
@python3 setup.py sdist bdist_wheel
@twine upload dist/*
tests: setup
@python3 -c 'import report_creator; print(report_creator.__version__)'
@python3 -m pytest -vs --cov=report_creator --cov-report=html
.PHONY: targets
targets:
@LC_ALL=C $(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'