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') diff --git a/blm/blm_cluster.py b/blm/blm_cluster.py index c443502..06eb443 100644 --- a/blm/blm_cluster.py +++ b/blm/blm_cluster.py @@ -25,9 +25,11 @@ 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 if os.path.dirname(args.inputs_yml) == '': args.inputs_yml = os.path.join(os.getcwd(), args.inputs_yml) diff --git a/test/blm_cluster_test.py b/test/blm_cluster_test.py index 941170a..6940594 100644 --- a/test/blm_cluster_test.py +++ b/test/blm_cluster_test.py @@ -4,15 +4,14 @@ from cleanup import cleanup from generate_test_data import * import os -import numpy -import pandas -import dask -import subprocess -from scipy import ndimage from dask.distributed import Client, as_completed +<<<<<<< HEAD from dask.distributed import performance_report import nibabel as nib import sys +======= +import sys +>>>>>>> 4b40fb10a03c65cca1f0f6f335327690dc2b8d05 # Get the directory containing the script test_dir = os.path.dirname(__file__)