diff --git a/.github/workflows/python-test-with-style.yml b/.github/workflows/python-test-with-style.yml index d38e64460d..e9b4c70ad1 100644 --- a/.github/workflows/python-test-with-style.yml +++ b/.github/workflows/python-test-with-style.yml @@ -45,3 +45,9 @@ jobs: FC: gfortran-11 run: | make format-py && git diff --exit-code + - name: Python version + env: + CC: ${{ matrix.compiler }} + FC: gfortran-11 + run: | + make vermin diff --git a/Makefile b/Makefile index 7c9174a6cb..1e16fac504 100644 --- a/Makefile +++ b/Makefile @@ -748,10 +748,10 @@ doc-html doc-latexpdf doc-epub doc-livehtml : doc-% : doxygen doc : doc-html # Style/Format -CLANG_FORMAT ?= clang-format +CLANG_FORMAT ?= clang-format CLANG_FORMAT_OPTS += -style=file -i -AUTOPEP8 ?= autopep8 -AUTOPEP8_OPTS += --in-place --aggressive --max-line-length 120 +AUTOPEP8 ?= autopep8 +AUTOPEP8_OPTS += --in-place --aggressive --max-line-length 120 format.ch := $(filter-out include/ceedf.h $(wildcard tests/t*-f.h), $(shell git ls-files '*.[ch]pp' '*.[ch]')) format.py := $(filter-out tests/junit-xml/junit_xml/__init__.py, $(shell git ls-files '*.py')) @@ -764,6 +764,13 @@ format-py : format : format-c format-py +# Vermin - python version requirements +VERMIN ?= vermin +VERMIN_OPTS += -t=3.7- --violations + +vermin : + $(VERMIN) $(VERMIN_OPTS) $(format.py) + # Tidy CLANG_TIDY ?= clang-tidy diff --git a/requirements-test.txt b/requirements-test.txt index 22d8fe17de..e1c4f47fcd 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,2 +1,3 @@ pytest autopep8 +vermin