From ddad285c464099c3fa0cb14d3a0d91dc921a875f Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sun, 6 Mar 2022 01:49:45 +0000 Subject: [PATCH 01/21] dcp-682 clean code lint rules for python --- .flake8 | 44 +++++++++++++++++++++++++++++++++++++++++++ .pylintrc | 21 +++++++++++++++++++++ .vscode/launch.json | 15 +++++++++++++++ .vscode/settings.json | 11 +++++++++++ README.md | 7 ++++++- requirements-dev.txt | 7 ++++++- 6 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 .flake8 create mode 100644 .pylintrc create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..e24758a5 --- /dev/null +++ b/.flake8 @@ -0,0 +1,44 @@ +[flake8] +################### FILE PATTERNS ########################## + +# Provide a comma-separated list of glob patterns to exclude from checks. +exclude = + .git, + __pycache__, + .pytest_cache, + .mypy_cache, + .venv +# Provide a comma-separate list of glob patterns to include for checks. +filename = + *.py + + +################### LINTING ################################ +# Report all errors, even if it is on the same line as a `# NOQA` comment. +disable-noqa = False + +# Set the maximum length that any line (with some exceptions) may be. +max-line-length = 120 +# Set the maximum allowed McCabe complexity value for a block of code. +max-complexity = 10 +# Toggle whether pycodestyle should enforce matching the indentation of the opening bracket’s line. +# incluences E131 and E133 +hang-closing = True + +ignore = + E128 # continuation line under-indented for visual indent + E133 # closing bracket is missing indentation + E201 # whitespace after '(' + E225 # missing whitespace around operator + E231 # missing whitespace after ',' + E241 #multiple spaces after ',' + E252 #missing whitespace around parameter equals + E261 #at least two spaces before inline comment + E266 #too many leading '#' for block comment + E302 #expected 2 blank lines, found 1 + E303 #too many blank line + E501 # line too long + F401 #'io' imported but unused + F841 #local variable is assigned to but never used + W293 #blank line contains whitespace + W391 #blank line at end of file diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..fdc74fc8 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,21 @@ +[GENERAL] +ignore-paths=.venv + +[MESSAGES CONTROL] +disable=all +enable= + R0913 + C0302, # too many lines + R0915, # too many statements + R0101, # nested blocks level + R0801 # duplicate code + +[FORMAT] +max-line-length=150 +max-module-lines=100 + + +[DESIGN] +max-args=5 +max-statements= 15 +max-nested-blocks=3 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..17e15f27 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..519a8e7f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "python.testing.unittestArgs": [ + "-v", + "-s", + "./test", + "-p", + "test_*.py" + ], + "python.testing.pytestEnabled": false, + "python.testing.unittestEnabled": true +} \ No newline at end of file diff --git a/README.md b/README.md index 080f1fd8..36199d71 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,17 @@ Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI. To run scripts locally you'll need Python 3.6 and all the dependencies in [requirements.txt](requirements.txt). +## Setup + ``` pip install -r requirements.txt pip install -r requirements-dev.txt ``` -# Web Application +## Configuration + +The broker uses a locally running ingest core at `localhost:8000` by default. Connecting to a different one +Is done by setting the `INGEST_API` environment variable. ## Running with Python diff --git a/requirements-dev.txt b/requirements-dev.txt index 6ce6230a..916543ec 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,11 @@ -r requirements.txt coverage +flake8 +flake8-eradicate +flake8-fixme +flake8-pylint +pylint nose==1.3.7 pylint -xlrd python-dotenv +xlrd \ No newline at end of file From 85d34895916020c2310b4782d06f922ce64315fc Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sun, 6 Mar 2022 02:29:13 +0000 Subject: [PATCH 02/21] dcp-682 clean code linting for python --- .flake8 | 4 +++- .pylintrc | 11 ++++++++++- README.md | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index e24758a5..6ef741ab 100644 --- a/.flake8 +++ b/.flake8 @@ -7,7 +7,9 @@ exclude = __pycache__, .pytest_cache, .mypy_cache, - .venv + .venv, + .vscode, + .idea # Provide a comma-separate list of glob patterns to include for checks. filename = *.py diff --git a/.pylintrc b/.pylintrc index fdc74fc8..c61f2b34 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,5 +1,14 @@ [GENERAL] -ignore-paths=.venv +ignore-paths= + .git, + __pycache__, + .pytest_cache, + .mypy_cache, + .venv, + .vscode, + .idea + +ignore=*.md [MESSAGES CONTROL] disable=all diff --git a/README.md b/README.md index 36199d71..88dac697 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ +# HCA Ingest Broker + [![Build Status](https://travis-ci.org/HumanCellAtlas/ingest-client.svg?branch=master)](https://travis-ci.org/HumanCellAtlas/ingest-broker) [![Maintainability](https://api.codeclimate.com/v1/badges/c3cb9256f7e92537fa99/maintainability)](https://codeclimate.com/github/HumanCellAtlas/ingest-broker/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/c3cb9256f7e92537fa99/test_coverage)](https://codeclimate.com/github/HumanCellAtlas/ingest-broker/test_coverage) [![Docker Repository on Quay](https://quay.io/repository/humancellatlas/ingest-broker/status "Docker Repository on Quay")](https://quay.io/repository/humancellatlas/ingest-broker) -# HCA Ingest Broker Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI. From 9256564bbfd3ea7c6709a75f382854672afe91de Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sun, 6 Mar 2022 02:46:21 +0000 Subject: [PATCH 03/21] lint readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 88dac697..a36e70a7 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ [![Docker Repository on Quay](https://quay.io/repository/humancellatlas/ingest-broker/status "Docker Repository on Quay")](https://quay.io/repository/humancellatlas/ingest-broker) -Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI. - +Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI. + To run scripts locally you'll need Python 3.6 and all the dependencies in [requirements.txt](requirements.txt). ## Setup @@ -22,9 +22,9 @@ pip install -r requirements-dev.txt The broker uses a locally running ingest core at `localhost:8000` by default. Connecting to a different one Is done by setting the `INGEST_API` environment variable. -## Running with Python +## Running with Python -Start the web application with +Start the web application with ```bash python broker/broker_app.py @@ -51,7 +51,7 @@ See the [template](.flaskenv.template). See more in [flask's docs](https://flask.palletsprojects.com/en/2.0.x/cli/#environment-variables-from-dotenv) ## Running With Docker -Alternatively, you can build and run the app with Docker. To run the web application with Docker for build the Docker image with +Alternatively, you can build and run the app with Docker. To run the web application with Docker for build the Docker image with ```bash docker build . -t ingest-broker:latest From 5c81876ec15fbba8438ebae05eaeeafd3511d128 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sun, 6 Mar 2022 02:51:33 +0000 Subject: [PATCH 04/21] lint readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a36e70a7..59245d00 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ To run scripts locally you'll need Python 3.6 and all the dependencies in [requi ## Setup -``` +```bash pip install -r requirements.txt pip install -r requirements-dev.txt ``` @@ -68,9 +68,9 @@ or run against the development Ingest API docker run -p 5000:5000 -e INGEST_API=http://api.ingest.dev.data.humancellatlas.org ingest-broker:latest ``` -The application will be available at http://localhost:5000 +The application will be available at -# Docs +## Docs see [design docs](doc/) From 0d88cc2c6e7a1e2b78368b8acc39561dededa72e Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sun, 6 Mar 2022 02:57:02 +0000 Subject: [PATCH 05/21] lint readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 59245d00..fed0ef90 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/c3cb9256f7e92537fa99/maintainability)](https://codeclimate.com/github/HumanCellAtlas/ingest-broker/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/c3cb9256f7e92537fa99/test_coverage)](https://codeclimate.com/github/HumanCellAtlas/ingest-broker/test_coverage) [![Docker Repository on Quay](https://quay.io/repository/humancellatlas/ingest-broker/status "Docker Repository on Quay")](https://quay.io/repository/humancellatlas/ingest-broker) +[![GitHub Super-Linter](https://github.com/ebi-ait/ingest-broker/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI. From 5846b8e5895479384c805a782b759fd583d87682 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Mon, 7 Mar 2022 14:13:27 +0000 Subject: [PATCH 06/21] dcp-682 exclude test from lint aor the time being --- .flake8 | 3 ++- .pylintrc | 3 ++- requirements-dev.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 6ef741ab..26fc68cf 100644 --- a/.flake8 +++ b/.flake8 @@ -9,7 +9,8 @@ exclude = .mypy_cache, .venv, .vscode, - .idea + .idea, + test # Provide a comma-separate list of glob patterns to include for checks. filename = *.py diff --git a/.pylintrc b/.pylintrc index c61f2b34..5731a78b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -6,7 +6,8 @@ ignore-paths= .mypy_cache, .venv, .vscode, - .idea + .idea, + test ignore=*.md diff --git a/requirements-dev.txt b/requirements-dev.txt index 916543ec..94a3bf5d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ -r requirements.txt +cohesion coverage flake8 flake8-eradicate From f09b172e2b0a55a983952894c620b9f7cefc511e Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Mon, 14 Mar 2022 14:50:36 +0000 Subject: [PATCH 07/21] remove cohesion lint rule for now --- requirements-dev.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 94a3bf5d..916543ec 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,4 @@ -r requirements.txt -cohesion coverage flake8 flake8-eradicate From 893c091ab085866eb2948c2f7019d2aef8e63345 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Tue, 15 Mar 2022 11:32:12 +0000 Subject: [PATCH 08/21] Update .pylintrc --- .pylintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index 5731a78b..b2a13e7e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -21,7 +21,7 @@ enable= R0801 # duplicate code [FORMAT] -max-line-length=150 +max-line-length=120 max-module-lines=100 From e1ef3e3e8aab0e4532ef20c26cf25311fbd019b6 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Wed, 23 Mar 2022 09:11:35 +0000 Subject: [PATCH 09/21] docs and branch config for linting dcp-682 --- .github/workflows/linter.yml | 4 ++-- .vscode/settings.json | 5 ++++- README.md | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index bfbfa189..df2973a4 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -8,9 +8,9 @@ name: Lint Code Base on: push: - branches: [ task/lint-after-push-dcp-682 ] + branches: [ task/lint-after-push-dcp-682, dev, master ] pull_request: - branches: [ task/test-linting ] + branches: [ dev, master ] workflow_dispatch: branches: [ task/lint-after-push-dcp-682 ] diff --git a/.vscode/settings.json b/.vscode/settings.json index 519a8e7f..3e43218d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,8 @@ "test_*.py" ], "python.testing.pytestEnabled": false, - "python.testing.unittestEnabled": true + "python.testing.unittestEnabled": true, + "python.linting.flake8Enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.enabled": true } \ No newline at end of file diff --git a/README.md b/README.md index fed0ef90..dd6c88c3 100644 --- a/README.md +++ b/README.md @@ -80,3 +80,10 @@ see [design docs](doc/) ```bash nosetests test/unit/ ``` + +## linting + +We use pylint and flake8 for linting. +The configuration files in this repo, [.flake8](.flake8), [.pylintrc](.pylintrc), control the specific rules we use which are mainly about clean code: function length, complexity, etc. + +Pull requests to dev and master branches are protected and expect no new linting violations. See the [.github/workflows/linter.yml](.github/workflows/linter.yml) From 3518c5446b2d9455872fea6322e1a4c009e9e1c7 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Wed, 23 Mar 2022 09:20:20 +0000 Subject: [PATCH 10/21] gh action branch rules dcp-682 --- .github/workflows/linter.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index df2973a4..19b92217 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -8,11 +8,19 @@ name: Lint Code Base on: push: - branches: [ task/lint-after-push-dcp-682, dev, master ] + branches: + - task/lint-after-push-dcp-682 + - dev + - master pull_request: - branches: [ dev, master ] + branches: + - dev + - master + workflow_dispatch: - branches: [ task/lint-after-push-dcp-682 ] + branches: + - task/lint-after-push-dcp-682 + jobs: run-lint: From ad835cde9956a55b5b399d2d3bf15cd3228efd23 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Wed, 23 Mar 2022 09:25:11 +0000 Subject: [PATCH 11/21] dcp-682 lintint gh action --- .github/workflows/linter.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 19b92217..5ffed883 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,4 +1,5 @@ -# This workflow executes several linters on changed files based on languages used in your code base whenever +# This workflow executes several linters on changed files based on +# languages used in your code base whenever # you push a code or open a pull request. # # You can adjust the behavior by modifying this file. @@ -7,11 +8,6 @@ name: Lint Code Base on: - push: - branches: - - task/lint-after-push-dcp-682 - - dev - - master pull_request: branches: - dev @@ -20,7 +16,7 @@ on: workflow_dispatch: branches: - task/lint-after-push-dcp-682 - + jobs: run-lint: @@ -29,7 +25,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - name: Lint Code Base From 3248e93583d42ecda8cd1380f92a023b7f57569d Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Wed, 23 Mar 2022 09:28:39 +0000 Subject: [PATCH 12/21] dcp-682 extend max file length --- .pylintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index b2a13e7e..6003cedd 100644 --- a/.pylintrc +++ b/.pylintrc @@ -22,7 +22,7 @@ enable= [FORMAT] max-line-length=120 -max-module-lines=100 +max-module-lines=150 [DESIGN] From 55c3e001c460fed091723b6cdfaa4f547f13603c Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Thu, 24 Mar 2022 21:30:54 +0000 Subject: [PATCH 13/21] dcp-682 lint for clean code --- .github/workflows/linter.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 5ffed883..dbbeb4b3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -13,12 +13,7 @@ on: - dev - master - workflow_dispatch: - branches: - - task/lint-after-push-dcp-682 - -jobs: run-lint: runs-on: ubuntu-latest steps: From 4d0e19a23440f630e89c1be81d6ffe95b72b3e97 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Thu, 24 Mar 2022 21:31:42 +0000 Subject: [PATCH 14/21] dcp-682 lint for clean code --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index dbbeb4b3..979aa27c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -14,6 +14,7 @@ on: - master +jobs: run-lint: runs-on: ubuntu-latest steps: From 082f64f9824312bb122604810baa5fbe6c93ce8f Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Fri, 25 Mar 2022 15:40:06 +0000 Subject: [PATCH 15/21] dcp-682 lint for clean code - docs for linting from IDE --- README.md | 24 +++++++++++++++++++++--- requirements-dev.txt | 1 - 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dd6c88c3..e7674468 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The application will be available at ## Docs -see [design docs](doc/) +see [design docs](./doc/readme.md) ## Running unit tests @@ -84,6 +84,24 @@ nosetests test/unit/ ## linting We use pylint and flake8 for linting. -The configuration files in this repo, [.flake8](.flake8), [.pylintrc](.pylintrc), control the specific rules we use which are mainly about clean code: function length, complexity, etc. +The configuration files in this repo, [.flake8](.flake8), [.pylintrc](.pylintrc), control +the specific rules we use which are mainly about clean code: function length, -Pull requests to dev and master branches are protected and expect no new linting violations. See the [.github/workflows/linter.yml](.github/workflows/linter.yml) +complexity, etc. + +Pull requests to dev and master branches are protected and expect no new +linting violations. See the [linter.yml](.github/workflows/linter.yml) + +### linting locally + +vscode +* enable linting in the settings +* report appears in the "problems" section + +intellij +* install pylint plugin +* flake8 errors do not appear in the IDE (no plugin for it) +* scan only modified files, to narrow the list of found issues + +command line +* run flake8 from the project root \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 916543ec..4acc8f7a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,5 @@ flake8-fixme flake8-pylint pylint nose==1.3.7 -pylint python-dotenv xlrd \ No newline at end of file From cf982c35b3b3e3d96f9976bc64222a0a8d68cd6c Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Fri, 25 Mar 2022 19:57:02 +0000 Subject: [PATCH 16/21] dcp-682 lint for clean code - smaller linter image --- .github/workflows/linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 979aa27c..1547ae4c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -24,8 +24,9 @@ jobs: fetch-depth: 0 - name: Lint Code Base - uses: github/super-linter@v4 + uses: github/super-linter:slim-v4 env: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_INCLUDE: .*.py From f69f13f06eececab74096989f4c4ab81028a16e9 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Fri, 25 Mar 2022 19:57:02 +0000 Subject: [PATCH 17/21] dcp-682 lint for clean code - smaller linter image --- .github/workflows/linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 979aa27c..6487cfdd 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -24,8 +24,9 @@ jobs: fetch-depth: 0 - name: Lint Code Base - uses: github/super-linter@v4 + uses: github/super-linter/slim@v4 env: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_INCLUDE: .*.py From c1065cd3e62a7a9f02ebf447716ab41871f97d32 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Fri, 25 Mar 2022 20:05:03 +0000 Subject: [PATCH 18/21] dcp-682 lint for clean code - test a messed up file --- broker_app.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/broker_app.py b/broker_app.py index 46f89a3c..7f291010 100644 --- a/broker_app.py +++ b/broker_app.py @@ -34,6 +34,27 @@ def index(): new_ui_url = os.environ.get('INGEST_UI') if new_ui_url: return redirect(new_ui_url, code=302) + for i in range(1,100): + for j in range(2,200): + for k in range(1,200): + for l in range(1,200): + if j != k: + print('ok') + for i in range(1,100): + for j in range(2,200): + for k in range(1,200): + for l in range(1,200): + if j != k: + print('ok') + + + for i in range(1,100): + for j in range(2,200): + for k in range(1,200): + for l in range(1,200): + if j != k: + print('ok') + return app.response_class( response=json.dumps({'message': "Ingest Broker API is running!"}), status=HTTPStatus.OK, From c39f831e63969dc98f35f39ae068167ce3071a12 Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sat, 26 Mar 2022 15:23:03 +0000 Subject: [PATCH 19/21] dcp-682 lint for clean code - linter config --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 6487cfdd..a36b8760 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -26,6 +26,7 @@ jobs: - name: Lint Code Base uses: github/super-linter/slim@v4 env: + ACTIONS_RUNNER_DEBUG: true VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 98d8c9c45e5b35889e0fcebb305ecda08ad6a29e Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sat, 26 Mar 2022 15:47:48 +0000 Subject: [PATCH 20/21] dcp-682 lint for clean code - linter config --- .github/workflows/linter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index a36b8760..4f157d90 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -31,3 +31,6 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_INCLUDE: .*.py + VALIDATE_PYTHON_BLACK: false + VALIDATE_PYTHON_MYPY: false + VALIDATE_PYTHON_ISORT: false From 8ec3ec241a83b775276737d831a7dbdbce5206cc Mon Sep 17 00:00:00 2001 From: Amnon Khen Date: Sat, 26 Mar 2022 15:56:04 +0000 Subject: [PATCH 21/21] dcp-682 lint for clean code - linter config --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 4f157d90..82f6c0a5 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -34,3 +34,4 @@ jobs: VALIDATE_PYTHON_BLACK: false VALIDATE_PYTHON_MYPY: false VALIDATE_PYTHON_ISORT: false + LINTER_RULES_PATH: ./