2024-06-11 16:33:52 -04:00
|
|
|
.PHONY: venv tests check-black check-flake lint format examples build
|
2026-01-07 09:13:56 +01:00
|
|
|
VENV ?= .venv
|
|
|
|
|
PYTHON = ${VENV}/bin/python
|
2020-07-25 08:46:03 -04:00
|
|
|
|
|
|
|
|
venv:
|
2020-08-13 21:23:09 -04:00
|
|
|
python3 -m venv venv
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/pip install --upgrade pip
|
|
|
|
|
${VENV}/bin/pip install -r requirements.txt
|
|
|
|
|
${VENV}/bin/pip install -r requirements-dev.txt
|
|
|
|
|
${VENV}/bin/pip install -e .
|
2020-07-25 08:46:03 -04:00
|
|
|
|
|
|
|
|
tests:
|
2026-01-07 09:13:56 +01:00
|
|
|
${PYTHON} -m pytest -n auto
|
2020-08-06 22:13:48 -04:00
|
|
|
${PYTHON} -m coverage html
|
2020-07-29 22:44:03 -04:00
|
|
|
|
|
|
|
|
check-black:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/black --check pdfplumber tests
|
2020-07-29 22:44:03 -04:00
|
|
|
|
2021-12-09 22:27:51 -05:00
|
|
|
check-isort:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/isort --profile black --check-only pdfplumber tests
|
2021-12-09 22:27:51 -05:00
|
|
|
|
2020-07-29 22:44:03 -04:00
|
|
|
check-flake:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/flake8 pdfplumber tests
|
2020-07-29 19:12:42 -04:00
|
|
|
|
2022-05-06 09:51:01 -04:00
|
|
|
check-mypy:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/mypy --strict --implicit-reexport pdfplumber
|
2022-05-06 09:51:01 -04:00
|
|
|
|
|
|
|
|
lint: check-flake check-mypy check-black check-isort
|
2020-08-13 08:58:13 -04:00
|
|
|
|
2020-07-29 19:12:42 -04:00
|
|
|
format:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/black pdfplumber tests
|
|
|
|
|
${VENV}/bin/isort --profile black pdfplumber tests
|
2022-05-31 15:50:50 -04:00
|
|
|
|
|
|
|
|
examples:
|
2026-01-07 09:13:56 +01:00
|
|
|
${VENV}/bin/nbexec examples/notebooks
|
2022-10-01 09:45:06 -04:00
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
${PYTHON} -m build
|