From 0dcd90dd2b234acc860e0fc3d9a5d276c9fc2daf Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 16:22:31 +0100 Subject: [PATCH 1/6] Create the yaml file for pep8speaks * Automatically check for ReFrame Coding Style violations. --- .pep8speaks.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .pep8speaks.yml diff --git a/.pep8speaks.yml b/.pep8speaks.yml new file mode 100644 index 0000000000..51addec84a --- /dev/null +++ b/.pep8speaks.yml @@ -0,0 +1,17 @@ +message: # Customize the comment made by the bot + opened: # Messages when a new PR is submitted + header: "Hello @{name}, Thank you for submitting the Pull Request!" + footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" + updated: + header: "Hello @{name}, Thank you for updating!" + footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" +scanner: + diff_only: True +pycodestyle: + max-line-length: 79 + ignore: + - E129 + - E221 + - E226 + - E241 + - E272 From f5a28022b4edbcb54ef712127c00402669a4ea5c Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 16:27:33 +0100 Subject: [PATCH 2/6] Dummy change to check pep8speaks --- reframe/core/schedulers/slurm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index dd9a7a27a3..a94ce3b82d 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -44,7 +44,7 @@ class SlurmJob(sched.Job): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self._prefix = '#SBATCH' + self._prefix= '#SBATCH' self._completion_states = [SLURM_JOB_BOOT_FAIL, SLURM_JOB_CANCELLED, SLURM_JOB_COMPLETED, From 922ac3f31e736e0b0913a25561492c44a71d14c6 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 16:29:57 +0100 Subject: [PATCH 3/6] Add message for no errors --- .pep8speaks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pep8speaks.yml b/.pep8speaks.yml index 51addec84a..d779d3eb47 100644 --- a/.pep8speaks.yml +++ b/.pep8speaks.yml @@ -5,6 +5,7 @@ message: # Customize the comment made by the bot updated: header: "Hello @{name}, Thank you for updating!" footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" + no_errors: "Cheers! There are no PEP8 issues in this Pull Request!" scanner: diff_only: True pycodestyle: From d81d8c955d78ea16a749b13899e10f58801418ed Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 16:32:56 +0100 Subject: [PATCH 4/6] Fix dummy code style problem --- reframe/core/schedulers/slurm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index a94ce3b82d..2cfe8ce96c 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -44,7 +44,7 @@ class SlurmJob(sched.Job): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self._prefix= '#SBATCH' + self._prefix = '#SBATCH' self._completion_states = [SLURM_JOB_BOOT_FAIL, SLURM_JOB_CANCELLED, SLURM_JOB_COMPLETED, From 9a06cfea004bdf5ef92642268f8178f5470e1892 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 17:58:58 +0100 Subject: [PATCH 5/6] Remove the action for no errors --- .pep8speaks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pep8speaks.yml b/.pep8speaks.yml index d779d3eb47..0fdbb6fd23 100644 --- a/.pep8speaks.yml +++ b/.pep8speaks.yml @@ -5,9 +5,10 @@ message: # Customize the comment made by the bot updated: header: "Hello @{name}, Thank you for updating!" footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" - no_errors: "Cheers! There are no PEP8 issues in this Pull Request!" + scanner: diff_only: True + pycodestyle: max-line-length: 79 ignore: From e5382da56ba31289525329788a9f0f1af3c6fcd4 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 4 Dec 2018 18:08:04 +0100 Subject: [PATCH 6/6] Enable action for no errors --- .pep8speaks.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.pep8speaks.yml b/.pep8speaks.yml index 0fdbb6fd23..922894c8f8 100644 --- a/.pep8speaks.yml +++ b/.pep8speaks.yml @@ -1,11 +1,14 @@ -message: # Customize the comment made by the bot - opened: # Messages when a new PR is submitted +message: + opened: header: "Hello @{name}, Thank you for submitting the Pull Request!" footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" updated: header: "Hello @{name}, Thank you for updating!" footer: "Do see the ReFrame [Coding Style Guide](https://github.com/eth-cscs/reframe/wiki/coding-style-guide)" - + no_errors: "Cheers! There are no PEP8 issues in this Pull Request!" + +only_mention_files_with_errors: True + scanner: diff_only: True