various improvements

This commit is contained in:
ge
2023-11-06 12:52:19 +03:00
parent 2870708365
commit ffa7605201
46 changed files with 2698 additions and 1282 deletions

View File

@ -1,17 +1,33 @@
SRC = computelib/
SRC = compute/
DIST = dist/
DOCS_SRC = docs/source/
DOCS_BUILD = docs/build/
.PHONY: docs
all: build
build:
build: format lint
poetry build
clean:
[ -d dist/ ] && rm -rf dist/ || true
find . -type d -name __pycache__ -exec rm -rf {} \; > /dev/null 2>&1 || true
format:
isort --lai 2 $(SRC)
autopep8 -riva --experimental --ignore e255 $(SRC)
poetry run isort --lai 2 $(SRC)
poetry run ruff format $(SRC)
lint:
pylint $(SRC)
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:~