summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 14:29:20 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:02:50 -0700
commit2ff82463c95d202c58f54142ee4d265b36ac976d (patch)
treefb462009e4917203fdea63318824883156b614e7 /python
parent9234e0d85d2cd316aaf280da89594434e901d430 (diff)
downloadfatcat-2ff82463c95d202c58f54142ee4d265b36ac976d.tar.gz
fatcat-2ff82463c95d202c58f54142ee4d265b36ac976d.zip
python makefile: tooling config updates
Diffstat (limited to 'python')
-rw-r--r--python/Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/python/Makefile b/python/Makefile
index 954fdc38..ec3335a5 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -13,28 +13,29 @@ dep: ## Create local virtualenv using pipenv
pipenv install --dev
.PHONY: lint
-lint: ## Run lints (eg, flake8)
- pipenv run pylint -E fatcat*.py fatcat_tools fatcat_web tests/*.py
- pipenv run flake8 *.py tests/ fatcat_web/ fatcat_tools/ --select=E9,F63,F7,F82
+lint: ## Run lints (eg, flake8), does not fail if there are problems
+ pipenv run pylint -E fatcat*.py fatcat_tools fatcat_web tests/*.py || true
pipenv run flake8 *.py tests/ fatcat_web/ fatcat_tools/ --exit-zero
-
-.PHONY: lint-mypy
-lint-mypy: ## Run mypy type checks (not part of regular lint yet)
+ pipenv run isort -q -c . || true
pipenv run mypy *.py fatcat_web/ fatcat_tools/ --ignore-missing-imports
-# Not ready for 'black' yet
-#.PHONY: fmt
-#fmt: ## Run code formating on all source code
-# pipenv run black *.py fatcat_web/ fatcat_tools/ tests/
+.PHONY: lint-verbose
+lint-verbose: ## Run lints with extra warnings/notes shown
+ pipenv run pylint fatcat*.py fatcat_tools fatcat_web tests/*.py
+
+.PHONY: fmt
+fmt: ## Run code formating on all source code
+ pipenv run isort --atomic .
+ pipenv run black --line-length 96 .
.PHONY: test
test: ## Run all tests and lints
@curl --silent localhost:9411/v0/changelog > /dev/null || (echo "API not running locally, bailing early from tests" && exit 1)
- pipenv run pytest
+ pipenv run pytest -vv
.PHONY: coverage
coverage: ## Run all tests with coverage
- pipenv run pytest --cov
+ pipenv run pytest --cov --cov-report=term --cov-report=html
.PHONY: test-cli
test-cli: ## Run CLI commands. WARNING: may mutate local database