Files
nutshell/Makefile
dni ⚡ 88393fa4c4 [DEV] add ruff and remove isort and flake (#300)
* [DEV] add ruff and remove isort and flake
- precommit
- workflow
- Makefile

updated black

* configure black to use default line-length

* reformat to 88 chars line-length

* fix ugly comments
2023-08-24 09:47:47 +02:00

51 lines
1021 B
Makefile

ruff:
poetry run ruff check . --fix
ruff-check:
poetry run ruff check .
black:
poetry run black . --exclude cashu/nostr
black-check:
poetry run black . --exclude cashu/nostr --check
mypy:
poetry run mypy cashu --ignore-missing
format: black ruff
check: black-check ruff-check mypy
clean:
rm -r cashu.egg-info/ || true
find . -name ".DS_Store" -exec rm -f {} \; || true
rm -rf dist || true
rm -rf build || true
package:
poetry export -f requirements.txt --without-hashes --output requirements.txt
make clean
python setup.py sdist bdist_wheel
test:
poetry run pytest tests --cov-report xml --cov cashu
install:
make clean
python setup.py sdist bdist_wheel
pip install --upgrade dist/*
upload:
make clean
python setup.py sdist bdist_wheel
twine upload --repository pypi dist/*
install-pre-commit-hook:
@echo "Installing pre-commit hook to git"
@echo "Uninstall the hook with poetry run pre-commit uninstall"
poetry run pre-commit install
pre-commit:
poetry run pre-commit run --all-files