From d1e9dd6d422cd8e9e68ca8d40add8657c43ce7a2 Mon Sep 17 00:00:00 2001 From: sameeul Date: Wed, 17 Jul 2024 18:19:45 -0400 Subject: [PATCH 1/4] Skip mypy check for site packages --- .github/workflows/build_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 569e252..aae53d3 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -91,8 +91,8 @@ jobs: run: cd mm-workflows/docs && make html - name: MyPy Check Type Annotations - if: always() - run: cd mm-workflows/ && mypy src/ examples/ cwl_adapters/ + if: runner.os != 'Windows' + run: cd mm-workflows/ && mypy -exclude $CONDA_PREFIX/lib/python3.9/site-packages/ src/ examples/ cwl_adapters/ # NOTE: Do not use `mypy .` because then mypy will check both src/ and build/ causing: # src/wic/__init__.py: error: Duplicate module named "wic" (also at "./build/lib/wic/__init__.py") From 2521f5bc7dfa214f2a2cf83e14cbbf25f204ccc6 Mon Sep 17 00:00:00 2001 From: sameeul Date: Wed, 17 Jul 2024 18:21:31 -0400 Subject: [PATCH 2/4] Choose when to run the workflow --- .github/workflows/build_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index aae53d3..05735c1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,6 +2,8 @@ name: Build And Test on: push: + pull_request: + workflow_dispatch: defaults: run: From 1fbbd59a2bd037b3bc03e629bfec0ab9b1e1ab3d Mon Sep 17 00:00:00 2001 From: sameeul Date: Wed, 17 Jul 2024 18:29:08 -0400 Subject: [PATCH 3/4] Skip mypy check for site packages --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 05735c1..0a94497 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -94,7 +94,7 @@ jobs: - name: MyPy Check Type Annotations if: runner.os != 'Windows' - run: cd mm-workflows/ && mypy -exclude $CONDA_PREFIX/lib/python3.9/site-packages/ src/ examples/ cwl_adapters/ + run: cd mm-workflows/ && mypy --exclude $CONDA_PREFIX/lib/python3.9/site-packages/ src/ examples/ cwl_adapters/ # NOTE: Do not use `mypy .` because then mypy will check both src/ and build/ causing: # src/wic/__init__.py: error: Duplicate module named "wic" (also at "./build/lib/wic/__init__.py") From f98ee664bf0d4d4d8e59dff8ecb52f3ea70c1b9c Mon Sep 17 00:00:00 2001 From: sameeul Date: Wed, 17 Jul 2024 18:48:50 -0400 Subject: [PATCH 4/4] test hardcoding --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0a94497..fcf9f53 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -94,7 +94,7 @@ jobs: - name: MyPy Check Type Annotations if: runner.os != 'Windows' - run: cd mm-workflows/ && mypy --exclude $CONDA_PREFIX/lib/python3.9/site-packages/ src/ examples/ cwl_adapters/ + run: cd mm-workflows/ && mypy --exclude /home/runner/miniconda3/envs/mm/lib/python3.9/site-packages/ src/ examples/ cwl_adapters/ # NOTE: Do not use `mypy .` because then mypy will check both src/ and build/ causing: # src/wic/__init__.py: error: Duplicate module named "wic" (also at "./build/lib/wic/__init__.py")