-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (43 loc) · 1.06 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
include .env
DOCS_DIR := ./docs
JUPYTER_NOTEBOOKS := $(shell find $(DOCS_DIR) -type f -name '*.ipynb')
.PHONY: execute-all-notebooks
execute-all-notebooks:
@for file in $(JUPYTER_NOTEBOOKS); do \
echo "Executing notebook $$file"; \
jupyter execute --inplace $$file; \
done
.PHONY: lint
lint:
ruff check --exit-zero .
ruff format --check .
pyright --project pyproject.toml .
.PHONY: format
format:
ruff check --fix .
ruff format .
.PHONY: pre-commit
pre-commit:
pre-commit run --all-files
.PHONY: test
test:
pytest -v .
.PHONY: clean
clean:
rm -rf dist
.PHONY: build
build: clean
poetry build
# Note: `poetry` does not appear to read the `POETRY_PYPI_TOKEN_<NAME>` environment variable,
# so we need to pass it explicitly in these `publish` commands.
.PHONY: build-and-test-publish
build-and-test-publish: build
poetry publish \
--repository pypi_test \
--username __token__ \
--password ${POETRY_PYPI_TOKEN_PYPI_TEST}
.PHONY: build-and-publish
build-and-publish: build
poetry publish \
--username __token__ \
--password ${POETRY_PYPI_TOKEN_PYPI}