From fb1df09662bcbabb0f436c394c1abbee73da2e27 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 11 Nov 2024 15:12:18 -0700 Subject: [PATCH 1/2] Swallow unlink error on Windows --- gridmet_bmi/bmi_gridmet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gridmet_bmi/bmi_gridmet.py b/gridmet_bmi/bmi_gridmet.py index c30324f..1980c63 100644 --- a/gridmet_bmi/bmi_gridmet.py +++ b/gridmet_bmi/bmi_gridmet.py @@ -40,7 +40,10 @@ def finalize(self) -> None: printing reports. """ self._day = 0 - self._model.clear_cache() + try: + self._model.clear_cache() + except PermissionError as error: + print(error) def get_component_name(self) -> str: """Name of the component. From 26d755c3628bec3149130b4a6f8ae457cdd856c4 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 11 Nov 2024 15:12:33 -0700 Subject: [PATCH 2/2] Test on Windows --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8d0ecd..aefaec2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.10", "3.11", "3.12", "3.13"] steps: