2023-11-06 12:52:19 +03:00
|
|
|
SRC = compute/
|
|
|
|
DIST = dist/
|
|
|
|
DOCS_SRC = docs/source/
|
|
|
|
DOCS_BUILD = docs/build/
|
|
|
|
|
|
|
|
.PHONY: docs
|
2023-08-24 22:36:12 +03:00
|
|
|
|
2023-06-17 20:07:50 +03:00
|
|
|
all: build
|
|
|
|
|
2023-11-06 12:52:19 +03:00
|
|
|
build: format lint
|
2023-06-17 20:07:50 +03:00
|
|
|
poetry build
|
|
|
|
|
2023-08-24 22:36:12 +03:00
|
|
|
format:
|
2023-11-06 12:52:19 +03:00
|
|
|
poetry run isort --lai 2 $(SRC)
|
|
|
|
poetry run ruff format $(SRC)
|
2023-08-24 22:36:12 +03:00
|
|
|
|
|
|
|
lint:
|
2023-11-06 12:52:19 +03:00
|
|
|
poetry run ruff check $(SRC)
|
|
|
|
|
|
|
|
docs:
|
|
|
|
poetry run sphinx-build $(DOCS_SRC) $(DOCS_BUILD)
|
|
|
|
|
|
|
|
serve-docs:
|
|
|
|
poetry run sphinx-autobuild $(DOCS_SRC) $(DOCS_BUILD)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
[ -d $(DIST) ] && rm -rf $(DIST) || true
|
|
|
|
[ -d $(DOCS_BUILD) ] && rm -rf $(DOCS_BUILD) || true
|
|
|
|
find . -type d -name __pycache__ -exec rm -rf {} \; > /dev/null 2>&1 || true
|
|
|
|
|
|
|
|
test-build:
|
|
|
|
poetry build
|
|
|
|
scp $(DIST)/*.tar.gz vm:~
|