Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
skip training on Darwin and satisfy ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
MeraX committed Dec 19, 2024
1 parent c19cddb commit c93a70a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/aicon/test_cicd_aicon_04_icon-dream_medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# used for CI/CD!
import datetime
import os
import platform
import tempfile

import matplotlib as mpl
Expand All @@ -20,11 +21,9 @@
from hydra import compose
from hydra import initialize

import anemoi.training
from anemoi.training.train.train import AnemoiTrainer

os.environ["ANEMOI_BASE_SEED"] = "42"
os.environ["ANEMOI_CONFIG_PATH"] = os.path.join(os.path.dirname(anemoi.training.__file__), "config")
mpl.use("agg")


Expand All @@ -46,8 +45,7 @@ def trainer(shorten: bool = True) -> AnemoiTrainer:
if grid_filename.startswith(("http://", "https://")):
import urllib.request

# print("Store the grid temporarily under", grid_fp.name)
urllib.request.urlretrieve(grid_filename, grid_fp.name)
urllib.request.urlretrieve(grid_filename, grid_fp.name) # noqa: S310
config.graph.nodes.icon_mesh.node_builder.grid_filename = grid_fp.name

trainer = AnemoiTrainer(config)
Expand All @@ -62,6 +60,7 @@ def get_trainer() -> tuple:
return trainer()


@pytest.mark.skipif(platform.system() == "Darwin")
def test_main(get_trainer: tuple) -> None:
trainer, initial_sum, final_sum = get_trainer
assert trainer
Expand Down

0 comments on commit c93a70a

Please sign in to comment.