From 461aaf0d70bfedc2d891348b485f3b3d9daab180 Mon Sep 17 00:00:00 2001 From: TomMaullin Date: Thu, 20 Jul 2023 20:26:19 +0100 Subject: [PATCH 1/2] fixing test compatability --- blm/blm_cluster.py | 5 ++++- test/blm_cluster_test.py | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/blm/blm_cluster.py b/blm/blm_cluster.py index c54b207..ae78c57 100644 --- a/blm/blm_cluster.py +++ b/blm/blm_cluster.py @@ -25,7 +25,10 @@ def _main(argv=None): help='Path to inputs yaml file') # Parse the arguments - args = parser.parse_args() + if argv is None: + args = parser.parse_args() + else: + args = parser.parse_args(argv) # If the argument is just a filename without a directory, # prepend the current working directory diff --git a/test/blm_cluster_test.py b/test/blm_cluster_test.py index 5fd43f7..03af39f 100644 --- a/test/blm_cluster_test.py +++ b/test/blm_cluster_test.py @@ -1,12 +1,5 @@ import os -import numpy -import pandas -import dask -import subprocess -from scipy import ndimage from dask.distributed import Client, as_completed -from dask.distributed import performance_report -import nibabel as nib import sys # Get the directory containing the script From 4b40fb10a03c65cca1f0f6f335327690dc2b8d05 Mon Sep 17 00:00:00 2001 From: TomMaullin Date: Thu, 20 Jul 2023 20:42:25 +0100 Subject: [PATCH 2/2] Create pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..383e65c --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py')