Feature rye (#17)

Migrate from Poetry to Rye 
Adaptat github actions 
Group build targets in makefile
This commit is contained in:
Yax 2023-11-11 19:45:35 +01:00 committed by GitHub
parent b57c4f1ae6
commit 6d53fdecac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 208 additions and 1203 deletions

View file

@ -1,16 +1,35 @@
all: black test typehint lint
ifeq (run,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: all build run test
# code quality
all: black typehint lint
black:
poetry run isort --multi-line 3 --profile black stacosys/ tests/
poetry run black --target-version py311 stacosys/ tests/
test:
poetry run coverage run -m --source=stacosys pytest
poetry run coverage report
rye run isort --multi-line 3 --profile black src/ tests/
rye run black --target-version py311 src/ tests/
typehint:
poetry run mypy --ignore-missing-imports stacosys/ tests/
rye run mypy --ignore-missing-imports src/ tests/
lint:
poetry run pylint stacosys/
rye run pylint src/
# test
test:
rye run coverage run -m --source=stacosys pytest tests
rye run coverage report
# build
#rye run pyinstaller src/stacosys/run.py --name stacosys --onefile
build:
rye run pyinstaller --clean stacosys.spec
# run
run:
rye run python src/stacosys/run.py $(RUN_ARGS)