Skip to content

Commit

Permalink
Merge pull request #370 from TomHennen/fix_python_make
Browse files Browse the repository at this point in the history
'check' must be specified explicitly
  • Loading branch information
pxp928 authored Jun 28, 2024
2 parents 4e58454 + 404da05 commit a35425e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL := /bin/bash

PYTHON := python
PY_MODULE := in_toto_attestation

ALL_PY_SRCS := $(shell find $(PY_MODULE) tests -name '*.py')
Expand Down Expand Up @@ -30,33 +30,33 @@ all:
dev: $(VENV_STAMP)

$(VENV_STAMP): pyproject.toml
python -m venv $(VENV)
$(PYTHON) -m venv $(VENV)
$(VENV_BIN)/python -m pip install --upgrade pip
$(VENV_BIN)/python -m pip install -e .[$(INSTALL_EXTRA)]

.PHONY: lint
lint: $(VENV_STAMP)
. $(VENV_BIN)/activate && \
ruff format --check $(ALL_PY_SRCS) && \
ruff $(ALL_PY_SRCS) && \
ruff check $(ALL_PY_SRCS) && \
mypy $(PY_MODULE)

.PHONY: reformat
reformat: $(VENV_STAMP)
. $(VENV_BIN)/activate && \
ruff format $(ALL_PY_SRCS) && \
ruff --fix $(ALL_PY_SRCS)
ruff check --fix $(ALL_PY_SRCS)

.PHONY: test tests
test tests: $(VENV_STAMP)
. $(VENV_BIN)/activate && \
pytest --cov=$(PY_MODULE) $(T) $(TEST_ARGS) && \
python -m coverage report -m $(COV_ARGS)
$(PYTHON) -m coverage report -m $(COV_ARGS)

.PHONY: package
package: $(VENV_STAMP)
. $(VENV_BIN)/activate && \
python -m build
$(PYTHON) -m build

.PHONY: edit
edit:
Expand Down

0 comments on commit a35425e

Please sign in to comment.