Add building, linting for PyPI upload

This commit is contained in:
Andrew Brookins 2021-10-22 06:53:39 -07:00
parent c9967b0d40
commit 09c91fb756
8 changed files with 470 additions and 24 deletions

View file

@ -28,14 +28,20 @@ $(INSTALL_STAMP): pyproject.toml poetry.lock
clean:
find . -type d -name "__pycache__" | xargs rm -rf {};
rm -rf $(INSTALL_STAMP) .coverage .mypy_cache
-rm -r dist
.PHONY: dist
dist: clean
$(POETRY) build
.PHONY: lint
lint: $(INSTALL_STAMP)
lint: $(INSTALL_STAMP) dist
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME)
$(POETRY) run black ./tests/ $(NAME)
$(POETRY) run flake8 --ignore=W503,E501,F401,E731 ./tests/ $(NAME)
$(POETRY) run mypy ./tests/ $(NAME) --ignore-missing-imports
$(POETRY) run bandit -r $(NAME) -s B608
$(POETRY) run twine check dist/*
.PHONY: format
format: $(INSTALL_STAMP)