mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Update Makefile
This commit is contained in:
@@ -1,38 +1,38 @@
|
|||||||
.PHONY: venv tests check-black check-flake lint format examples build
|
.PHONY: venv tests check-black check-flake lint format examples build
|
||||||
PYTHON := venv/bin/python
|
VENV ?= .venv
|
||||||
PIP = venv/bin/pip
|
PYTHON = ${VENV}/bin/python
|
||||||
|
|
||||||
venv:
|
venv:
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
${PIP} install --upgrade pip
|
${VENV}/bin/pip install --upgrade pip
|
||||||
${PIP} install -r requirements.txt
|
${VENV}/bin/pip install -r requirements.txt
|
||||||
${PIP} install -r requirements-dev.txt
|
${VENV}/bin/pip install -r requirements-dev.txt
|
||||||
${PIP} install -e .
|
${VENV}/bin/pip install -e .
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
${PYTHON} -m pytest
|
${PYTHON} -m pytest -n auto
|
||||||
${PYTHON} -m coverage html
|
${PYTHON} -m coverage html
|
||||||
|
|
||||||
check-black:
|
check-black:
|
||||||
${PYTHON} -m black --check pdfplumber tests
|
${VENV}/bin/black --check pdfplumber tests
|
||||||
|
|
||||||
check-isort:
|
check-isort:
|
||||||
${PYTHON} -m isort --profile black --check-only pdfplumber tests
|
${VENV}/bin/isort --profile black --check-only pdfplumber tests
|
||||||
|
|
||||||
check-flake:
|
check-flake:
|
||||||
${PYTHON} -m flake8 pdfplumber tests
|
${VENV}/bin/flake8 pdfplumber tests
|
||||||
|
|
||||||
check-mypy:
|
check-mypy:
|
||||||
${PYTHON} -m mypy --strict --implicit-reexport pdfplumber
|
${VENV}/bin/mypy --strict --implicit-reexport pdfplumber
|
||||||
|
|
||||||
lint: check-flake check-mypy check-black check-isort
|
lint: check-flake check-mypy check-black check-isort
|
||||||
|
|
||||||
format:
|
format:
|
||||||
${PYTHON} -m black pdfplumber tests
|
${VENV}/bin/black pdfplumber tests
|
||||||
${PYTHON} -m isort --profile black pdfplumber tests
|
${VENV}/bin/isort --profile black pdfplumber tests
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
${PYTHON} -m nbexec.cli examples/notebooks
|
${VENV}/bin/nbexec examples/notebooks
|
||||||
|
|
||||||
build:
|
build:
|
||||||
${PYTHON} -m build
|
${PYTHON} -m build
|
||||||
|
|||||||
Reference in New Issue
Block a user