From e4f49b51234dfc264e9023ddae608423c03935cb Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 11:41:23 +0200 Subject: [PATCH 01/11] Makefile: Add a make lint-python command Fixes #45 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 4f37195..64e2a09 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,11 @@ check-licenses: .PHONY: check-licenses +lint-python: + @python3 -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + +.PHONY: lint-python + check: check-licenses @true From a1902b0cae69fafb9506ff85622b21628c99477f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 11:43:31 +0200 Subject: [PATCH 02/11] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ce23f67..d60c70e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,10 @@ git: install: - git describe - make env + - python3 -m pip install flake8 script: + - make lint-python - source .github/travis/common.sh - rm -f README.rst && make README.rst - .github/travis/git-check.sh From 8564ba4a191f4d2f2ca4493b1fb19f4559b554e3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 11:50:04 +0200 Subject: [PATCH 03/11] Fix Travis CI build config validation issues --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d60c70e..c04d0de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,9 @@ # # SPDX-License-Identifier: Apache-2.0 -language: minimal +os linux +dist: focal +language: shell git: submodules: false From e77e870a1eb9fa7e791dd03ee6b80629687813b5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 11:51:13 +0200 Subject: [PATCH 04/11] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c04d0de..d0c37de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ # # SPDX-License-Identifier: Apache-2.0 -os linux +os: linux dist: focal language: shell From beb75f5c7951c92134da90ad18feaa23bd7b39f8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 12:08:15 +0200 Subject: [PATCH 05/11] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 64e2a09..7dbe963 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ check-licenses: .PHONY: check-licenses lint-python: - @python3 -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics .PHONY: lint-python From 3f3f79905cb77b5b0d54c5f4713730961cd668b1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 12:16:28 +0200 Subject: [PATCH 06/11] make lint-python before make env --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0c37de..a3d484f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,12 +23,14 @@ git: depth: false install: - - git describe - - make env - - python3 -m pip install flake8 + - git describe + - python3 -m pip install flake8 + +before_script: + - make lint-python + - make env script: - - make lint-python - - source .github/travis/common.sh - - rm -f README.rst && make README.rst - - .github/travis/git-check.sh + - source .github/travis/common.sh + - rm -f README.rst && make README.rst + - .github/travis/git-check.sh From ffffc11659c6ab012d28dbd88b53d3b53946f0b5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 20:46:36 +0200 Subject: [PATCH 07/11] Update Makefile Co-authored-by: Tim Ansell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7dbe963..baee58f 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ check-licenses: .PHONY: check-licenses lint-python: - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + $(IN_CONDA_ENV) flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics .PHONY: lint-python From 19d0c00b09b59fce76f9b5d08f4ae246e2f3e31f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 20:48:12 +0200 Subject: [PATCH 08/11] make check should lint-python --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index baee58f..2a3ce6f 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,7 @@ lint-python: check: check-licenses + lint-python @true all: README.rst From 3ab41a31502cc764153bbd995304de657fc4117a Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 22:23:04 +0200 Subject: [PATCH 09/11] Revert modifications to .travis.yml --- .travis.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3d484f..ce23f67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,23 +14,17 @@ # # SPDX-License-Identifier: Apache-2.0 -os: linux -dist: focal -language: shell +language: minimal git: submodules: false depth: false install: - - git describe - - python3 -m pip install flake8 - -before_script: - - make lint-python - - make env + - git describe + - make env script: - - source .github/travis/common.sh - - rm -f README.rst && make README.rst - - .github/travis/git-check.sh + - source .github/travis/common.sh + - rm -f README.rst && make README.rst + - .github/travis/git-check.sh From 09642eb8642404e8fd6bfde2bcb9eea98436617f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 6 Jul 2020 23:49:41 +0200 Subject: [PATCH 10/11] requirements.txt: Add flake8 --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 05f4b41..fe8a2c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ +flake8 + # rst_include tool as GitHub doesn't support `.. include::` when rendering # previews. rst_include From 88ddb1ec4254fa7d4931271e850fd9a72c36de17 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 7 Jul 2020 07:23:43 +0200 Subject: [PATCH 11/11] check: check-licenses lint-python --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2a3ce6f..b9aeac3 100644 --- a/Makefile +++ b/Makefile @@ -58,8 +58,7 @@ lint-python: .PHONY: lint-python -check: check-licenses - lint-python +check: check-licenses lint-python @true all: README.rst