This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathMakefile
73 lines (60 loc) · 1.39 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
.DEFAULT_GOAL := build
.PHONY: check
check: lint
.PHONY: lint
lint:
poetry check -v
poetry run mypy --show-error-codes .
poetry run black --check .
poetry run isort -c .
poetry run flake8 pybotics tests examples
poetry run vulture --min-confidence 80 --sort-by-size pybotics tests examples
.PHONY: debug
debug:
@echo "Git version: $(shell git describe --tags)"
poetry debug
.PHONY: format
format:
poetry run black .
poetry run isort .
.PHONY: test-all
test-all: test test-examples test-notebooks
.PHONY: test
test:
PYTHONPATH=. \
poetry run pytest \
--cov=pybotics \
--cov-report term-missing \
--cov-config .coveragerc \
--verbose
.PHONY: test-notebooks
test-notebooks: examples/*.ipynb
for file in $^; do \
poetry run jupyter nbconvert --to=html --execute $${file}; \
done
.PHONY: test-examples
test-examples: examples/*.py
for file in $^; do \
poetry run python $${file}; \
done
.PHONY: build
build:
# bump local package version to match git tag and build package
poetry version $(shell git describe --tags --abbrev=0)
poetry build
.PHONY: paper
paper:
cd paper && \
pandoc paper.md \
-o paper.pdf \
--bibliography=paper.bib
.PHONY: docs
docs: docs-api
poetry run sphinx-build \
-b html docs docs/_build
.PHONY: docs-api
docs-api:
poetry run sphinx-apidoc -o docs --separate pybotics
.PHONY: serve-docs
docs-autobuild:
poetry run sphinx-autobuild docs docs/_build