hpcflow.sdk.persistence.zarr.ZarrZipPersistentStore#
- class hpcflow.sdk.persistence.zarr.ZarrZipPersistentStore(app, workflow, path, fs)#
Bases:
ZarrPersistentStore
A store designed mainly as an archive format that can be uploaded to e.g. Zenodo.
Methods
Add a new EAR to an element iteration.
Add a new element to a task.
Add a new iteration to an element.
Add a new loop to the workflow.
Add a new submission.
Add a new task to the workflow.
Context manager to cache the root attributes.
For each parameter ID, return True if it exists, else False
Copy the workflow store.
Delete the persistent workflow.
Permanently delete the workflow data with no confirmation.
Retrieve all loops, including pending.
Retrieve loops by index (ID), including pending.
- param kwargs:
Retrieve all submissions, including pending.
Get element data by an index slice within a given task.
Retrieve all tasks, including pending.
Get all template components, including pending.
Generate an store for testing purposes.
Generate a valid store from a specification in terms of nested elements/iterations/EARs.
Try very hard to delete a directory or file.
Revert the replaced workflow path to its original name.
Commit pending changes to disk, if not in batch-update mode.
Context manager for managing StoreResource objects associated with the store.
Attributes
Does this store support workflow submission?
- add_EAR(elem_iter_ID, action_idx, data_idx, metadata, save=True)#
Add a new EAR to an element iteration.
- add_element(task_ID, es_idx, seq_idx, src_idx, save=True)#
Add a new element to a task.
- add_element_iteration(element_ID, data_idx, schema_parameters, loop_idx=None, save=True)#
Add a new iteration to an element.
- add_element_set(task_id, es_js, save=True)#
- add_file(store_contents, is_input, source, path=None, contents=None, filename=None, save=True)#
- add_loop(loop_template, iterable_parameters, iter_IDs, save=True)#
Add a new loop to the workflow.
- add_set_parameter(data, source, save=True)#
- add_submission(sub_idx, sub_js, save=True)#
Add a new submission.
- add_submission_part(sub_idx, dt_str, submitted_js_idx, save=True)#
- add_task(idx, task_template, save=True)#
Add a new task to the workflow.
- add_template_components(temp_comps, save=True)#
- check_parameters_exist(id_lst)#
For each parameter ID, return True if it exists, else False
- copy(path=None)#
Copy the workflow store.
This does not work on remote filesystems.
- Return type:
- delete()#
Delete the persistent workflow.
- Return type:
None
- delete_no_confirm()#
Permanently delete the workflow data with no confirmation.
- Return type:
None
- get_creation_info()#
- get_element_iterations(id_lst)#
- get_fs_path()#
- get_loops_by_IDs(id_lst)#
Retrieve loops by index (ID), including pending.
- get_parameters(id_lst, **kwargs)#
- get_task_elements(task_id, idx_sel)#
Get element data by an index slice within a given task.
Element iterations and EARs belonging to the elements are included.
- get_ts_fmt()#
- get_ts_name_fmt()#
- property has_pending#
- property is_submittable#
Does this store support workflow submission?
- property logger#
- classmethod make_test_store_from_spec(spec, dir=None, path='test_store', overwrite=False)#
Generate an store for testing purposes.
- static prepare_test_store_from_spec(task_spec)#
Generate a valid store from a specification in terms of nested elements/iterations/EARs.
- reinstate_replaced_dir()#
- Return type:
None
- remove_path(path, fs)#
Try very hard to delete a directory or file.
Dropbox (on Windows, at least) seems to try to re-sync files if the parent directory is deleted soon after creation, which is the case on a failed workflow creation (e.g. missing inputs), so in addition to catching PermissionErrors generated when Dropbox has a lock on files, we repeatedly try deleting the directory tree.
- Parameters:
path (str) –
- Return type:
None
- remove_replaced_dir()#
- Return type:
None
- rename_path(replaced, original, fs)#
Revert the replaced workflow path to its original name.
This happens when new workflow creation fails and there is an existing workflow with the same name; the original workflow which was renamed, must be reverted.
- save()#
Commit pending changes to disk, if not in batch-update mode.
- set_EAR_end(EAR_ID, exit_code, success, save=True)#
- set_EAR_submission_index(EAR_ID, sub_idx, save=True)#
- set_EARs_initialised(iter_ID, save=True)#
- set_file(store_contents, is_input, param_id=None, path=None, contents=None, filename=None, clean_up=False, save=True)#
- set_jobscript_metadata(sub_idx, js_idx, version_info=None, submit_time=None, submit_hostname=None, submit_machine=None, submit_cmdline=None, os_name=None, shell_name=None, scheduler_name=None, scheduler_job_ID=None, process_ID=None, save=True)#
- Parameters:
- set_parameter_value(param_id, value, is_file=False, save=True)#
- unzip(log=None)#
- update_loop_num_iters(index, num_iters, save=True)#
- update_param_source(param_id, source, save=True)#
- using_resource(res_label, action)#
Context manager for managing StoreResource objects associated with the store.
- classmethod write_empty_workflow(app, template_js, template_components_js, wk_path, fs, fs_path, replaced_wk, ts_fmt, ts_name_fmt, creation_info)#
- property zarr_store: Store#
- zip()#