Skip to content

Commit

Permalink
Remove GHA keys (not supported by miniconda, only micromamba) and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
VeckoTheGecko committed Aug 27, 2024
1 parent 4dcd89e commit b53a95e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/actions/install-parcels/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions parcels/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

__all__ = ["MPI", "KMeans"]

from typing import Any

MPI: Any | None = None
KMeans: Any | None = None

try:
from mpi4py import MPI
except ModuleNotFoundError:
MPI = None
pass

# KMeans is used in MPI. sklearn not installed by default
try:
from sklearn.cluster import KMeans
except ModuleNotFoundError:
KMeans = None
pass

0 comments on commit b53a95e

Please sign in to comment.