From 871fd710bc06f5c4782af54a06dd945da5c10398 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 12:53:27 +0545 Subject: [PATCH 01/11] check pep8 style checker --- .github/workflows/ci.yml | 4 ++++ gsoc/forms.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91d39213..3f5fa58a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,10 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: PEP8 Style Checker + uses: andymckay/pycodestyle-action@0.1.3 + - name: Cache uses: actions/cache@v2 with: diff --git a/gsoc/forms.py b/gsoc/forms.py index eb84de8f..750dfd79 100644 --- a/gsoc/forms.py +++ b/gsoc/forms.py @@ -149,5 +149,6 @@ def clean(self): raise ValidationError( "At least one out of the five contact " "details should be entered" ) - + return cd + \ No newline at end of file From 96ad17475dec6d3c4b5a6b558b7dc9a971086e04 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:05:40 +0545 Subject: [PATCH 02/11] Revert "check pep8 style checker" This reverts commit 871fd710bc06f5c4782af54a06dd945da5c10398. --- .github/workflows/ci.yml | 4 ---- gsoc/forms.py | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f5fa58a..91d39213 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,6 @@ jobs: steps: - uses: actions/checkout@v3 - - - name: PEP8 Style Checker - uses: andymckay/pycodestyle-action@0.1.3 - - name: Cache uses: actions/cache@v2 with: diff --git a/gsoc/forms.py b/gsoc/forms.py index 750dfd79..eb84de8f 100644 --- a/gsoc/forms.py +++ b/gsoc/forms.py @@ -149,6 +149,5 @@ def clean(self): raise ValidationError( "At least one out of the five contact " "details should be entered" ) - + return cd - \ No newline at end of file From 8ac548e193029483d35aeb4ec3a479777b2da6bf Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:31:40 +0545 Subject: [PATCH 03/11] add pep8 style checker acton --- .github/workflows/pep8.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pep8.yml diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml new file mode 100644 index 00000000..4b328cb6 --- /dev/null +++ b/.github/workflows/pep8.yml @@ -0,0 +1,31 @@ +name: PEP8 Style Checker + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + name: Test PEP8 Style + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v27 + + - name: Setup pycodestyle + run: pip install pycodestyle + + - name: Check style + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + pycodestyle --first $file + done \ No newline at end of file From ee66ed63f1d2bf4253d7fccaa8433fa704e3df63 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:40:59 +0545 Subject: [PATCH 04/11] test pep8 action --- .github/workflows/pep8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 4b328cb6..eea8ac51 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + fetch-depth: 0 # OR "2" -> To retrieve the preceding commi - name: Get changed files id: changed-files From 8339a3769080810b97f0629e1deb0d23c406b4d2 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:44:01 +0545 Subject: [PATCH 05/11] test pep8 action --- .github/workflows/pep8.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index eea8ac51..b6830315 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -2,11 +2,9 @@ name: PEP8 Style Checker on: push: - branches: - - main + branches: [ "master" ] pull_request: - branches: - - main + branches: [ "master" ] jobs: build: @@ -15,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commi + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit - name: Get changed files id: changed-files From 01c3fdae42770715554dfad872b84db7ac1c64e9 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:48:28 +0545 Subject: [PATCH 06/11] update pep8.yml to check only for .py files --- .github/workflows/pep8.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index b6830315..a2fd8066 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -24,6 +24,7 @@ jobs: - name: Check style run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - pycodestyle --first $file + for file in ${{ steps.changed-files.outputs.all_changed_files }}; + do if [[ $file == *.py ]]; + then pycodestyle --first $file done \ No newline at end of file From 7b65a7724311e6c3763f5f7bb62a499619b5166e Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:49:52 +0545 Subject: [PATCH 07/11] update pep8.yml to check only for .py files --- .github/workflows/pep8.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index a2fd8066..028fb917 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -26,5 +26,6 @@ jobs: run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file == *.py ]]; - then pycodestyle --first $file + then pycodestyle --first $file; + fi; done \ No newline at end of file From c031b0671ceb5fe477398c5d89b986c209f785fd Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:51:21 +0545 Subject: [PATCH 08/11] test pep8 --- gsoc/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsoc/forms.py b/gsoc/forms.py index eb84de8f..4f349f06 100644 --- a/gsoc/forms.py +++ b/gsoc/forms.py @@ -149,5 +149,5 @@ def clean(self): raise ValidationError( "At least one out of the five contact " "details should be entered" ) - + return cd From e194787475069de1688a63a114f022e90ba21015 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:52:33 +0545 Subject: [PATCH 09/11] pep8 test confirmed --- gsoc/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsoc/forms.py b/gsoc/forms.py index 4f349f06..eb84de8f 100644 --- a/gsoc/forms.py +++ b/gsoc/forms.py @@ -149,5 +149,5 @@ def clean(self): raise ValidationError( "At least one out of the five contact " "details should be entered" ) - + return cd From 0c6afff5e01793ae962de6560707f6c8915b102b Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 13:54:17 +0545 Subject: [PATCH 10/11] add newline on end of yml files --- .github/workflows/ci.yml | 2 +- .github/workflows/pep8.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91d39213..9ed03f73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,4 +68,4 @@ jobs: DBUSER: root DBPASSWORD: DBHOST: 127.0.0.1 - DBPORT: $ \ No newline at end of file + DBPORT: $ diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 028fb917..7a2b3a1e 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -28,4 +28,4 @@ jobs: do if [[ $file == *.py ]]; then pycodestyle --first $file; fi; - done \ No newline at end of file + done From 5d91752552c4b1529cea5640a79977aa79c6e3f8 Mon Sep 17 00:00:00 2001 From: Diwash Date: Fri, 19 Aug 2022 14:16:43 +0545 Subject: [PATCH 11/11] remove comments --- .github/workflows/pep8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 7a2b3a1e..934abbcb 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit + fetch-depth: 0 - name: Get changed files id: changed-files