rompy 0.6.2__tar.gz → 0.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. {rompy-0.6.2 → rompy-0.6.4}/HISTORY.rst +18 -0
  2. {rompy-0.6.2 → rompy-0.6.4}/PKG-INFO +46 -6
  3. {rompy-0.6.2 → rompy-0.6.4}/README.md +38 -1
  4. {rompy-0.6.2 → rompy-0.6.4}/pyproject.toml +20 -1
  5. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/__init__.py +25 -2
  6. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/backends/config.py +26 -52
  7. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/cli.py +270 -83
  8. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/config.py +21 -1
  9. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/data.py +38 -75
  10. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/source.py +0 -1
  11. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/spectrum.py +5 -6
  12. rompy-0.6.4/src/rompy/core/yaml_loader.py +212 -0
  13. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/model.py +33 -28
  14. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/pipeline/__init__.py +49 -20
  15. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/postprocess/__init__.py +16 -2
  16. rompy-0.6.4/src/rompy/postprocess/config.py +274 -0
  17. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/run/__init__.py +94 -4
  18. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/run/docker.py +1 -2
  19. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/run/slurm.py +81 -59
  20. rompy-0.6.4/src/rompy/templating.py +405 -0
  21. rompy-0.6.4/src/rompy/transfer/__init__.py +22 -0
  22. rompy-0.6.4/src/rompy/transfer/base.py +59 -0
  23. rompy-0.6.4/src/rompy/transfer/cloud.py +214 -0
  24. rompy-0.6.4/src/rompy/transfer/exceptions.py +7 -0
  25. rompy-0.6.4/src/rompy/transfer/file.py +149 -0
  26. rompy-0.6.4/src/rompy/transfer/http.py +54 -0
  27. rompy-0.6.4/src/rompy/transfer/manager.py +168 -0
  28. rompy-0.6.4/src/rompy/transfer/oceanum.py +111 -0
  29. rompy-0.6.4/src/rompy/transfer/registry.py +110 -0
  30. rompy-0.6.4/src/rompy/transfer/utils.py +78 -0
  31. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/PKG-INFO +46 -6
  32. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/SOURCES.txt +25 -0
  33. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/entry_points.txt +12 -0
  34. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/requires.txt +3 -0
  35. {rompy-0.6.2 → rompy-0.6.4}/tests/backends/test_enhanced_backends.py +79 -24
  36. {rompy-0.6.2 → rompy-0.6.4}/tests/backends/test_pydantic_backends.py +0 -1
  37. {rompy-0.6.2 → rompy-0.6.4}/tests/backends/test_slurm_backend.py +86 -67
  38. rompy-0.6.4/tests/test_cloud_transfer.py +309 -0
  39. rompy-0.6.4/tests/test_config_render_delegation.py +46 -0
  40. {rompy-0.6.2 → rompy-0.6.4}/tests/test_datablob_http.py +4 -5
  41. rompy-0.6.4/tests/test_join_prefix.py +53 -0
  42. rompy-0.6.4/tests/test_pipeline_config.py +389 -0
  43. rompy-0.6.4/tests/test_postprocess_config.py +234 -0
  44. rompy-0.6.4/tests/test_templating.py +414 -0
  45. rompy-0.6.4/tests/test_transfer_file.py +145 -0
  46. rompy-0.6.4/tests/test_transfer_http.py +100 -0
  47. rompy-0.6.4/tests/test_transfer_manager.py +142 -0
  48. rompy-0.6.4/tests/test_transfer_oceanum.py +115 -0
  49. rompy-0.6.4/tests/test_transfer_registry.py +163 -0
  50. rompy-0.6.4/tests/test_yaml_loader.py +317 -0
  51. {rompy-0.6.2 → rompy-0.6.4}/AUTHORS.rst +0 -0
  52. {rompy-0.6.2 → rompy-0.6.4}/LICENSE +0 -0
  53. {rompy-0.6.2 → rompy-0.6.4}/MANIFEST.in +0 -0
  54. {rompy-0.6.2 → rompy-0.6.4}/NOTICE +0 -0
  55. {rompy-0.6.2 → rompy-0.6.4}/docs/Makefile +0 -0
  56. {rompy-0.6.2 → rompy-0.6.4}/docs/make.bat +0 -0
  57. {rompy-0.6.2 → rompy-0.6.4}/setup.cfg +0 -0
  58. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/_version.py +0 -0
  59. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/backends/__init__.py +0 -0
  60. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/__init__.py +0 -0
  61. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/boundary.py +0 -0
  62. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/filters.py +0 -0
  63. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/grid.py +0 -0
  64. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/http_handler.py +0 -0
  65. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/render.py +0 -0
  66. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/time.py +0 -0
  67. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/core/types.py +0 -0
  68. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/formatting.py +0 -0
  69. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/logging/__init__.py +0 -0
  70. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/logging/config.py +0 -0
  71. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/logging/formatter.py +0 -0
  72. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/logging/logger.py +0 -0
  73. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/plotting.py +0 -0
  74. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/templates/base/__init__.py +0 -0
  75. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/templates/base/{{runtime.staging_dir}}/INPUT +0 -0
  76. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/templates/base/{{runtime.staging_dir}}/datasets/readme.md +0 -0
  77. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/templates/base/{{runtime.staging_dir}}/outputs/readme.md +0 -0
  78. {rompy-0.6.2 → rompy-0.6.4}/src/rompy/utils.py +0 -0
  79. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/dependency_links.txt +0 -0
  80. {rompy-0.6.2 → rompy-0.6.4}/src/rompy.egg-info/top_level.txt +0 -0
  81. {rompy-0.6.2 → rompy-0.6.4}/tests/__init__.py +0 -0
  82. {rompy-0.6.2 → rompy-0.6.4}/tests/backends/test_modelrun_pydantic_integration.py +0 -0
  83. {rompy-0.6.2 → rompy-0.6.4}/tests/conftest.py +0 -0
  84. {rompy-0.6.2 → rompy-0.6.4}/tests/core/test_logging.py +0 -0
  85. {rompy-0.6.2 → rompy-0.6.4}/tests/example_configs/make_full_yaml.py +0 -0
  86. {rompy-0.6.2 → rompy-0.6.4}/tests/integration/test_docker_backend.py +0 -0
  87. {rompy-0.6.2 → rompy-0.6.4}/tests/test_basegrid.py +0 -0
  88. {rompy-0.6.2 → rompy-0.6.4}/tests/test_basemodel.py +0 -0
  89. {rompy-0.6.2 → rompy-0.6.4}/tests/test_data.py +0 -0
  90. {rompy-0.6.2 → rompy-0.6.4}/tests/test_helpers.py +0 -0
  91. {rompy-0.6.2 → rompy-0.6.4}/tests/test_intake_driver.py +0 -0
  92. {rompy-0.6.2 → rompy-0.6.4}/tests/test_serilization.py +0 -0
  93. {rompy-0.6.2 → rompy-0.6.4}/tests/test_templates.py +0 -0
  94. {rompy-0.6.2 → rompy-0.6.4}/tests/test_time.py +0 -0
  95. {rompy-0.6.2 → rompy-0.6.4}/tests/test_utils/__init__.py +0 -0
  96. {rompy-0.6.2 → rompy-0.6.4}/tests/test_utils/logging.py +0 -0
  97. {rompy-0.6.2 → rompy-0.6.4}/tests/utils/__init__.py +0 -0
  98. {rompy-0.6.2 → rompy-0.6.4}/tests/utils/compare.py +0 -0
@@ -33,6 +33,24 @@ are continually evolving. Contributions and feedback are welcome!
33
33
  Releases
34
34
  ********
35
35
 
36
+ 0.6.0 (2026-02-18)
37
+ ___________________
38
+
39
+ Breaking Changes
40
+ ----------------
41
+ * CLI: Replaced `--processor` option with `--processor-config` (required) in `rompy postprocess` and `rompy pipeline` commands.
42
+ * API: `ModelRun.postprocess()` now requires a `BasePostprocessorConfig` instance instead of a string processor name.
43
+ * Pipeline: `LocalPipelineBackend.execute()` now accepts a `BasePostprocessorConfig` instance for the `processor` parameter.
44
+
45
+ New Features
46
+ ------------
47
+ * Added Pydantic-based postprocessor configuration framework (`BasePostprocessorConfig`, `NoopPostprocessorConfig`).
48
+ * Added `--processor-config` CLI option for specifying postprocessor configuration files (YAML/JSON).
49
+ * Added `rompy.postprocess.config` entry point group for registering postprocessor configurations.
50
+ * Added `rompy backends validate --processor-type` for validating postprocessor configurations.
51
+ * Added comprehensive test suite for postprocessor configuration framework.
52
+ * Added example postprocessor configuration files.
53
+
36
54
  0.5.0 (2025-07-13)
37
55
  ___________________
38
56
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rompy
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Summary: Core rompy library for ocean wave modeling with plugin system
5
5
  Author-email: CSIRO <paul.branson@csiro.au>
6
6
  Maintainer-email: Rompy Contributors <developers@rompy.com>
@@ -236,6 +236,13 @@ Provides-Extra: extra
236
236
  Requires-Dist: gcsfs; extra == "extra"
237
237
  Requires-Dist: zarr; extra == "extra"
238
238
  Requires-Dist: cloudpathlib[azure,gs,s3]; extra == "extra"
239
+ Provides-Extra: docs
240
+ Requires-Dist: mkdocs; extra == "docs"
241
+ Requires-Dist: mkdocs-material; extra == "docs"
242
+ Requires-Dist: mkdocstrings[python]; extra == "docs"
243
+ Requires-Dist: mkdocs-gallery; extra == "docs"
244
+ Requires-Dist: mkdocs-execute-plugin; extra == "docs"
245
+ Requires-Dist: mkdocs-jupyter; extra == "docs"
239
246
  Provides-Extra: dev
240
247
  Requires-Dist: pytest; extra == "dev"
241
248
  Requires-Dist: envyaml; extra == "dev"
@@ -243,16 +250,12 @@ Requires-Dist: coverage; extra == "dev"
243
250
  Requires-Dist: ruff; extra == "dev"
244
251
  Requires-Dist: black; extra == "dev"
245
252
  Requires-Dist: respx; extra == "dev"
246
- Provides-Extra: docs
247
- Requires-Dist: mkdocs; extra == "docs"
248
- Requires-Dist: mkdocs-material; extra == "docs"
249
- Requires-Dist: mkdocstrings[python]; extra == "docs"
250
253
  Dynamic: license-file
251
254
 
252
255
  # "Relocatable Ocean Modelling in PYthon (rompy)"
253
256
 
254
257
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15093426.svg)](https://doi.org/10.5281/zenodo.15093426)
255
- [![GitHub Pages](https://github.com/rom-py/rompy/actions/workflows/sphinx_docs_to_gh_pages.yaml/badge.svg)](https://rom-py.github.io/rompy/)
258
+ [![GitHub Pages](https://github.com/rom-py/rompy/actions/workflows/build-docs.yml/badge.svg)](https://rom-py.github.io/rompy/)
256
259
  [![PyPI version](https://img.shields.io/pypi/v/rompy.svg)](https://pypi.org/project/rompy/)
257
260
  [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/rom-py/rompy/python-publish.yml)](https://github.com/rom-py/rompy/actions)
258
261
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/rompy)](https://pypistats.org/packages/rompy)
@@ -269,6 +272,7 @@ Key Features:
269
272
  - Templated, reproducible model configuration using pydantic and xarray
270
273
  - Unified interfaces for grids, data, boundaries, and spectra
271
274
  - Extensible plugin system for models, data sources, backends, and postprocessors
275
+ - Pydantic-based postprocessor configuration with CLI support
272
276
  - Robust logging and formatting for consistent output and diagnostics
273
277
  - Example notebooks and comprehensive documentation for rapid onboarding
274
278
  - Support for local, Docker, and HPC execution backends
@@ -279,6 +283,42 @@ rompy is under active development—features, model support, and documentation a
279
283
 
280
284
  See <https://rom-py.github.io/rompy/>
281
285
 
286
+ # Postprocessor Configuration
287
+
288
+ ROMPY now supports Pydantic-based postprocessor configuration via YAML/JSON files.
289
+
290
+ ## Usage
291
+
292
+ ### Postprocess with a config file
293
+
294
+ ```bash
295
+ rompy postprocess model_config.yml --processor-config processor.yml
296
+ ```
297
+
298
+ ### Pipeline with postprocessor config
299
+
300
+ ```bash
301
+ rompy pipeline model_config.yml --processor-config processor.yml
302
+ ```
303
+
304
+ ### Validate a postprocessor config
305
+
306
+ ```bash
307
+ rompy backends validate --processor-type noop processor.yml
308
+ ```
309
+
310
+ ## Example Configuration
311
+
312
+ ```yaml
313
+ type: noop
314
+ validate_outputs: true
315
+ timeout: 3600
316
+ env_vars:
317
+ DEBUG: "1"
318
+ ```
319
+
320
+ See `examples/backends/postprocessor_configs/` for more examples.
321
+
282
322
  # Code Formatting and Pre-commit Hooks
283
323
 
284
324
  This repository enforces Python code formatting using [black](https://github.com/psf/black) via the pre-commit framework.
@@ -1,7 +1,7 @@
1
1
  # "Relocatable Ocean Modelling in PYthon (rompy)"
2
2
 
3
3
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15093426.svg)](https://doi.org/10.5281/zenodo.15093426)
4
- [![GitHub Pages](https://github.com/rom-py/rompy/actions/workflows/sphinx_docs_to_gh_pages.yaml/badge.svg)](https://rom-py.github.io/rompy/)
4
+ [![GitHub Pages](https://github.com/rom-py/rompy/actions/workflows/build-docs.yml/badge.svg)](https://rom-py.github.io/rompy/)
5
5
  [![PyPI version](https://img.shields.io/pypi/v/rompy.svg)](https://pypi.org/project/rompy/)
6
6
  [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/rom-py/rompy/python-publish.yml)](https://github.com/rom-py/rompy/actions)
7
7
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/rompy)](https://pypistats.org/packages/rompy)
@@ -18,6 +18,7 @@ Key Features:
18
18
  - Templated, reproducible model configuration using pydantic and xarray
19
19
  - Unified interfaces for grids, data, boundaries, and spectra
20
20
  - Extensible plugin system for models, data sources, backends, and postprocessors
21
+ - Pydantic-based postprocessor configuration with CLI support
21
22
  - Robust logging and formatting for consistent output and diagnostics
22
23
  - Example notebooks and comprehensive documentation for rapid onboarding
23
24
  - Support for local, Docker, and HPC execution backends
@@ -28,6 +29,42 @@ rompy is under active development—features, model support, and documentation a
28
29
 
29
30
  See <https://rom-py.github.io/rompy/>
30
31
 
32
+ # Postprocessor Configuration
33
+
34
+ ROMPY now supports Pydantic-based postprocessor configuration via YAML/JSON files.
35
+
36
+ ## Usage
37
+
38
+ ### Postprocess with a config file
39
+
40
+ ```bash
41
+ rompy postprocess model_config.yml --processor-config processor.yml
42
+ ```
43
+
44
+ ### Pipeline with postprocessor config
45
+
46
+ ```bash
47
+ rompy pipeline model_config.yml --processor-config processor.yml
48
+ ```
49
+
50
+ ### Validate a postprocessor config
51
+
52
+ ```bash
53
+ rompy backends validate --processor-type noop processor.yml
54
+ ```
55
+
56
+ ## Example Configuration
57
+
58
+ ```yaml
59
+ type: noop
60
+ validate_outputs: true
61
+ timeout: 3600
62
+ env_vars:
63
+ DEBUG: "1"
64
+ ```
65
+
66
+ See `examples/backends/postprocessor_configs/` for more examples.
67
+
31
68
  # Code Formatting and Pre-commit Hooks
32
69
 
33
70
  This repository enforces Python code formatting using [black](https://github.com/psf/black) via the pre-commit framework.
@@ -86,14 +86,33 @@ slurm = "rompy.run.slurm:SlurmRunBackend"
86
86
  [project.entry-points."rompy.postprocess"]
87
87
  noop = "rompy.postprocess:NoopPostprocessor"
88
88
 
89
+ [project.entry-points."rompy.postprocess.config"]
90
+ noop = "rompy.postprocess.config:NoopPostprocessorConfig"
91
+
89
92
  [project.entry-points."rompy.pipeline"]
90
93
  local = "rompy.pipeline:LocalPipelineBackend"
91
94
 
95
+ [project.entry-points."rompy.transfer"]
96
+ file = "rompy.transfer.file:FileTransfer"
97
+ http = "rompy.transfer.http:HttpTransfer"
98
+ https = "rompy.transfer.http:HttpTransfer"
99
+ oceanum = "rompy.transfer.oceanum:OceanumTransfer"
100
+ s3 = "rompy.transfer.cloud:CloudTransfer"
101
+ gs = "rompy.transfer.cloud:CloudTransfer"
102
+ az = "rompy.transfer.cloud:CloudTransfer"
103
+
92
104
  [project.optional-dependencies]
93
105
  test = ["pytest", "envyaml", "coverage"]
94
106
  extra = ["gcsfs", "zarr", "cloudpathlib[s3,gs,azure]"]
107
+ docs = [
108
+ "mkdocs",
109
+ "mkdocs-material",
110
+ "mkdocstrings[python]",
111
+ "mkdocs-gallery",
112
+ "mkdocs-execute-plugin",
113
+ "mkdocs-jupyter",
114
+ ]
95
115
  dev = ["pytest", "envyaml", "coverage", "ruff", "black", "respx"]
96
- docs = ["mkdocs", "mkdocs-material", "mkdocstrings[python]"]
97
116
 
98
117
  [tool.setuptools.packages.find]
99
118
  where = ["src"]
@@ -10,7 +10,30 @@ import warnings
10
10
  from pathlib import Path
11
11
 
12
12
  # Import the new logging system
13
- from .logging import LogFormat, LoggingConfig, LogLevel, get_logger
13
+ # Use absolute imports for documentation execution
14
+ try:
15
+ from .logging import LogFormat, LoggingConfig, LogLevel, get_logger
16
+ except (ImportError, ValueError):
17
+ # Fallback for documentation execution context
18
+ try:
19
+ from rompy.logging import LogFormat, LoggingConfig, LogLevel, get_logger
20
+ except ImportError:
21
+ # Create mock objects for documentation purposes
22
+ class LogFormat:
23
+ pass
24
+
25
+ class LoggingConfig:
26
+ def configure_logging(self):
27
+ pass
28
+
29
+ class LogLevel:
30
+ pass
31
+
32
+ def get_logger(name):
33
+ import logging
34
+
35
+ return logging.getLogger(name)
36
+
14
37
 
15
38
  # Initialize the logger with default configuration
16
39
  logger = get_logger(__name__)
@@ -26,7 +49,7 @@ warnings.filterwarnings(
26
49
  )
27
50
 
28
51
  # __version__ = _version.get_versions()["version"]
29
- __version__ = "0.6.2"
52
+ __version__ = "0.6.4"
30
53
 
31
54
  # Import and re-export formatting utilities
32
55
  from .formatting import get_formatted_box, get_formatted_header_footer
@@ -102,6 +102,10 @@ class LocalConfig(BaseBackendConfig):
102
102
  True, description="Whether to capture stdout and stderr"
103
103
  )
104
104
 
105
+ stream_output: bool = Field(
106
+ False, description="Whether to stream output in real-time"
107
+ )
108
+
105
109
  def get_backend_class(self):
106
110
  """Return the LocalRunBackend class."""
107
111
  from rompy.run import LocalRunBackend
@@ -117,6 +121,7 @@ class LocalConfig(BaseBackendConfig):
117
121
  "command": "python run_model.py",
118
122
  },
119
123
  {"timeout": 3600, "working_dir": "/path/to/model/dir"},
124
+ {"timeout": 3600, "stream_output": True},
120
125
  ]
121
126
  }
122
127
  )
@@ -287,90 +292,59 @@ class DockerConfig(BaseBackendConfig):
287
292
  class SlurmConfig(BaseBackendConfig):
288
293
  """Configuration for SLURM cluster execution."""
289
294
 
290
- model_type: Literal["slurm"] = Field(
291
- "slurm",
292
- description="The backend type."
293
- )
295
+ model_type: Literal["slurm"] = Field("slurm", description="The backend type.")
294
296
  queue: Optional[str] = Field(
295
- None,
296
- description="SLURM partition name (equivalent to queue)"
297
+ None, description="SLURM partition name (equivalent to queue)"
297
298
  )
298
299
 
299
300
  command: str = Field(
300
- ...,
301
- description="Shell command to run in the workspace directory",
302
- min_length=1
303
- )
304
- nodes: int = Field(
305
- 1,
306
- ge=1,
307
- le=100,
308
- description="Number of nodes to allocate"
309
- )
310
- ntasks: int = Field(
311
- 1,
312
- ge=1,
313
- description="Number of tasks (processes) to run"
301
+ ..., description="Shell command to run in the workspace directory", min_length=1
314
302
  )
303
+ nodes: int = Field(1, ge=1, le=100, description="Number of nodes to allocate")
304
+ ntasks: int = Field(1, ge=1, description="Number of tasks (processes) to run")
315
305
  cpus_per_task: int = Field(
316
- 1,
317
- ge=1,
318
- le=128,
319
- description="Number of CPU cores per task"
320
- )
321
- time_limit: str = Field(
322
- "1:00:00",
323
- description="Time limit in format HH:MM:SS"
306
+ 1, ge=1, le=128, description="Number of CPU cores per task"
324
307
  )
308
+ time_limit: str = Field("1:00:00", description="Time limit in format HH:MM:SS")
325
309
  account: Optional[str] = Field(
326
- None,
327
- description="Account for billing/resource tracking"
328
- )
329
- qos: Optional[str] = Field(
330
- None,
331
- description="Quality of Service for the job"
310
+ None, description="Account for billing/resource tracking"
332
311
  )
312
+ qos: Optional[str] = Field(None, description="Quality of Service for the job")
333
313
  reservation: Optional[str] = Field(
334
- None,
335
- description="Reservation name to run job under"
314
+ None, description="Reservation name to run job under"
336
315
  )
337
316
  output_file: Optional[str] = Field(
338
- None,
339
- description="Output file path for job output"
317
+ None, description="Output file path for job output"
340
318
  )
341
319
  error_file: Optional[str] = Field(
342
- None,
343
- description="Error file path for job errors"
344
- )
345
- job_name: Optional[str] = Field(
346
- None,
347
- description="Name for the SLURM job"
320
+ None, description="Error file path for job errors"
348
321
  )
322
+ job_name: Optional[str] = Field(None, description="Name for the SLURM job")
349
323
  mail_type: Optional[str] = Field(
350
- None,
351
- description="Type of mail to send (BEGIN, END, FAIL, ALL, etc.)"
324
+ None, description="Type of mail to send (BEGIN, END, FAIL, ALL, etc.)"
352
325
  )
353
326
  mail_user: Optional[str] = Field(
354
- None,
355
- description="Email address for notifications"
327
+ None, description="Email address for notifications"
356
328
  )
357
329
  additional_options: List[str] = Field(
358
330
  default_factory=list,
359
- description="Additional SLURM options (e.g., '--gres=gpu:1')"
331
+ description="Additional SLURM options (e.g., '--gres=gpu:1')",
360
332
  )
361
333
 
362
- @field_validator('time_limit')
334
+ @field_validator("time_limit")
363
335
  @classmethod
364
336
  def validate_time_limit(cls, v):
365
337
  """Validate time limit format (HH:MM:SS)."""
366
338
  import re
367
- if not re.match(r'^\d{1,4}:\d{2}:\d{2}$', v):
339
+
340
+ if not re.match(r"^\d{1,4}:\d{2}:\d{2}$", v):
368
341
  raise ValueError("Time limit must be in format HH:MM:SS")
369
342
  return v
370
343
 
371
344
  def get_backend_class(self):
372
345
  """Return the SlurmRunBackend class."""
373
346
  from rompy.run.slurm import SlurmRunBackend
347
+
374
348
  return SlurmRunBackend
375
349
 
376
350
  model_config = ConfigDict(
@@ -402,4 +376,4 @@ class SlurmConfig(BaseBackendConfig):
402
376
 
403
377
 
404
378
  # Type alias for all backend configurations
405
- BackendConfig = Union[LocalConfig, DockerConfig, SlurmConfig]
379
+ BackendConfig = Union[LocalConfig, DockerConfig, SlurmConfig]