stacosys/Makefile

38 lines
818 B
Makefile
Raw Normal View History

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
2022-11-20 16:38:58 +01:00
.PHONY: all build run test
# code quality
all: black typehint lint
2022-11-19 20:40:15 +01:00
black:
rye run isort --multi-line 3 --profile black src/ tests/
rye run black --target-version py311 src/ tests/
2022-11-19 20:40:15 +01:00
typehint:
rye run mypy --ignore-missing-imports src/ tests/
2022-11-19 20:40:15 +01:00
lint:
rye run pylint src/
2023-11-19 15:35:56 +01:00
# check
check: all
# 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
2022-11-19 20:40:15 +01:00
# run
run:
2023-11-19 16:36:37 +01:00
PYTHONPATH=src/ rye run python src/stacosys/run.py $(RUN_ARGS)