-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #789 from linsword13/workflow
Add a slurm workflow manager
- Loading branch information
Showing
25 changed files
with
710 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ------------------------------------------------------------------------- | ||
# This is the default ramble repository configuration. It includes the | ||
# builtin ramble base workflow manager repository. | ||
# | ||
# Users can override these settings by editing the following files. | ||
# | ||
# Per-ramble-instance settings (overrides defaults): | ||
# $RAMBLE_ROOT/etc/ramble/base_workflow_manager_repos.yaml | ||
# | ||
# Per-user settings (overrides default and site settings): | ||
# ~/.ramble/base_workflow_manager_repos.yaml | ||
# ------------------------------------------------------------------------- | ||
base_workflow_manager_repos: | ||
- $ramble/var/ramble/repos/builtin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ------------------------------------------------------------------------- | ||
# This is the default ramble repository configuration. It includes the | ||
# builtin ramble application repository. | ||
# | ||
# Users can override these settings by editing the following files. | ||
# | ||
# Per-ramble-instance settings (overrides defaults): | ||
# $RAMBLE_ROOT/etc/ramble/repos.yaml | ||
# | ||
# Per-user settings (overrides default and site settings): | ||
# ~/.ramble/repos.yaml | ||
# ------------------------------------------------------------------------- | ||
workflow_manager_repos: | ||
- $ramble/var/ramble/repos/builtin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright 2022-2025 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
from typing import Optional | ||
|
||
import ramble.language.shared_language | ||
|
||
|
||
class WorkflowManagerMeta(ramble.language.shared_language.SharedMeta): | ||
_directive_names = set() | ||
_directives_to_be_executed = [] | ||
|
||
|
||
workflow_manager_directive = WorkflowManagerMeta.directive | ||
|
||
|
||
@workflow_manager_directive("wm_vars") | ||
def workflow_manager_variable( | ||
name: str, | ||
default, | ||
description: str, | ||
values: Optional[list] = None, | ||
): | ||
"""Define a variable for this wm | ||
Args: | ||
name: Name of variable | ||
default: Default value if the variable is not defined | ||
description: Description of the variable | ||
values: Optional list of suggested values for this variable | ||
""" | ||
|
||
def _define_wm_variable(wm): | ||
import ramble.workload | ||
|
||
wm.wm_vars[name] = ramble.workload.WorkloadVariable( | ||
name, | ||
default=default, | ||
description=description, | ||
values=values, | ||
) | ||
|
||
return _define_wm_variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2022-2025 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
"""Schema for base_workflow_manager_repos.yaml configuration file. | ||
.. literalinclude:: _ramble_root/lib/ramble/ramble/schema/base_workflow_manager_repos.py | ||
:lines: 13- | ||
""" | ||
|
||
|
||
#: Properties for inclusion in other schemas | ||
properties = { | ||
"base_workflow_manager_repos": { | ||
"type": "array", | ||
"default": [], | ||
"items": {"type": "string"}, | ||
}, | ||
} | ||
|
||
|
||
#: Full schema with metadata | ||
schema = { | ||
"$schema": "http://json-schema.org/schema#", | ||
"title": "Ramble base workflow manager repository configuration file schema", | ||
"type": "object", | ||
"additionalProperties": False, | ||
"properties": properties, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2022-2025 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
"""Schema for workflow_manager_repos.yaml configuration file. | ||
.. literalinclude:: _ramble_root/lib/ramble/ramble/schema/workflow_manager_repos.py | ||
:lines: 13- | ||
""" | ||
|
||
|
||
#: Properties for inclusion in other schemas | ||
properties = { | ||
"workflow_manager_repos": { | ||
"type": "array", | ||
"default": [], | ||
"items": {"type": "string"}, | ||
}, | ||
} | ||
|
||
|
||
#: Full schema with metadata | ||
schema = { | ||
"$schema": "http://json-schema.org/schema#", | ||
"title": "Ramble workflow manager repository configuration file schema", | ||
"type": "object", | ||
"additionalProperties": False, | ||
"properties": properties, | ||
} |
Oops, something went wrong.