Feature rye (#17)
Migrate from Poetry to Rye Adaptat github actions Group build targets in makefile
This commit is contained in:
parent
b57c4f1ae6
commit
6d53fdecac
32 changed files with 208 additions and 1203 deletions
37
Makefile
37
Makefile
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue