Initial commit

This commit is contained in:
2024-01-11 14:36:01 +00:00
commit 018e7097eb
10 changed files with 265 additions and 0 deletions

33
Makefile Normal file
View File

@@ -0,0 +1,33 @@
.PHONY: default install wheel dev test coverage black-check black-diff safety tag
guard-%:
@ if [ "${${*}}" = "" ]; then echo "Run 'pipenv shell' before command"; exit 1; fi
default: test
install: guard-PIPENV_ACTIVE
pip install -e .
wheel: guard-PIPENV_ACTIVE coverage black-check safety
python setup.py bdist_wheel
dev: guard-PIPENV_ACTIVE
pipenv install --dev --skip-lock
test: guard-PIPENV_ACTIVE
PYTHONPATH=./src pytest
coverage: guard-PIPENV_ACTIVE
PYTHONPATH=./src pytest --cov-report term --cov=./src/cli ./tests --cov-report term-missing
black-check: guard-PIPENV_ACTIVE
black --check src/ tests/
black-diff: guard-PIPENV_ACTIVE
black --diff src/ tests/
safety: guard-PIPENV_ACTIVE
pipenv lock --requirements | safety check --stdin
upload: guard-PIPENV_ACTIVE
python3 -m twine upload --repository gitea dist/*