From 6c1039d2df66ad1a95f6db235e19ae490496ec95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Wed, 11 Sep 2024 10:35:51 +0200 Subject: [PATCH 1/4] Added python debugger test before build in CI --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43a351c..3aea400 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,9 @@ jobs: - name: Install dependencies run: pip install wheel setuptools + + - name: Test Python debugger + run: python vsi2tif/vsi2tif.py --help - name: Build package run: python setup.py bdist_wheel From 886d49d02b88c1ac63cdd487f8f39d79a5db8286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Wed, 11 Sep 2024 10:36:08 +0200 Subject: [PATCH 2/4] Added import path handling to work for both CLI and debugging --- vsi2tif/vsi2tif.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vsi2tif/vsi2tif.py b/vsi2tif/vsi2tif.py index eab4997..b967348 100644 --- a/vsi2tif/vsi2tif.py +++ b/vsi2tif/vsi2tif.py @@ -2,8 +2,14 @@ import os from argparse import ArgumentParser -from .src.process import cellsens2tif_batch -from .src.process import cellsens2tif_single +try: + from .src.process import cellsens2tif_batch, cellsens2tif_single +except ImportError: + from src.process import cellsens2tif_batch, cellsens2tif_single +try: + from .src.process import cellsens2tif_batch, cellsens2tif_single +except ImportError: + from src.process import cellsens2tif_batch, cellsens2tif_single def main(): From b1fce42cb930c9789694a417f7a7f7545c31506d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Wed, 11 Sep 2024 10:37:12 +0200 Subject: [PATCH 3/4] Linted code --- vsi2tif/vsi2tif.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vsi2tif/vsi2tif.py b/vsi2tif/vsi2tif.py index b967348..1398f2c 100644 --- a/vsi2tif/vsi2tif.py +++ b/vsi2tif/vsi2tif.py @@ -3,13 +3,11 @@ from argparse import ArgumentParser try: - from .src.process import cellsens2tif_batch, cellsens2tif_single + from .src.process import cellsens2tif_batch + from .src.process import cellsens2tif_single except ImportError: - from src.process import cellsens2tif_batch, cellsens2tif_single -try: - from .src.process import cellsens2tif_batch, cellsens2tif_single -except ImportError: - from src.process import cellsens2tif_batch, cellsens2tif_single + from src.process import cellsens2tif_batch + from src.process import cellsens2tif_single def main(): From 67cbf0ef7b7d7c38c541bb8a583dfd05e91842c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Wed, 11 Sep 2024 10:42:08 +0200 Subject: [PATCH 4/4] Moved test python debugger step to tests job --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3aea400..773e747 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,6 @@ jobs: - name: Install dependencies run: pip install wheel setuptools - - - name: Test Python debugger - run: python vsi2tif/vsi2tif.py --help - name: Build package run: python setup.py bdist_wheel @@ -66,3 +63,6 @@ jobs: - name: Test CLI run: vsi2tif --help shell: bash + + - name: Test Python debugger + run: python vsi2tif/vsi2tif.py --help