-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (61 loc) · 1.56 KB
/
Makefile
File metadata and controls
78 lines (61 loc) · 1.56 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
# Load environment variables from the `.env` file if it exists.
ifneq (,$(wildcard .env))
include .env
endif
# ========================================
# Documentation
# ========================================
.PHONY: notebooks
notebooks:
uv run jupyter nbconvert --to notebook --execute --inplace docs/examples/*.ipynb
.PHONY: docs
docs:
$(MAKE) -C docs/ clean-and-build-html
$(MAKE) -C docs/ view-html
.PHONY: docs-live
docs-live:
$(MAKE) -C docs/ clean-and-build-html
$(MAKE) -C docs/ live
.PHONY: docs-with-notebooks
docs-with-notebooks: notebooks docs
# ========================================
# Linting, Formatting, and Type Checking
# ========================================
.PHONY: format
format:
uv run ruff format .
uv run ruff check --fix-only .
.PHONY: lint
lint:
uv run ruff format --check .
uv run ruff check .
.PHONY: typecheck
typecheck:
uv run pyright --project ./pyrightconfig.ci.json
# ========================================
# Testing
# ========================================
.PHONY: test
test:
uv run pytest
.PHONY: test-coverage
test-coverage:
uv run pytest --cov=pooltool --cov-report=xml --cov-report=term
# ========================================
# Build and Publish
# ========================================
.PHONY: clean
clean:
rm -rf dist
.PHONY: build
build: clean
uv build
.PHONY: build-and-test-publish
build-and-test-publish: build
uv publish \
--publish-url https://test.pypi.org/legacy/ \
--token ${UV_PUBLISH_TOKEN_TEST}
.PHONY: build-and-publish
build-and-publish: build
uv publish \
--token ${UV_PUBLISH_TOKEN}