-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (70 loc) · 1.8 KB
/
Makefile
File metadata and controls
96 lines (70 loc) · 1.8 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.PHONY: package release test lint format build clean version publish
all: package
# Packaging (using Hatch)
build:
hatch build
package: build
build-clean:
hatch clean
hatch build
# Publishing (using Hatch)
publish: build
hatch publish
publish-test: build
hatch publish --repo test
# Version management (using Hatch)
version:
hatch version
version-patch:
hatch version patch
version-minor:
hatch version minor
version-major:
hatch version major
# Clean
clean:
hatch clean
rm -rf dist build pyspacemouse.egg-info .ruff_cache
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
rm -f .coverage coverage.xml
# Development
install-dev:
hatch run pip install --editable ".[dev]"
# Code Quality
lint:
hatch run ruff check .
format:
hatch run ruff format .
format-check:
hatch run ruff format --check .
# Testing
test: # FIXME!
hatch run test:pytest
test-cov: # FIXME!
hatch run test:pytest --cov-report=html
run-demo:
hatch run python ./examples/01_basic.py
# Pre-commit
pre-commit-install:
pre-commit install
pre-commit-run:
pre-commit run --all-files
# Documentation, using mkdocs and mkdoxy
install-doxygen:
@command -v doxygen >/dev/null || (echo "Please install doxygen (apt/dnf/brew)" && exit 1)
fixRelativeLinkDocs:
sed 's/\.\/docs/\./g' README.md > docs/README.md
sed 's/\.\/docs/\./g' CONTRIBUTING.md > docs/CONTRIBUTING.md
sed 's/\.\/docs/\./g' troubleshooting.md > docs/troubleshooting.md
# Docs
docs-build: install-doxygen fixRelativeLinkDocs
@echo "Building docs..."
hatch run dev:mkdocs build
docs-serve: install-doxygen fixRelativeLinkDocs
@echo "Serving docs..."
hatch run dev:mkdocs serve
docs-deploy: install-doxygen fixRelativeLinkDocs
@echo "Deploying docs..."
hatch run dev:mkdocs gh-deploy