-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (41 loc) · 1.34 KB
/
Copy pathMakefile
File metadata and controls
56 lines (41 loc) · 1.34 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
SPHINXOPTS ?= -a -E
SPHINXBUILD ?= uv run --group docs sphinx-build
SPHINXAPIDOC ?= uv run --group docs sphinx-apidoc
SPHINXAPIDOCOPTS ?= -f -e -M -T --remove-old --automodule-options members,undoc-members,show-inheritance,ignore-module-all
SOURCEDIR = docs
BUILDDIR = docs/_build
PYTHON ?= uv run python
DOCS_PORT ?= 8000
.PHONY: setup install sync install-hooks format lint type test test-cov html build-docs docs serve-docs check
setup: sync install-hooks
install: setup
sync:
uv sync
install-hooks:
uv run pre-commit install
format:
uv run ruff format .
lint:
uv run ruff check .
type:
uv run mypy
test:
uv run pytest
test-cov:
uv run pytest --cov=analytics --cov=packages
html:
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs:
$(MAKE) build-docs
build-docs:
$(SPHINXAPIDOC) $(SPHINXAPIDOCOPTS) -o "$(SOURCEDIR)/reference/analytics" src/analytics
$(SPHINXAPIDOC) $(SPHINXAPIDOCOPTS) -o "$(SOURCEDIR)/reference/sources" packages/sources/src/sources
$(SPHINXAPIDOC) $(SPHINXAPIDOCOPTS) -o "$(SOURCEDIR)/reference/pyromap" packages/pyromap/src/pyromap
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" -W --keep-going $(SPHINXOPTS) $(O)
serve-docs: html
$(PYTHON) -m http.server $(DOCS_PORT) --directory "$(BUILDDIR)/html"
check:
uv run ruff format . --check
uv run ruff check .
uv run mypy
uv run pytest