Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
- id: black
args: [--line-length=120]
- repo: https://github.com/pycqa/isort
rev: 9.0.0a3
rev: 9.0.0b1
hooks:
- id: isort
args:
Expand All @@ -41,7 +41,7 @@ repos:
- --profile black
- --project anemoi
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
rev: v0.16.1
hooks:
- id: ruff
args:
Expand Down Expand Up @@ -71,12 +71,12 @@ repos:
- --license
- tools/pre-commit-copyright-notice.txt
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.23.0"
rev: "v2.26.0"
hooks:
- id: pyproject-fmt
args: ["--max-supported-python", "3.12"]
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
rev: v0.86.0
rev: v0.93.0
hooks:
- id: docsig
args:
Expand Down
9 changes: 4 additions & 5 deletions tests/system-level/anemoi_test/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import os
from pathlib import Path
from typing import Optional

import pyflow as pf
import wellies as wl
Expand Down Expand Up @@ -107,7 +106,7 @@ def __init__(self, config, **kwargs):

class TrainingTask(pf.Task):
def __init__(self, folder: str, suite_config: dict, training_cmd: str = "anemoi-training train"):
self.required_datasets: Optional[str] = None
self.required_datasets: str | None = None

overrides = {
"--config-path": STATIC_DATA_DIR / "training" / folder,
Expand Down Expand Up @@ -218,7 +217,7 @@ def __init__(
config_template_path: Path,
output_path: Path,
):
self.required_trainings: Optional[str] = None
self.required_trainings: str | None = None
script = pf.FileScript(SUITE_DIR / "configs/inference" / folder / "generate_config.sh")
script.environment_variable("CHECKPOINT_DIR", str(checkpoint_path))
script.environment_variable("CHECKPOINT_FILE", checkpoint_file)
Expand All @@ -232,7 +231,7 @@ class InferenceRetrieveTask(pf.Task):
def __init__(
self, folder: str, suite_config: dict, config_path: Path, mars_cmd: str, retrieve_cmd: str, output_path: Path
):
self.required_trainings: Optional[str] = None
self.required_trainings: str | None = None
script = pf.FileScript(SUITE_DIR / "configs/inference/" / folder / "retrieve.sh")
script.environment_variable("CONFIG_PATH", str(config_path))
script.environment_variable("MARS_CMD", mars_cmd)
Expand All @@ -243,7 +242,7 @@ def __init__(

class InferenceTask(pf.Task):
def __init__(self, folder: str, suite_config: dict, config_path: Path, inference_cmd: str, output_path: Path):
self.required_trainings: Optional[str] = None
self.required_trainings: str | None = None
script = pf.FileScript(SUITE_DIR / "configs/inference/inference.sh")
script.environment_variable("CONFIG_PATH", str(config_path))
script.environment_variable("INFERENCE_CMD", inference_cmd)
Expand Down
Loading