hpcflow SDK#
Subpackages#
- hpcflow.sdk.config package
- Submodules
- hpcflow.sdk.config.callbacks module
- hpcflow.sdk.config.cli module
- hpcflow.sdk.config.config module
- hpcflow.sdk.config.config_file module
- hpcflow.sdk.config.errors module
ConfigChangeFileUpdateError
ConfigChangeInvalidError
ConfigChangeInvalidJSONError
ConfigChangePopIndexError
ConfigChangeTypeInvalidError
ConfigChangeValidationError
ConfigDefaultValidationError
ConfigError
ConfigFileInvocationIncompatibleError
ConfigFileValidationError
ConfigInvocationKeyNotFoundError
ConfigItemAlreadyUnsetError
ConfigItemCallbackError
ConfigNonConfigurableError
ConfigUnknownItemError
ConfigUnknownOverrideError
ConfigValidationError
MissingEnvironmentFileError
MissingTaskSchemaFileError
- Module contents
- hpcflow.sdk.core package
- Submodules
- hpcflow.sdk.core.actions module
Action
Action.expand()
Action.generate_data_index()
Action.get_command_input_types()
Action.get_command_output_types()
Action.get_commands_action_env()
Action.get_input_file_generator_action_env()
Action.get_input_file_labels()
Action.get_input_types()
Action.get_output_file_labels()
Action.get_output_file_parser_action_env()
Action.get_output_types()
Action.get_parameter_dependence()
Action.get_possible_scopes()
Action.get_precise_scope()
Action.get_resolved_action_env()
Action.get_script_path()
Action.is_input_type_required()
Action.task_schema
ActionEnvironment
ActionRule
ActionScope
ActionScopeType
EARSubmissionStatus
EAR_ID
ElementAction
ElementAction.action
ElementAction.action_idx
ElementAction.element
ElementAction.element_iteration
ElementAction.get()
ElementAction.get_data_idx()
ElementAction.get_parameter_names()
ElementAction.get_parameter_sources()
ElementAction.input_files
ElementAction.inputs
ElementAction.num_runs
ElementAction.output_files
ElementAction.outputs
ElementAction.runs
ElementAction.task
ElementActionOLD
ElementActionRun
ElementActionRun.EAR_ID
ElementActionRun.action
ElementActionRun.compose_commands()
ElementActionRun.compose_source()
ElementActionRun.data_idx
ElementActionRun.element
ElementActionRun.element_action
ElementActionRun.element_iteration
ElementActionRun.end_time
ElementActionRun.get()
ElementActionRun.get_EAR_dependencies()
ElementActionRun.get_IFG_input_values()
ElementActionRun.get_OFP_output_files()
ElementActionRun.get_data_idx()
ElementActionRun.get_environment()
ElementActionRun.get_input_dependencies()
ElementActionRun.get_input_values()
ElementActionRun.get_parameter_names()
ElementActionRun.get_parameter_sources()
ElementActionRun.get_resources()
ElementActionRun.get_template_resources()
ElementActionRun.index
ElementActionRun.input_files
ElementActionRun.inputs
ElementActionRun.metadata
ElementActionRun.output_files
ElementActionRun.outputs
ElementActionRun.resources
ElementActionRun.run_idx
ElementActionRun.start_time
ElementActionRun.submission_idx
ElementActionRun.submission_status
ElementActionRun.success
ElementActionRun.task
ElementActionRun.workflow
ElementActionRun.write_source()
ElementID
IterationID
- hpcflow.sdk.core.command_files module
- hpcflow.sdk.core.commands module
- hpcflow.sdk.core.element module
Element
Element.action_runs
Element.actions
Element.dir_name
Element.element_ID
Element.element_set
Element.element_set_idx
Element.get()
Element.get_EAR_dependencies()
Element.get_data_idx()
Element.get_dependent_EARs()
Element.get_dependent_element_iterations()
Element.get_dependent_elements()
Element.get_dependent_elements_recursively()
Element.get_dependent_tasks()
Element.get_element_dependencies()
Element.get_element_iteration_dependencies()
Element.get_input_dependencies()
Element.get_parameter_sources()
Element.get_sequence_value()
Element.get_task_dependencies()
Element.index
Element.init_loop_index()
Element.input_files
Element.input_source_idx
Element.input_sources
Element.inputs
Element.iterations
Element.latest_iteration
Element.output_files
Element.outputs
Element.schema_parameters
Element.sequence_idx
Element.task
Element.to_element_set_data()
Element.workflow
ElementFilter
ElementGroup
ElementInputFiles
ElementInputs
ElementIteration
ElementIteration.EARs_initialised
ElementIteration.action_runs
ElementIteration.actions
ElementIteration.data_idx
ElementIteration.element
ElementIteration.get()
ElementIteration.get_EAR_dependencies()
ElementIteration.get_data_idx()
ElementIteration.get_dependent_EARs()
ElementIteration.get_dependent_element_iterations()
ElementIteration.get_dependent_elements()
ElementIteration.get_dependent_tasks()
ElementIteration.get_element_dependencies()
ElementIteration.get_element_iteration_dependencies()
ElementIteration.get_input_dependencies()
ElementIteration.get_parameter_names()
ElementIteration.get_parameter_sources()
ElementIteration.get_task_dependencies()
ElementIteration.global_idx
ElementIteration.index
ElementIteration.input_files
ElementIteration.inputs
ElementIteration.iteration_ID
ElementIteration.loop_idx
ElementIteration.output_files
ElementIteration.outputs
ElementIteration.schema_parameters
ElementIteration.task
ElementIteration.workflow
ElementOutputFiles
ElementOutputs
ElementParameter
ElementRepeats
ElementResources
ElementResources.get_jobscript_hash()
ElementResources.num_cores
ElementResources.os_name
ElementResources.scheduler
ElementResources.scheduler_args
ElementResources.scheduler_options
ElementResources.scratch
ElementResources.shell
ElementResources.shell_args
ElementResources.time_limit
ElementResources.use_job_array
- hpcflow.sdk.core.environment module
- hpcflow.sdk.core.errors module
DuplicateExecutableError
EnvironmentSpecValidationError
ExtraInputs
FileSpecValidationError
FromSpecMissingObjectError
InputSourceValidationError
InputValueDuplicateSequenceAddress
InvalidIdentifier
InvalidInputSourceTaskReference
JobscriptSubmissionFailure
LoopAlreadyExistsError
MalformedParameterPathError
MissingActionEnvironment
MissingCompatibleActionEnvironment
MissingInputs
ParameterSpecValidationError
SchedulerVersionsFailure
SubmissionFailure
TaskSchemaMissingParameterError
TaskSchemaSpecValidationError
TaskTemplateInvalidNesting
TaskTemplateMultipleInputValues
TaskTemplateMultipleSchemaObjectives
TaskTemplateUnexpectedInput
TaskTemplateUnexpectedSequenceInput
ToJSONLikeChildReferenceError
UnknownResourceSpecItemError
UnrequiredInputSources
UnsetParameterDataError
UnsupportedShellError
ValuesAlreadyPersistentError
WorkflowBatchUpdateFailedError
WorkflowLimitsError
WorkflowNotFoundError
WorkflowParameterMissingError
WorkflowSpecValidationError
WorkflowSubmissionFailure
- hpcflow.sdk.core.json_like module
BaseJSONLike
ChildObjectSpec
ChildObjectSpec.class_name
ChildObjectSpec.class_obj
ChildObjectSpec.dict_key_attr
ChildObjectSpec.dict_val_attr
ChildObjectSpec.is_dict_values
ChildObjectSpec.is_dict_values_ensure_list
ChildObjectSpec.is_enum
ChildObjectSpec.is_multiple
ChildObjectSpec.is_single_attribute
ChildObjectSpec.json_like_name
ChildObjectSpec.name
ChildObjectSpec.parent_ref
ChildObjectSpec.shared_data_name
ChildObjectSpec.shared_data_primary_key
JSONLike
to_json_like()
- hpcflow.sdk.core.loop module
Loop
WorkflowLoop
WorkflowLoop.add_iteration()
WorkflowLoop.get_child_loops()
WorkflowLoop.get_parent_loops()
WorkflowLoop.index
WorkflowLoop.iterable_parameters
WorkflowLoop.name
WorkflowLoop.new_empty_loop()
WorkflowLoop.num_added_iterations
WorkflowLoop.num_iterations
WorkflowLoop.task_indices
WorkflowLoop.task_insert_IDs
WorkflowLoop.task_objects
WorkflowLoop.template
WorkflowLoop.workflow
- hpcflow.sdk.core.object_list module
- hpcflow.sdk.core.parameters module
AbstractInputValue
BuiltinSchemaParameter
InputSource
InputSourceType
InputValue
Parameter
ParameterPath
ParameterPropagationMode
ParameterValue
ResourceSpec
ResourceSpec.ALLOWED_PARAMETERS
ResourceSpec.element_set
ResourceSpec.make_persistent()
ResourceSpec.normalised_path
ResourceSpec.normalised_resources_path
ResourceSpec.num_cores
ResourceSpec.os_name
ResourceSpec.scheduler
ResourceSpec.scheduler_args
ResourceSpec.scheduler_options
ResourceSpec.scratch
ResourceSpec.shell
ResourceSpec.shell_args
ResourceSpec.time_limit
ResourceSpec.to_dict()
ResourceSpec.use_job_array
ResourceSpec.workflow
ResourceSpec.workflow_template
SchemaInput
SchemaOutput
SchemaParameter
SubParameter
TaskSourceType
ValuePerturbation
ValueSequence
ValueSequence.from_linear_space()
ValueSequence.from_range()
ValueSequence.input_path
ValueSequence.input_type
ValueSequence.is_sub_value
ValueSequence.make_persistent()
ValueSequence.normalised_inputs_path
ValueSequence.normalised_path
ValueSequence.parameter
ValueSequence.path_split
ValueSequence.path_type
ValueSequence.resource_scope
ValueSequence.to_dict()
ValueSequence.values
ValueSequence.workflow
- hpcflow.sdk.core.task module
ElementPropagation
ElementSet
ElementSet.defined_input_types
ElementSet.elem_iter_global_indices
ElementSet.element_iterations
ElementSet.element_local_idx_range
ElementSet.elements
ElementSet.ensure_element_sets()
ElementSet.get_defined_parameter_types()
ElementSet.get_defined_sub_parameter_types()
ElementSet.get_locally_defined_inputs()
ElementSet.get_sequence_by_path()
ElementSet.get_sequence_from_path()
ElementSet.get_task_dependencies()
ElementSet.index
ElementSet.input_types
ElementSet.is_input_type_provided()
ElementSet.prepare_persistent_copy()
ElementSet.task
ElementSet.task_template
ElementSet.to_dict()
ElementSet.undefined_input_types
Elements
InputStatus
Parameters
Task
Task.add_group()
Task.all_schema_actions()
Task.all_schema_input_normalised_paths
Task.all_schema_input_types
Task.all_schema_inputs
Task.all_schema_output_types
Task.all_schema_outputs
Task.all_sequences_normalised_paths
Task.all_sourced_normalised_paths
Task.all_used_sequences_normalised_paths
Task.defined_input_types
Task.dir_name
Task.element_sets
Task.get_all_required_schema_inputs()
Task.get_available_task_input_sources()
Task.get_input_statuses()
Task.get_non_sub_parameter_input_values()
Task.get_param_provided_element_sets()
Task.get_schema_action()
Task.get_sub_parameter_input_values()
Task.get_task_unique_names()
Task.index
Task.insert_ID
Task.is_input_type_required()
Task.name
Task.non_universal_input_types
Task.num_all_schema_actions
Task.num_element_sets
Task.objective
Task.prepare_element_resolution()
Task.provides_parameters
Task.schemas
Task.set_sequence_parameters()
Task.to_dict()
Task.to_persistent()
Task.undefined_input_types
Task.undefined_inputs
Task.universal_input_types
Task.unsourced_inputs
TaskInputParameters
TaskOutputParameters
WorkflowTask
WorkflowTask.add_elements()
WorkflowTask.dir_name
WorkflowTask.downstream_tasks
WorkflowTask.elements
WorkflowTask.ensure_input_sources()
WorkflowTask.generate_new_elements()
WorkflowTask.get()
WorkflowTask.get_all_element_iterations()
WorkflowTask.get_dependent_elements()
WorkflowTask.get_dependent_tasks()
WorkflowTask.get_dir_name()
WorkflowTask.get_element_dependencies()
WorkflowTask.get_task_dependencies()
WorkflowTask.index
WorkflowTask.initialise_EARs()
WorkflowTask.inputs
WorkflowTask.insert_ID
WorkflowTask.name
WorkflowTask.new_empty_task()
WorkflowTask.num_EARs
WorkflowTask.num_actions
WorkflowTask.num_element_iterations
WorkflowTask.num_element_sets
WorkflowTask.num_elements
WorkflowTask.outputs
WorkflowTask.resolve_element_data_indices()
WorkflowTask.template
WorkflowTask.test_action_rule()
WorkflowTask.unique_name
WorkflowTask.upstream_tasks
WorkflowTask.workflow
- hpcflow.sdk.core.task_schema module
- hpcflow.sdk.core.test_utils module
- hpcflow.sdk.core.utils module
PrettyPrinter
Singleton
bisect_slice()
capitalise_first_letter()
check_in_object_list()
check_valid_py_identifier()
classproperty
ensure_in()
get_duplicate_items()
get_in_container()
get_item_repeat_index()
get_md5_hash()
get_nested_indices()
get_process_stamp()
get_relative_path()
get_time_stamp()
group_by_dict_key_values()
list_to_dict()
load_config()
make_workflow_id()
read_JSON_file()
read_JSON_string()
read_YAML()
read_YAML_file()
remove_ansi_escape_sequences()
replace_items()
search_dir_files_by_regex()
sentry_wrap()
set_in_container()
- hpcflow.sdk.core.validation module
- hpcflow.sdk.core.workflow module
Workflow
Workflow.add_loop()
Workflow.add_submission()
Workflow.add_task()
Workflow.add_task_after()
Workflow.add_task_before()
Workflow.artifacts_path
Workflow.batch_update()
Workflow.check_parameters_exist()
Workflow.copy()
Workflow.creation_info
Workflow.delete()
Workflow.elements()
Workflow.from_JSON_file()
Workflow.from_JSON_string()
Workflow.from_YAML_file()
Workflow.from_YAML_string()
Workflow.from_file()
Workflow.from_template()
Workflow.from_template_data()
Workflow.get_EARs_from_IDs()
Workflow.get_all_parameter_data()
Workflow.get_element_iterations_from_IDs()
Workflow.get_elements_from_IDs()
Workflow.get_iteration_task_pathway()
Workflow.get_parameter_data()
Workflow.get_parameter_source()
Workflow.get_task_elements()
Workflow.get_task_elements_islice()
Workflow.get_task_unique_names()
Workflow.is_parameter_set()
Workflow.loops
Workflow.name
Workflow.num_added_tasks
Workflow.num_element_iterations
Workflow.num_elements
Workflow.num_loops
Workflow.num_submissions
Workflow.num_tasks
Workflow.rename()
Workflow.resolve_jobscripts()
Workflow.save_parameter()
Workflow.save_parameters()
Workflow.set_EAR_end()
Workflow.set_EAR_start()
Workflow.set_EAR_submission_indices()
Workflow.show_all_EAR_statuses()
Workflow.store_format
Workflow.submissions
Workflow.submissions_path
Workflow.submit()
Workflow.task_artifacts_path
Workflow.tasks
Workflow.template
Workflow.template_components
Workflow.ts_fmt
Workflow.ts_name_fmt
Workflow.write_commands()
WorkflowBlueprint
WorkflowTemplate
- hpcflow.sdk.core.zarr_io module
- Module contents
- hpcflow.sdk.data package
- hpcflow.sdk.demo package
- Subpackages
- hpcflow.sdk.demo.scripts package
- Subpackages
- Submodules
- hpcflow.sdk.demo.scripts.demo_task_1_generate_t1_infile_1 module
- hpcflow.sdk.demo.scripts.demo_task_1_generate_t1_infile_2 module
- hpcflow.sdk.demo.scripts.demo_task_1_parse_p3 module
- hpcflow.sdk.demo.scripts.generate_t1_file_01 module
- hpcflow.sdk.demo.scripts.parse_t1_file_01 module
- Module contents
- hpcflow.sdk.demo.scripts package
- Submodules
- hpcflow.sdk.demo.cli module
- Module contents
- Subpackages
- hpcflow.sdk.helper package
- hpcflow.sdk.persistence package
- Submodules
- hpcflow.sdk.persistence.base module
PersistentStore
PersistentStore.add_EARs()
PersistentStore.add_element_iterations()
PersistentStore.add_element_set()
PersistentStore.add_elements()
PersistentStore.add_empty_task()
PersistentStore.add_loop()
PersistentStore.add_parameter_data()
PersistentStore.add_submission()
PersistentStore.add_template_components()
PersistentStore.add_unset_parameter_data()
PersistentStore.append_submission_attempt()
PersistentStore.cached_load()
PersistentStore.check_parameters_exist()
PersistentStore.clear_pending()
PersistentStore.commit_pending()
PersistentStore.copy()
PersistentStore.delete()
PersistentStore.delete_no_confirm()
PersistentStore.exists()
PersistentStore.features
PersistentStore.get_all_parameter_data()
PersistentStore.get_all_tasks_metadata()
PersistentStore.get_creation_info()
PersistentStore.get_loops()
PersistentStore.get_num_added_tasks()
PersistentStore.get_parameter_data()
PersistentStore.get_parameter_source()
PersistentStore.get_submissions()
PersistentStore.get_task_elements()
PersistentStore.get_task_elements_islice()
PersistentStore.get_template()
PersistentStore.get_template_components()
PersistentStore.has_pending
PersistentStore.is_modified_on_disk()
PersistentStore.is_parameter_set()
PersistentStore.path_has_store()
PersistentStore.reinstate_replaced_dir()
PersistentStore.reject_pending()
PersistentStore.remove_replaced_dir()
PersistentStore.save()
PersistentStore.set_EAR_end()
PersistentStore.set_EAR_start()
PersistentStore.set_EAR_submission_indices()
PersistentStore.set_jobscript_job_ID()
PersistentStore.set_jobscript_submit_time()
PersistentStore.set_jobscript_version_info()
PersistentStore.set_parameter()
PersistentStore.store_name
PersistentStore.store_path
PersistentStore.ts_fmt
PersistentStore.update_loop_num_added_iters()
PersistentStore.workflow
PersistentStore.workflow_path
PersistentStore.write_empty_workflow()
PersistentStoreFeatures
dropbox_retry_fail()
remove_dir()
rename_dir()
- hpcflow.sdk.persistence.json module
JSONPersistentStore
JSONPersistentStore.cached_load()
JSONPersistentStore.check_parameters_exist()
JSONPersistentStore.commit_pending()
JSONPersistentStore.copy()
JSONPersistentStore.exists()
JSONPersistentStore.get_all_parameter_data()
JSONPersistentStore.get_all_tasks_metadata()
JSONPersistentStore.get_loops()
JSONPersistentStore.get_num_added_tasks()
JSONPersistentStore.get_parameter_data()
JSONPersistentStore.get_parameter_source()
JSONPersistentStore.get_submissions()
JSONPersistentStore.get_task_elements()
JSONPersistentStore.get_task_idx_from_insert_ID()
JSONPersistentStore.get_template()
JSONPersistentStore.is_modified_on_disk()
JSONPersistentStore.is_parameter_set()
JSONPersistentStore.load()
JSONPersistentStore.load_metadata()
JSONPersistentStore.load_parameter_data()
JSONPersistentStore.load_submissions()
JSONPersistentStore.path_has_store()
JSONPersistentStore.reinstate_replaced_dir()
JSONPersistentStore.remove_replaced_dir()
JSONPersistentStore.set_parameter()
JSONPersistentStore.store_path
JSONPersistentStore.write_empty_workflow()
- hpcflow.sdk.persistence.zarr module
ZarrPersistentStore
ZarrPersistentStore.add_EARs()
ZarrPersistentStore.add_element_iterations()
ZarrPersistentStore.add_elements()
ZarrPersistentStore.cached_load()
ZarrPersistentStore.check_parameters_exist()
ZarrPersistentStore.commit_pending()
ZarrPersistentStore.copy()
ZarrPersistentStore.exists()
ZarrPersistentStore.get_all_parameter_data()
ZarrPersistentStore.get_all_tasks_metadata()
ZarrPersistentStore.get_loops()
ZarrPersistentStore.get_num_added_tasks()
ZarrPersistentStore.get_parameter_data()
ZarrPersistentStore.get_parameter_source()
ZarrPersistentStore.get_submissions()
ZarrPersistentStore.get_task_elements()
ZarrPersistentStore.get_template()
ZarrPersistentStore.has_pending
ZarrPersistentStore.is_modified_on_disk()
ZarrPersistentStore.is_parameter_set()
ZarrPersistentStore.load_metadata()
ZarrPersistentStore.path_has_store()
ZarrPersistentStore.reinstate_replaced_dir()
ZarrPersistentStore.reject_pending()
ZarrPersistentStore.remove_replaced_dir()
ZarrPersistentStore.set_parameter()
ZarrPersistentStore.store_path
ZarrPersistentStore.write_empty_workflow()
- Module contents
- hpcflow.sdk.scripting package
- hpcflow.sdk.submission package
- Subpackages
- Submodules
- hpcflow.sdk.submission.jobscript module
Jobscript
Jobscript.EAR_idx
Jobscript.EARs
Jobscript.compose_jobscript()
Jobscript.dependencies
Jobscript.element_run_dir_file_name
Jobscript.element_run_dir_file_path
Jobscript.from_json_like()
Jobscript.get_EAR_ID_array()
Jobscript.get_EAR_run_idx_array()
Jobscript.get_commands_file_name()
Jobscript.get_task_element_idx_array()
Jobscript.get_task_insert_IDs_array()
Jobscript.get_task_loop_idx_array()
Jobscript.index
Jobscript.is_array
Jobscript.jobscript_name
Jobscript.jobscript_path
Jobscript.make_artifact_dirs()
Jobscript.need_EAR_file_name
Jobscript.need_EAR_file_path
Jobscript.num_actions
Jobscript.num_elements
Jobscript.os_name
Jobscript.resources
Jobscript.scheduler
Jobscript.scheduler_job_ID
Jobscript.scheduler_name
Jobscript.scheduler_version_info
Jobscript.shell
Jobscript.shell_name
Jobscript.submission
Jobscript.submit()
Jobscript.submit_time
Jobscript.task_actions
Jobscript.task_elements
Jobscript.task_insert_IDs
Jobscript.task_loop_idx
Jobscript.to_dict()
Jobscript.workflow
Jobscript.workflow_app_alias
Jobscript.write_element_run_dir_file()
Jobscript.write_jobscript()
Jobscript.write_need_EARs_file()
generate_EAR_resource_map()
group_resource_map_into_jobscripts()
jobscripts_to_list()
merge_jobscripts_across_tasks()
resolve_jobscript_dependencies()
- hpcflow.sdk.submission.submission module
Submission
Submission.JS_parallelism
Submission.get_EAR_run_dirs()
Submission.get_unique_schedulers()
Submission.get_unique_shells()
Submission.index
Submission.jobscript_indices
Submission.jobscripts
Submission.needs_submit
Submission.outstanding_jobscripts
Submission.path
Submission.prepare_EAR_submission_idx_update()
Submission.status
Submission.submission_attempts
Submission.submit()
Submission.submitted_jobscripts
Submission.to_dict()
Submission.workflow
SubmissionStatus
timedelta_format()
timedelta_parse()
- Module contents
Submodules#
hpcflow.sdk.api module#
API functions, which are dynamically added to the BaseApp class on __init__
- hpcflow.sdk.api.get_OS_info(app)#
Get information about the operating system.
- hpcflow.sdk.api.get_shell_info(app, shell_name, exclude_os=False)#
Get information about a given shell and the operating system.
- Parameters:
shell_name (str) – One of the supported shell names.
exclude_os (bool | None) – If True, exclude operating system information.
- hpcflow.sdk.api.make_and_submit_workflow(app, template_file_or_str, is_string=False, template_format='yaml', path=None, name=None, overwrite=False, store='zarr', ts_fmt=None, ts_name_fmt=None, JS_parallelism=None)#
Generate and submit a new {app_name} workflow from a file or string containing a workflow template parametrisation.
- Parameters:
template_path_or_str – Either a path to a template file in YAML or JSON format, or a YAML/JSON string.
is_string (Optional[bool]) – Determines whether template_path_or_str is a string or a file.
template_format (Optional[str]) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.
path (Optional[PathLike]) – The directory in which the workflow will be generated. The current directory if not specified.
name (Optional[str]) – The name of the workflow. If specified, the workflow directory will be path joined with name. If not specified the WorkflowTemplate name will be used, in combination with a date-timestamp.
overwrite (Optional[bool]) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.
store (Optional[str]) – The persistent store to use for this workflow.
ts_fmt (Optional[str]) – The datetime format to use for storing datetimes. Datetimes are always stored in UTC (because Numpy does not store time zone info), so this should not include a time zone name.
ts_name_fmt (Optional[str]) – The datetime format to use when generating the workflow name, where it includes a timestamp.
JS_parallelism (Optional[bool]) – If True, allow multiple jobscripts to execute simultaneously. Raises if set to True but the store type does not support the jobscript_parallelism feature. If not set, jobscript parallelism will be used if the store type supports it.
app (App) –
template_file_or_str (Union[PathLike, str]) –
- hpcflow.sdk.api.make_workflow(app, template_file_or_str, is_string=False, template_format='yaml', path=None, name=None, overwrite=False, store='zarr', ts_fmt=None, ts_name_fmt=None)#
Generate a new {app_name} workflow from a file or string containing a workflow template parametrisation.
- Parameters:
template_path_or_str – Either a path to a template file in YAML or JSON format, or a YAML/JSON string.
is_string (Optional[bool]) – Determines if passing a file path or a string.
template_format (Optional[str]) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.
path (Optional[PathLike]) – The directory in which the workflow will be generated. The current directory if not specified.
name (Optional[str]) – The name of the workflow. If specified, the workflow directory will be path joined with name. If not specified the workflow template name will be used, in combination with a date-timestamp.
overwrite (Optional[bool]) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.
store (Optional[str]) – The persistent store type to use.
ts_fmt (Optional[str]) – The datetime format to use for storing datetimes. Datetimes are always stored in UTC (because Numpy does not store time zone info), so this should not include a time zone name.
ts_name_fmt (Optional[str]) – The datetime format to use when generating the workflow name, where it includes a timestamp.
app (App) –
template_file_or_str (Union[PathLike, str]) –
- Return type:
- hpcflow.sdk.api.run_hpcflow_tests(app, *args)#
Run hpcflow test suite. This function is only available from derived apps.
Notes
It may not be possible to run hpcflow tests after/before running tests of the derived app within the same process, due to caching.
- hpcflow.sdk.api.run_tests(app, *args)#
Run {app_name} test suite.
- hpcflow.sdk.api.submit_workflow(app, workflow_path, JS_parallelism=None)#
Submit an existing {app_name} workflow.
- Parameters:
workflow_path (PathLike) – Path to an existing workflow
JS_parallelism (Optional[bool]) – If True, allow multiple jobscripts to execute simultaneously. Raises if set to True but the store type does not support the jobscript_parallelism feature. If not set, jobscript parallelism will be used if the store type supports it.
app (App) –
hpcflow.sdk.app module#
An hpcflow application.
- class hpcflow.sdk.app.App(name, version, description, config_options, scripts_dir, template_components=None, pytest_args=None, package_name=None)#
Bases:
BaseApp
Class to generate an hpcflow application (e.g. MatFlow)
- Parameters:
template_components (Dict) –
- class hpcflow.sdk.app.BaseApp(name, version, description, config_options, scripts_dir, template_components=None, pytest_args=None, package_name=None)#
Bases:
object
Class to generate the base hpcflow application.
- Parameters:
template_components (Dict) –
- property API_logger#
- property CLI_logger#
- property command_files#
- property config#
- property config_logger#
- property envs#
- get_info()#
- Return type:
Dict
- inject_into(cls)#
- property is_config_loaded#
- property is_template_components_loaded#
- classmethod load_builtin_template_component_data(package)#
- load_config(config_dir=None, config_invocation_key=None, **overrides)#
- load_template_components(warn=True)#
- property logger#
- property parameters#
- reload_config(config_dir=None, config_invocation_key=None, **overrides)#
- reload_template_components(warn=True)#
- property runtime_info_logger#
- property scripts#
- property task_schemas#
- property template_components#
- template_components_from_json_like(json_like)#
hpcflow.sdk.log module#
hpcflow.sdk.runtime module#
- class hpcflow.sdk.runtime.RunTimeInfo(name, package_name, version, logger)#
Bases:
PrettyPrinter
Get useful run-time information, including the executable name used to invoke the CLI, in the case a PyInstaller-built executable was used.
- sys_prefix#
From sys.prefix. If running in a virtual environment, this will point to the environment directory. If not running in a virtual environment, this will point to the Python installation root.
- Type:
str
- sys_base_prefix#
From sys.base_prefix. This will be equal to sys_prefix (sys.prefix) if not running within a virtual environment. However, if running within a virtual environment, this will be the Python installation directory, and sys_prefix will be equal to the virtual environment directory.
- Type:
str
- get_activate_env_command()#
- get_deactivate_env_command()#
- get_invocation_command()#
Get the command that was used to invoke this instance of the app.
hpcflow.sdk.typing module#
Module contents#
Module to define an extensible hpcFlow application class.
- hpcflow.sdk.get_SDK_logger(name=None)#
Get a logger with prefix of “hpcflow_sdk” instead of “hpcflow.sdk” to ensure the handlers of the SDK logger and app logger are distinct.