From 15e99b661170fe027b252b62766b15efa1be3fd6 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 10 Feb 2019 03:42:21 +0100 Subject: [PATCH 1/3] Travis CI: Add current Node.js and Python 2.7, 3.7 Like #1189 but on the __dev__ branch instead of the master branch --- .travis.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index db413b7b0..23a07ef23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,27 @@ -language: node_js -sudo: false -node_js: - - "8.11.1" -script: make travis -after_script: make report +node_js-steps: &node_js-steps + language: node_js + script: make travis + after_script: make report + +python-steps: &python-steps + language: python + install: pip install flake8 + script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + +matrix: + include: + - node_js: "8.11.1" + <<: *node_js-steps + - node_js: "node" + <<: *node_js-steps + - node_js: "node" # current version of Node.js on Travis CI + <<: *node_js-steps + - python: "2.7" + <<: *python-steps + - python: "3.7" + dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069) + <<: *python-steps From 73c515c23248723b04e77c1c752e23a9cb540051 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 10 Feb 2019 03:45:35 +0100 Subject: [PATCH 2/3] Update .travis.yml --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 23a07ef23..70cb3dbba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ matrix: include: - node_js: "8.11.1" <<: *node_js-steps - - node_js: "node" - <<: *node_js-steps - node_js: "node" # current version of Node.js on Travis CI <<: *node_js-steps - python: "2.7" From 16661f7daf939b25aeebbfe480acd40d6f2b18c2 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 10 Feb 2019 03:50:17 +0100 Subject: [PATCH 3/3] Add flake8 linter directive # noqa: F821 Temporary until a permanent fix to #1190 lands. --- bin/oref0-autotune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/oref0-autotune.py b/bin/oref0-autotune.py index 21ce88912..21d1ec6c3 100755 --- a/bin/oref0-autotune.py +++ b/bin/oref0-autotune.py @@ -111,7 +111,7 @@ def assign_args_to_variables(args): def get_nightscout_profile(nightscout_host): #TODO: Add ability to use API secret for Nightscout. res = requests.get(nightscout_host + '/api/v1/profile.json') - with open(os.path.join(autotune_directory, 'nightscout.profile.json'), 'w') as f: + with open(os.path.join(autotune_directory, 'nightscout.profile.json'), 'w') as f: # noqa: F821 f.write(res.text) def get_openaps_profile(directory):