Skip to content

Commit 02bc4a2

Browse files
Merge branch 'main' into glob_staging
2 parents 126454f + e933955 commit 02bc4a2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/uwtools/scheduler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def _managed_directives(self) -> dict[str, Any]:
348348
A mapping from canonical names to scheduler-specific CLI switches.
349349
"""
350350
return {
351+
_DirectivesOptional.CLUSTERS: "--clusters",
351352
_DirectivesOptional.CORES: "--ntasks",
352353
_DirectivesOptional.DEBUG: lambda b: "--verbose" if b else None,
353354
_DirectivesOptional.EXCLUSIVE: lambda b: "--exclusive" if b else None,
@@ -394,6 +395,7 @@ class _DirectivesOptional:
394395
Keys for optional directives.
395396
"""
396397

398+
CLUSTERS: str = "clusters"
397399
CORES: str = "cores"
398400
DEBUG: str = "debug"
399401
EXCLUSIVE: str = "exclusive"

src/uwtools/tests/test_scheduler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ def test_Slurm__forbidden_directives(slurm):
279279

280280
def test_Slurm__managed_directives(slurm):
281281
mds = slurm._managed_directives
282+
assert mds["clusters"] == "--clusters"
282283
assert mds["cores"] == "--ntasks"
283284
assert mds["debug"](True) == "--verbose"
284285
assert mds["debug"](False) is None

0 commit comments

Comments
 (0)