From 0b599f0509c81e4cf721b26fe06c935a4a6e67bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kerekes=20D=C3=A1vid?= Date: Tue, 10 Sep 2024 14:59:33 +0200 Subject: [PATCH] Fix linting? --- .github/workflows/python-test.yml | 15 ++++++++------- datasets/biomassters.py | 13 +------------ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 58e1f14f..75d0e66e 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -30,6 +30,14 @@ jobs: with: python-version: "3.10" + - name: Lint with flake8 + - run: pip install flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Create environment with mamba uses: conda-incubator/setup-miniconda@v3 with: @@ -54,13 +62,6 @@ jobs: run: | mamba env export - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest run: | python -m unittest tests.test_imports diff --git a/datasets/biomassters.py b/datasets/biomassters.py index 09484e31..94ec389b 100644 --- a/datasets/biomassters.py +++ b/datasets/biomassters.py @@ -97,15 +97,4 @@ def get_splits(dataset_config): @staticmethod def download(dataset_config:dict, silent=False): - pass - - -if __name__ == '__main__': - - dataset = BioMassters(cfg, split = "test") - - train_dict = dataset.__getitem__(0) - - print(train_dict["image"]["optical"].shape) - print(train_dict["image"]["sar"].shape) - print(train_dict["target"].shape) \ No newline at end of file + pass \ No newline at end of file