ramble.workspace package

This package implements Ramble workspaces.

exception ramble.workspace.RambleActiveWorkspaceError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when an invalid workspace is activated

exception ramble.workspace.RambleConflictingDefinitionError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when conflicting software definitions are found

exception ramble.workspace.RambleInvalidTemplateNameError(message, long_message=None)[source]

Bases: RambleError

Error when an invalid template name is provided

exception ramble.workspace.RambleMissingApplicationDirError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using a non-existent application directory

exception ramble.workspace.RambleMissingApplicationError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined application in an experiment specification

exception ramble.workspace.RambleMissingExperimentError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined experiment in an experiment specification

exception ramble.workspace.RambleMissingWorkloadError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined workload in an experiment specification

exception ramble.workspace.RambleWorkspaceError(message, long_message=None)[source]

Bases: RambleError

Superclass for all errors to do with Ramble Workspaces

class ramble.workspace.Workspace(root, dry_run=False, read_default_template=True)[source]

Bases: object

Class representing a working directory for workload experiments

Each workspace must have a config directory, that contains 2 files by default.

  • ramble.yaml

  • execute_experiment.tpl

The ramble.yaml file is the overall configuration file for this workspace. It defines all experiments, variables, and the entire software stack.

The execute_experiment.tpl file is a template script that constants the blueprints for running each experiment. There are several ramble language features that can be used within the script, to help it render properly for all experiments.

Each file with the suffix of .tpl will be expanded into the experiment directory, with the .tpl suffix removed.

Directories will be created for each experiment, when the relevant phase of the application is executed. The workspace provides a self contained execution environment where experiments can be performed.

property active

True if this workspace is currently active.

add_experiments(application, workload_name_variable, workload_filters, include_default_variables, variable_filters, variable_definitions, experiment_name, package_manager=None, zips=None, matrix=None, overwrite=False)[source]

Add new experiments to this workspace

Iterate over the workloads of the input application and define new experiments for each workload that matches any filter provided in workload_filters.

Parameters:
  • application (str) – Name of application to define experiments for

  • workload_name_variable (str) – Name of variable to contain workload names, if the workload names should be collapsed

  • workload_filters (list(str)) – List of filters to downselect workloads with

  • include_default_variables (bool) – Whether to include default variables in the resulting config or not

  • variable_filters (list(str)) – List of filters to downselect variables with

  • variable_definitions (list(str)) – List of variable definitions to use within generated experiments

  • experiment_name (str) – The name of the experiments to add

  • package_manager (str) – Name of package manager to use for the generated experiments

  • zips (list(str) | None) – List of strings representing zips to define, in the format zipname=[var1,var2,var3]

  • matrix (str) – String representing a matrix to define within the experiment in the format of var1,var2,var3.

  • overwrite (bool) – Whether to overwrite existing definitions that collide with new definitions or not.

add_include(new_include)[source]

Add a new include to this workspace

add_to_cache(tupl)[source]
all_applications()[source]

Iterator over applications

Returns application, context where context contains the platform level variables that should be applied.

all_auxiliary_software_files()[source]

Iterator over each file in $workspace/configs/auxiliary_software_files

all_experiments(workload)[source]

Iterator over experiments in a workload dict

Returns experiment, context Where context contains the workload level variables that should be applied.

property all_experiments_path
all_specs()[source]
all_templates()[source]

Iterator over each template in the workspace

all_workloads(application)[source]

Iterator over workloads in an application dict

Returns workload, context where context contains the application level variables that should be applied.

append_result(result)[source]
property archive_dir

Path to the archive directory

property auxiliary_software_dir

Path to the auxiliary software files directory

build_experiment_set()[source]

Create an experiment set representing this workspace

check_cache(tupl)[source]
clear()[source]
concretize(force=False, quiet=False)[source]

Concretize software definitions for defined experiments

Extract suggested software for experiments defined in a workspace, and ensure the software environments are defined properly.

Parameters:
  • force (bool) – Whether to overwrite conflicting definitions of named packages or not

  • quiet (bool) – Whether to silently ignore conflicts or not

property config_dir

Path to the configuration file directory

property config_file_path

Path to the configuration file directory

config_scopes()[source]

A list of all configuration scopes for this workspace.

create_mirror(mirror_root)[source]
date_string()[source]
default_results()[source]
property deployments_dir

Path to the deployments directory

destroy()[source]

Remove this workspace from Ramble entirely.

dump_results(output_formats=None, print_results=False, summary_only=False)[source]

Write out result file in desired format

This attempts to avoid the loss of previous results data by appending the datetime to the filename, but is willing to clobber the file results.latest.<extension>

property experiment_dir

Path to the experiment directory

extract_success_criteria(scope, contents)[source]

Extract success citeria, and inject it into the scoped list

Extract success criteria from a contents dictionary, and inject it into the scoped success list within the right scope.

get_applications()[source]

Get the dictionary of applications

get_metadata(key)[source]

Get the value of a metadata key

Parameters:

key (str) – Name of metadata key to retrieve

Returns:

Value associated with key in metadata

Return type:

(Any)

get_software_dict()[source]

Return the software dictionary for this workspace

get_workspace_env_vars()[source]

Return a dict of workspace environment variables

get_workspace_formatted_executables()[source]

Return a dict of workspace formatted executables

get_workspace_internals()[source]

Return a dict of workspace internals

get_workspace_modifiers()[source]

Return a dict of workspace modifiers

classmethod get_workspace_paths(root)[source]

Construct dictionary of path replacements for workspace

get_workspace_variants()[source]

Return a dict of workspace variants

get_workspace_vars()[source]

Return a dict of workspace variables

get_workspace_zips()[source]

Return a dict of workspace zips

hash_file_name = 'workspace_hash.sha256'
included_config_scopes()[source]

List of included configuration scopes from the environment.

Scopes are listed in the YAML file in order from highest to lowest precedence, so configuration from earlier scope will take precedence over later ones.

This routine returns them in the order they should be pushed onto the internal scope stack (so, in reverse, from lowest to highest).

property input_dir

Path to the input directory

insert_result(result, insert_before_exp)[source]

Insert a result before a specified experiment

property internal

Whether this workspace is managed by Ramble.

property internal_subdir

Subdirectory for housing ramble internals

inventory_file_name = 'ramble_inventory.json'
property latest_archive
property latest_archive_path
property log_dir

Path to the logs directory

manage_environments(env_name, env_packages='', external_path=None, remove=False, overwrite=False)[source]

Manipulate software environments

Create, change, remove, and augment software environment definitions.

Parameters:
  • env_name (str) – Name of environment to manipulate

  • env_packages (str) – (Optional) Comma delimited list of packages to add into this environment

  • external_path (str) – (Optional) Path to external environment definition

  • remove (bool) – Whether the named environment should be removed from the workspace

  • overwrite (bool) – Whether new definition should overwrite existing definitions

manage_packages(pkg_name, pkg_spec='', compiler_pkg=None, compiler_spec=None, package_manager_prefix=None, remove=False, overwrite=False)[source]

Manage workspace package definitions

Create, remove, update, or augment package definitions.

Parameters:
  • pkg_name (str) – Name of package to manipulate

  • pkg_spec (str) – Package spec for the package manager

  • compiler_pkg (str) – Name of the package to use as a compiler for this package

  • compiler_spec (str) – When this package is used as a compiler for another, the string to refer to this package.

  • package_manager_prefix (str) – A package manager specific prefix to apply to package attribute definitions

  • remove (bool) – Whether the named package should be removed from the workspace

  • overwrite (bool) – Whether colliding definitions should be overwritten

property name

Human-readable representation of the workspace.

The name of the workspace is the basename of its path

property named_deployment

Path to the specific deployment directory

property path

Location of the workspace

print_config()[source]
read_file_content(file_path)[source]

Read and cache the file content

This should only be used on files that are not modified during the lifetime of the workspace command execution.

read_transaction()[source]

Get a read lock context manager for use in a with block.

remove_include(index=None, pattern=None)[source]

Remove one or more includes from this workspace.

Parameters:
  • index (int) – (Optional) Numerical position of include to remove

  • pattern (str) – (Optional) String or pattern of include to remove. Removes all matching includes.

property shared_dir

Path to the shared directory

property shared_license_dir

Path to the shared license directory

simplify()[source]
property software_dir

Path to the software directory

Create symlink of result file so that results.latest.txt always points to the most recent analysis. This clobbers the existing link

template_path(name)[source]
update_metadata(key, value)[source]

Set the metadata key value

Parameters:
  • key (str) – Key of metadata to set

  • value (Any) – Value to set in the metadata object

workspace_paths()[source]

Dictionary of path replacements for workspace

write(software_dir=None, inputs_dir=None)[source]

Write an in-memory workspace to its location on disk.

write_json_results()[source]
write_transaction()[source]

Get a write lock context manager for use in a with block.

ws_file_config_scope()[source]

Get the configuration scope for the workspace’s config file.

ws_file_config_scope_name()[source]

Name of the config scope of this workspace’s config file.

ramble.workspace.activate(ws)[source]

Activate a workspace.

To activate a workspace, we add its configuration scope to the existing Ramble configuration, and we set active to the current workspace.

Parameters:

ws (Workspace) – the workspace to activate

ramble.workspace.active(name)[source]

True if the named workspace is active.

ramble.workspace.active_workspace()[source]

Returns the active workspace when there is any

ramble.workspace.all_config_files(path)[source]

Returns path to all yaml files in workspace config directory

ramble.workspace.all_template_paths(path)[source]

Returns (abs) path to available template files in the workspace

ramble.workspace.all_workspace_names()[source]

List the names of workspaces that currently exist.

ramble.workspace.all_workspaces()[source]

Generator for all named workspaces.

ramble.workspace.config_dict(yaml_data)[source]

Get the configuration scope section out of a ramble.yaml

ramble.workspace.config_file(path)[source]

Returns the path to a workspace’s ramble.yaml

ramble.workspace.create(name, read_default_template=True)[source]

Create a named workspace in Ramble

ramble.workspace.deactivate()[source]

Undo any configuration settings modified by activate().

ramble.workspace.exists(name)[source]

Whether a workspace with this name exists or not.

ramble.workspace.get_filepath(path, file_name)[source]
ramble.workspace.get_workspace_path()[source]

Returns current directory of ramble-managed workspaces

ramble.workspace.is_workspace_dir(path)[source]

Whether a directory contains a ramble workspace.

ramble.workspace.licenses_file(path)[source]

Returns the path to a workspace’s licenses.yaml

class ramble.workspace.namespace[source]

Bases: object

Class of namespace variables

application = 'applications'
chained_experiments = 'chained_experiments'
command = 'command'
commands = 'commands'
compiler = 'compiler'
compiler_spec = 'compiler_spec'
custom_executables = 'custom_executables'
env_var = 'env_vars'
environments = 'environments'
exclude = 'exclude'
executable_injection = 'executable_injection'
executables = 'executables'
experiment = 'experiments'
external_env = 'external_env'
formatted_executables = 'formatted_executables'
include = 'include'
indentation = 'indentation'
inherit_variables = 'inherit_variables'
internals = 'internals'
join_separator = 'join_separator'
matrices = 'matrices'
matrix = 'matrix'
metadata = 'metadata'
modifiers = 'modifiers'
n_repeats = 'n_repeats'
package_manager = 'package_manager'
packages = 'packages'
pkg_spec = 'pkg_spec'
prefix = 'prefix'
ramble = 'ramble'
software = 'software'
success = 'success_criteria'
tags = 'tags'
template = 'template'
variables = 'variables'
variants = 'variants'
where = 'where'
workflow_manager = 'workflow_manager'
workload = 'workloads'
zips = 'zips'
ramble.workspace.no_active_workspace()[source]

Deactivate the active workspace for the duration of the context. Has no effect when there is no active workspace.

ramble.workspace.read(name)[source]

Get a workspace with the supplied name.

ramble.workspace.root(name)[source]

Get the root directory for a workspace by name.

ramble.workspace.template_path(ws_path, requested_template_name)[source]

Returns the path to a workspace’s template file

Submodules

ramble.workspace.shell module

ramble.workspace.shell.activate(ws)[source]

Activate an environment and append environment modifications

To activate an environment, we add its configuration scope to the existing Spack configuration, and we set active to the current environment.

Parameters:
  • env (spack.environment.Environment) – the environment to activate

  • use_env_repo (bool) – use the packages exactly as they appear in the environment’s repository

  • add_view (bool) – generate commands to add view to path variables

Returns:

Environment variables modifications to activate environment.

Return type:

spack.util.environment.EnvironmentModifications

ramble.workspace.shell.activate_header(ws, shell, prompt=None)[source]
ramble.workspace.shell.deactivate()[source]

Deactivate an environment and collect corresponding environment modifications.

Note: unloads the environment in its current state, not in the state it was

loaded in, meaning that specs that were removed from the spack environment after activation are not unloaded.

Returns:

Environment variables modifications to activate environment.

Return type:

spack.util.environment.EnvironmentModifications

ramble.workspace.shell.deactivate_header(shell)[source]

ramble.workspace.workspace module

exception ramble.workspace.workspace.RambleActiveWorkspaceError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when an invalid workspace is activated

exception ramble.workspace.workspace.RambleConflictingDefinitionError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when conflicting software definitions are found

exception ramble.workspace.workspace.RambleInvalidTemplateNameError(message, long_message=None)[source]

Bases: RambleError

Error when an invalid template name is provided

exception ramble.workspace.workspace.RambleMissingApplicationDirError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using a non-existent application directory

exception ramble.workspace.workspace.RambleMissingApplicationError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined application in an experiment specification

exception ramble.workspace.workspace.RambleMissingExperimentError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined experiment in an experiment specification

exception ramble.workspace.workspace.RambleMissingWorkloadError(message, long_message=None)[source]

Bases: RambleWorkspaceError

Error when using an undefined workload in an experiment specification

exception ramble.workspace.workspace.RambleWorkspaceError(message, long_message=None)[source]

Bases: RambleError

Superclass for all errors to do with Ramble Workspaces

class ramble.workspace.workspace.Workspace(root, dry_run=False, read_default_template=True)[source]

Bases: object

Class representing a working directory for workload experiments

Each workspace must have a config directory, that contains 2 files by default.

  • ramble.yaml

  • execute_experiment.tpl

The ramble.yaml file is the overall configuration file for this workspace. It defines all experiments, variables, and the entire software stack.

The execute_experiment.tpl file is a template script that constants the blueprints for running each experiment. There are several ramble language features that can be used within the script, to help it render properly for all experiments.

Each file with the suffix of .tpl will be expanded into the experiment directory, with the .tpl suffix removed.

Directories will be created for each experiment, when the relevant phase of the application is executed. The workspace provides a self contained execution environment where experiments can be performed.

property active

True if this workspace is currently active.

add_experiments(application, workload_name_variable, workload_filters, include_default_variables, variable_filters, variable_definitions, experiment_name, package_manager=None, zips=None, matrix=None, overwrite=False)[source]

Add new experiments to this workspace

Iterate over the workloads of the input application and define new experiments for each workload that matches any filter provided in workload_filters.

Parameters:
  • application (str) – Name of application to define experiments for

  • workload_name_variable (str) – Name of variable to contain workload names, if the workload names should be collapsed

  • workload_filters (list(str)) – List of filters to downselect workloads with

  • include_default_variables (bool) – Whether to include default variables in the resulting config or not

  • variable_filters (list(str)) – List of filters to downselect variables with

  • variable_definitions (list(str)) – List of variable definitions to use within generated experiments

  • experiment_name (str) – The name of the experiments to add

  • package_manager (str) – Name of package manager to use for the generated experiments

  • zips (list(str) | None) – List of strings representing zips to define, in the format zipname=[var1,var2,var3]

  • matrix (str) – String representing a matrix to define within the experiment in the format of var1,var2,var3.

  • overwrite (bool) – Whether to overwrite existing definitions that collide with new definitions or not.

add_include(new_include)[source]

Add a new include to this workspace

add_to_cache(tupl)[source]
all_applications()[source]

Iterator over applications

Returns application, context where context contains the platform level variables that should be applied.

all_auxiliary_software_files()[source]

Iterator over each file in $workspace/configs/auxiliary_software_files

all_experiments(workload)[source]

Iterator over experiments in a workload dict

Returns experiment, context Where context contains the workload level variables that should be applied.

property all_experiments_path
all_specs()[source]
all_templates()[source]

Iterator over each template in the workspace

all_workloads(application)[source]

Iterator over workloads in an application dict

Returns workload, context where context contains the application level variables that should be applied.

append_result(result)[source]
property archive_dir

Path to the archive directory

property auxiliary_software_dir

Path to the auxiliary software files directory

build_experiment_set()[source]

Create an experiment set representing this workspace

check_cache(tupl)[source]
clear()[source]
concretize(force=False, quiet=False)[source]

Concretize software definitions for defined experiments

Extract suggested software for experiments defined in a workspace, and ensure the software environments are defined properly.

Parameters:
  • force (bool) – Whether to overwrite conflicting definitions of named packages or not

  • quiet (bool) – Whether to silently ignore conflicts or not

property config_dir

Path to the configuration file directory

property config_file_path

Path to the configuration file directory

config_scopes()[source]

A list of all configuration scopes for this workspace.

create_mirror(mirror_root)[source]
date_string()[source]
default_results()[source]
property deployments_dir

Path to the deployments directory

destroy()[source]

Remove this workspace from Ramble entirely.

dump_results(output_formats=None, print_results=False, summary_only=False)[source]

Write out result file in desired format

This attempts to avoid the loss of previous results data by appending the datetime to the filename, but is willing to clobber the file results.latest.<extension>

property experiment_dir

Path to the experiment directory

extract_success_criteria(scope, contents)[source]

Extract success citeria, and inject it into the scoped list

Extract success criteria from a contents dictionary, and inject it into the scoped success list within the right scope.

get_applications()[source]

Get the dictionary of applications

get_metadata(key)[source]

Get the value of a metadata key

Parameters:

key (str) – Name of metadata key to retrieve

Returns:

Value associated with key in metadata

Return type:

(Any)

get_software_dict()[source]

Return the software dictionary for this workspace

get_workspace_env_vars()[source]

Return a dict of workspace environment variables

get_workspace_formatted_executables()[source]

Return a dict of workspace formatted executables

get_workspace_internals()[source]

Return a dict of workspace internals

get_workspace_modifiers()[source]

Return a dict of workspace modifiers

classmethod get_workspace_paths(root)[source]

Construct dictionary of path replacements for workspace

get_workspace_variants()[source]

Return a dict of workspace variants

get_workspace_vars()[source]

Return a dict of workspace variables

get_workspace_zips()[source]

Return a dict of workspace zips

hash_file_name = 'workspace_hash.sha256'
included_config_scopes()[source]

List of included configuration scopes from the environment.

Scopes are listed in the YAML file in order from highest to lowest precedence, so configuration from earlier scope will take precedence over later ones.

This routine returns them in the order they should be pushed onto the internal scope stack (so, in reverse, from lowest to highest).

property input_dir

Path to the input directory

insert_result(result, insert_before_exp)[source]

Insert a result before a specified experiment

property internal

Whether this workspace is managed by Ramble.

property internal_subdir

Subdirectory for housing ramble internals

inventory_file_name = 'ramble_inventory.json'
property latest_archive
property latest_archive_path
property log_dir

Path to the logs directory

manage_environments(env_name, env_packages='', external_path=None, remove=False, overwrite=False)[source]

Manipulate software environments

Create, change, remove, and augment software environment definitions.

Parameters:
  • env_name (str) – Name of environment to manipulate

  • env_packages (str) – (Optional) Comma delimited list of packages to add into this environment

  • external_path (str) – (Optional) Path to external environment definition

  • remove (bool) – Whether the named environment should be removed from the workspace

  • overwrite (bool) – Whether new definition should overwrite existing definitions

manage_packages(pkg_name, pkg_spec='', compiler_pkg=None, compiler_spec=None, package_manager_prefix=None, remove=False, overwrite=False)[source]

Manage workspace package definitions

Create, remove, update, or augment package definitions.

Parameters:
  • pkg_name (str) – Name of package to manipulate

  • pkg_spec (str) – Package spec for the package manager

  • compiler_pkg (str) – Name of the package to use as a compiler for this package

  • compiler_spec (str) – When this package is used as a compiler for another, the string to refer to this package.

  • package_manager_prefix (str) – A package manager specific prefix to apply to package attribute definitions

  • remove (bool) – Whether the named package should be removed from the workspace

  • overwrite (bool) – Whether colliding definitions should be overwritten

property name

Human-readable representation of the workspace.

The name of the workspace is the basename of its path

property named_deployment

Path to the specific deployment directory

property path

Location of the workspace

print_config()[source]
read_file_content(file_path)[source]

Read and cache the file content

This should only be used on files that are not modified during the lifetime of the workspace command execution.

read_transaction()[source]

Get a read lock context manager for use in a with block.

remove_include(index=None, pattern=None)[source]

Remove one or more includes from this workspace.

Parameters:
  • index (int) – (Optional) Numerical position of include to remove

  • pattern (str) – (Optional) String or pattern of include to remove. Removes all matching includes.

property shared_dir

Path to the shared directory

property shared_license_dir

Path to the shared license directory

simplify()[source]
property software_dir

Path to the software directory

Create symlink of result file so that results.latest.txt always points to the most recent analysis. This clobbers the existing link

template_path(name)[source]
update_metadata(key, value)[source]

Set the metadata key value

Parameters:
  • key (str) – Key of metadata to set

  • value (Any) – Value to set in the metadata object

workspace_paths()[source]

Dictionary of path replacements for workspace

write(software_dir=None, inputs_dir=None)[source]

Write an in-memory workspace to its location on disk.

write_json_results()[source]
write_transaction()[source]

Get a write lock context manager for use in a with block.

ws_file_config_scope()[source]

Get the configuration scope for the workspace’s config file.

ws_file_config_scope_name()[source]

Name of the config scope of this workspace’s config file.

ramble.workspace.workspace.activate(ws)[source]

Activate a workspace.

To activate a workspace, we add its configuration scope to the existing Ramble configuration, and we set active to the current workspace.

Parameters:

ws (Workspace) – the workspace to activate

ramble.workspace.workspace.active(name)[source]

True if the named workspace is active.

ramble.workspace.workspace.active_workspace()[source]

Returns the active workspace when there is any

ramble.workspace.workspace.all_config_files(path)[source]

Returns path to all yaml files in workspace config directory

ramble.workspace.workspace.all_template_paths(path)[source]

Returns (abs) path to available template files in the workspace

ramble.workspace.workspace.all_workspace_names()[source]

List the names of workspaces that currently exist.

ramble.workspace.workspace.all_workspaces()[source]

Generator for all named workspaces.

ramble.workspace.workspace.applications_schema = {'$schema': 'http://json-schema.org/schema#', 'additionalProperties': False, 'properties': {'applications': {'additionalProperties': {'additionalProperties': False, 'default': '{}', 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'workloads': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'experiments': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'exclude': {'additionalProperties': False, 'default': {}, 'properties': {'matrices': {'default': [], 'items': {'anyOf': [{'default': [], 'items': {'type': 'string'}, 'type': 'array'}, {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}]}, 'type': 'array'}, 'matrix': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'where': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'matrices': {'default': [], 'items': {'anyOf': [{'default': [], 'items': {'type': 'string'}, 'type': 'array'}, {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}]}, 'type': 'array'}, 'matrix': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'n_repeats': {'anyOf': [{'type': 'string'}, {'type': 'number'}], 'default': 0}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'title': 'Ramble application configuration file schema', 'type': 'object'}

Config schema for application files

ramble.workspace.workspace.auxiliary_software_dir_name = 'auxiliary_software_files'

Directory name for auxiliary software files

ramble.workspace.workspace.config_dict(yaml_data)[source]

Get the configuration scope section out of a ramble.yaml

ramble.workspace.workspace.config_file(path)[source]

Returns the path to a workspace’s ramble.yaml

ramble.workspace.workspace.config_schema = {'$schema': 'http://json-schema.org/schema#', 'additionalProperties': {'spack': {'additionalProperties': False, 'default': {}, 'properties': {'environments': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'external_env': {'default': None, 'type': 'string'}, 'external_spack_env': {'default': None, 'type': 'string'}, 'packages': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'packages': {'additionalProperties': {'additionalProperties': {'type': 'string'}, 'default': {}, 'properties': {'compiler': {'default': None, 'type': 'string'}, 'compiler_spec': {'default': None, 'type': 'string'}, 'pkg_spec': {'type': 'string'}}, 'type': 'object'}, 'type': 'object'}}, 'type': 'object'}}, 'properties': {'ramble': {'additionalProperties': False, 'default': {}, 'properties': {'applications': {'additionalProperties': {'additionalProperties': False, 'default': '{}', 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'workloads': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'experiments': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'chained_experiments': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'command': {'type': 'string'}, 'inherit_variables': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'name': {'type': 'string'}, 'order': {'type': 'string'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'type': 'array'}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'exclude': {'additionalProperties': False, 'default': {}, 'properties': {'matrices': {'default': [], 'items': {'anyOf': [{'default': [], 'items': {'type': 'string'}, 'type': 'array'}, {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}]}, 'type': 'array'}, 'matrix': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'where': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'matrices': {'default': [], 'items': {'anyOf': [{'default': [], 'items': {'type': 'string'}, 'type': 'array'}, {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}]}, 'type': 'array'}, 'matrix': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'n_repeats': {'anyOf': [{'type': 'string'}, {'type': 'number'}], 'default': 0}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'tags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'template': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'config': {'default': {}, 'deprecatedProperties': {'error': False, 'message': 'config:module_roots has been replaced by modules:[module set]:roots and is ignored', 'properties': ['module_roots']}, 'disable_logger': {'default': False, 'type': 'boolean'}, 'disable_passthrough': {'default': False, 'type': 'boolean'}, 'disable_progress_bar': {'default': False, 'type': 'boolean'}, 'input_cache': {'default': '$ramble/var/ramble/cache', 'type': 'string'}, 'n_repeats': {'default': '0', 'type': 'string'}, 'pip': {'additionalProperties': False, 'default': {'install': {'flags': []}}, 'properties': {'install': {'additionalProperties': False, 'properties': {'flags': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'properties': {'additional_external_search_paths': {'items': {'type': 'string'}, 'type': 'array'}, 'allow_sgid': {'type': 'boolean'}, 'binary_index_root': {'type': 'string'}, 'build_jobs': {'minimum': 1, 'type': 'integer'}, 'build_language': {'type': 'string'}, 'build_stage': {'oneOf': [{'type': 'string'}, {'items': {'type': 'string'}, 'type': 'array'}]}, 'ccache': {'type': 'boolean'}, 'checksum': {'type': 'boolean'}, 'concretizer': {'enum': ['original', 'clingo'], 'type': 'string'}, 'connect_timeout': {'minimum': 0, 'type': 'integer'}, 'db_lock_timeout': {'minimum': 1, 'type': 'integer'}, 'debug': {'type': 'boolean'}, 'deprecated': {'type': 'boolean'}, 'dirty': {'type': 'boolean'}, 'extensions': {'items': {'type': 'string'}, 'type': 'array'}, 'install_hash_length': {'minimum': 1, 'type': 'integer'}, 'install_missing_compilers': {'type': 'boolean'}, 'install_path_scheme': {'type': 'string'}, 'install_tree': {'anyOf': [{'properties': {'padded_length': {'oneOf': [{'minimum': 0, 'type': 'integer'}, {'type': 'boolean'}]}, 'projections': {'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}, 'type': 'object'}, 'root': {'type': 'string'}}, 'type': 'object'}, {'type': 'string'}]}, 'license_dir': {'type': 'string'}, 'locks': {'type': 'boolean'}, 'misc_cache': {'type': 'string'}, 'package_lock_timeout': {'anyOf': [{'minimum': 1, 'type': 'integer'}, {'type': 'null'}]}, 'shared_linking': {'enum': ['rpath', 'runpath'], 'type': 'string'}, 'source_cache': {'type': 'string'}, 'suppress_gpg_warnings': {'type': 'boolean'}, 'template_dirs': {'items': {'type': 'string'}, 'type': 'array'}, 'test_stage': {'type': 'string'}, 'url_fetch_method': {'enum': ['urllib', 'curl'], 'type': 'string'}, 'verify_ssl': {'type': 'boolean'}}, 'repeat_success_strict': {'default': True, 'type': 'boolean'}, 'report_dirs': {'default': '~/.ramble/reports', 'type': 'string'}, 'shell': {'enum': ['sh', 'bash', 'csh', 'tcsh', 'fish'], 'type': 'string'}, 'spack': {'additionalProperties': False, 'default': {'concretize': {'flags': '--reuse'}, 'install': {'flags': '--reuse'}}, 'flags': {}, 'properties': {'buildcache': {'additionalProperties': False, 'default': {'flags': '', 'prefix': ''}, 'properties': {'flags': {'default': '', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'compiler_find': {'default': {'flags': '', 'prefix': ''}, 'properties': {'flags': {'default': '', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'concretize': {'additionalProperties': False, 'default': {'flags': '--reuse', 'prefix': ''}, 'properties': {'flags': {'default': '--reuse', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'env_create': {'additionalProperties': False, 'default': {'flags': ''}, 'properties': {'flags': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'env_view': {'additionalProperties': False, 'default': {'link_type': 'symlink'}, 'properties': {'link_type': {'default': 'symlink', 'type': 'string'}}, 'type': 'object'}, 'global': {'additionalProperties': False, 'default': {'flags': ''}, 'properties': {'flags': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'install': {'additionalProperties': False, 'default': {'flags': '--reuse', 'prefix': ''}, 'properties': {'flags': {'default': '--reuse', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'object', 'upload': {'properties': {'push_failed': {'default': True, 'type': 'boolean'}, 'type': {'default': 'BigQuery', 'enum': ['BigQuery', 'PrintOnly'], 'type': 'string'}, 'uri': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'user': {'default': '', 'type': 'string'}, 'workspace_dirs': {'default': '$ramble/var/ramble/workspaces', 'type': 'string'}}, 'env_vars': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'formatted_executables': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'commands': {'default': ['{unformatted_command}'], 'items': {'type': 'string'}, 'type': 'array'}, 'indentation': {'default': 0, 'type': 'number'}, 'join_separator': {'default': '\n', 'type': 'string'}, 'prefix': {'default': '', 'type': 'string'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'include': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'internals': {'additionalProperties': False, 'default': {}, 'properties': {'custom_executables': {'additionalProperties': {'default': {'output_capture': OUTPUT_CAPTURE.ALL, 'redirect': '{log_file}', 'template': [], 'use_mpi': False, 'variables': {}}, 'properties': {'redirect': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'template': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}]}, 'use_mpi': {'type': 'boolean'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'executable_injection': {'default': [], 'items': {'additionalProperties': {'relative_to': {'type': 'string'}}, 'default': {}, 'properties': {'name': {'type': 'string'}, 'order': {'default': 'after', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'executables': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'licenses': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'append': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'var-separator': {'type': 'string'}, 'vars': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'prepend': {'items': {'additionalProperties': {}, 'properties': {'paths': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}}, 'type': 'object'}, 'type': 'array'}, 'set': {'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'type': 'object'}, 'unset': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'modifiers': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'mode': {'type': 'string'}, 'name': {'type': 'string'}, 'on_executable': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'type': 'array'}, 'repos': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'software': {'additionalProperties': False, 'default': {}, 'properties': {'environments': {'additionalProperties': {'additionalProperties': {'type': 'string'}, 'default': {}, 'properties': {'external_env': {'default': None, 'type': 'string'}, 'packages': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'packages': {'additionalProperties': {'additionalProperties': True, 'default': {}, 'properties': {'compiler': {'default': None, 'type': 'string'}, 'compiler_spec': {'default': None, 'type': 'string'}, 'pkg_spec': {'type': 'string'}}, 'type': 'object'}, 'type': 'object'}}, 'type': 'object'}, 'spack': {'additionalProperties': False, 'default': {}, 'properties': {'environments': {'additionalProperties': {'additionalProperties': False, 'default': {}, 'properties': {'external_env': {'default': None, 'type': 'string'}, 'external_spack_env': {'default': None, 'type': 'string'}, 'packages': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'default': {}, 'properties': {}, 'type': 'object'}, 'packages': {'additionalProperties': {'additionalProperties': {'type': 'string'}, 'default': {}, 'properties': {'compiler': {'default': None, 'type': 'string'}, 'compiler_spec': {'default': None, 'type': 'string'}, 'pkg_spec': {'type': 'string'}}, 'type': 'object'}, 'type': 'object'}}, 'type': 'object'}, 'success_criteria': {'default': [], 'items': {'additionalProperties': False, 'default': {}, 'properties': {'anti_match': {'default': None, 'type': 'string'}, 'file': {'default': None, 'type': 'string'}, 'fom_context': {'default': None, 'type': 'string'}, 'fom_name': {'default': None, 'type': 'string'}, 'formula': {'default': None, 'type': 'string'}, 'match': {'default': None, 'type': 'string'}, 'mode': {'type': 'string'}, 'name': {'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'variables': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'variants': {'additionalProperties': True, 'default': {}, 'properties': {}, 'type': ['object', 'null']}, 'zips': {'additionalProperties': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'default': {}, 'properties': {}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Ramble workspace configuration file schema', 'type': 'object'}

Config file information for workspaces. Keys are filenames, values are dictionaries describing the config files.

ramble.workspace.workspace.create(name, read_default_template=True)[source]

Create a named workspace in Ramble

ramble.workspace.workspace.deactivate()[source]

Undo any configuration settings modified by activate().

ramble.workspace.workspace.deactivate_config_scope(workspace)[source]

Remove any scopes from workspace from the global config path.

ramble.workspace.workspace.exists(name)[source]

Whether a workspace with this name exists or not.

ramble.workspace.workspace.get_filepath(path, file_name)[source]
ramble.workspace.workspace.get_workspace(args, cmd_name, required=False)[source]

Used by commands to get the active workspace.

This first checks for a workspace argument, then looks at the active workspace. We check args first because Ramble’s subcommand arguments are parsed after the -s and -D arguments to ramble. So there may be a workspace argument that is not the active workspace, and we give it precedence.

This is used by a number of commands for determining whether there is an active workspace.

If a workspace is not found and is required, print an error message that says the calling command needs an active workspace.

Parameters:
  • args (ramble.namespace) – argparse namespace with command arguments

  • cmd_name (str) – name of calling command

  • required (bool) – if True, raise an exception when no workspace is found; if False, just return None

Returns:

if there is an arg or active workspace

Return type:

(Workspace)

ramble.workspace.workspace.get_workspace_path()[source]

Returns current directory of ramble-managed workspaces

ramble.workspace.workspace.is_workspace_dir(path)[source]

Whether a directory contains a ramble workspace.

ramble.workspace.workspace.license_path(name)[source]

Get the path to the shared license include for a workspace by name.

ramble.workspace.workspace.licenses_file(path)[source]

Returns the path to a workspace’s licenses.yaml

ramble.workspace.workspace.lockfile_name = 'ramble.lock'

Name of lockfile within a workspace

ramble.workspace.workspace.no_active_workspace()[source]

Deactivate the active workspace for the duration of the context. Has no effect when there is no active workspace.

ramble.workspace.workspace.prepare_config_scope(workspace)[source]

Add workspace’s scope to the global configuration search path.

ramble.workspace.workspace.ramble_workspace_var = 'RAMBLE_WORKSPACE'

Environment variable used to indicate the active workspace

ramble.workspace.workspace.read(name)[source]

Get a workspace with the supplied name.

ramble.workspace.workspace.root(name)[source]

Get the root directory for a workspace by name.

ramble.workspace.workspace.template_path(ws_path, requested_template_name)[source]

Returns the path to a workspace’s template file

ramble.workspace.workspace.valid_workspace_name(name)[source]
ramble.workspace.workspace.valid_workspace_name_re = '^\\w[\\w-]*$'

regex for validating workspace names

ramble.workspace.workspace.validate_workspace_name(name)[source]
ramble.workspace.workspace.workspace_archive_path = 'archive'

Name of the subdirectory where workspace archives are stored

ramble.workspace.workspace.workspace_config_path = 'configs'

Subdirectory where workspace configs are stored

ramble.workspace.workspace.workspace_deployments_path = 'deployments'

Name of the subdirectory where deployments are stored

ramble.workspace.workspace.workspace_experiment_path = 'experiments'

Name of subdirectory within workspaces where experiments are stored

ramble.workspace.workspace.workspace_input_path = 'inputs'

Name of subdirectory within workspaces where input files are stored

ramble.workspace.workspace.workspace_log_path = 'logs'

Name of subdirectory within workspaces where logs are stored

ramble.workspace.workspace.workspace_shared_license_path = 'licenses'

Name of the subdirectory where shared/sourale files are stored

ramble.workspace.workspace.workspace_shared_path = 'shared'

Name of the subdirectory where shared/sourale files are stored

ramble.workspace.workspace.workspace_software_path = 'software'

Name of subdirectory within workspaces where software environment are stored

ramble.workspace.workspace.workspace_template_extension = '.tpl'

Extension for template files

ramble.workspace.workspace.yaml_equivalent(first, second)[source]

Returns whether two ramble yaml items are equivalent, including overrides