diff --git a/.github/actions/install-parcels/action.yml b/.github/actions/install-parcels/action.yml index a7aea0602..66a3bbccc 100644 --- a/.github/actions/install-parcels/action.yml +++ b/.github/actions/install-parcels/action.yml @@ -24,8 +24,6 @@ runs: environment-file: ${{ inputs.environment-file }} python-version: ${{ inputs.python-version }} channels: conda-forge - cache-environment: true - cache-downloads: true - name: MPI support if: ${{ ! (runner.os == 'Windows') }} run: conda install -c conda-forge mpich mpi4py diff --git a/parcels/_compat.py b/parcels/_compat.py index 981ef30a5..48d020e4c 100644 --- a/parcels/_compat.py +++ b/parcels/_compat.py @@ -2,13 +2,15 @@ __all__ = ["MPI", "KMeans"] +from typing import Any + try: from mpi4py import MPI except ModuleNotFoundError: - MPI = None + MPI: Any | None = None # KMeans is used in MPI. sklearn not installed by default try: from sklearn.cluster import KMeans except ModuleNotFoundError: - KMeans = None + KMeans: Any | None = None