hpcflow.sdk.app.App#

class hpcflow.sdk.app.App(*args, **kwargs)#

Bases: BaseApp

Class from which to instantiate downstream app objects (e.g. MatFlow).

Methods

cache_all_demo_data_files

Get the name of all cached demo data file.

cache_demo_data_file

Get the name of a cached demo data file.

clear_demo_data_cache_dir

Delete the contents of the example data files cache directory.

clear_known_submissions_file

Clear the known-submissions file of all submissions.

clear_user_cache_dir

Delete the contents of the cache directory.

clear_user_cache_hostname_dir

Delete the contents of the hostname-scoped cache directory.

clear_user_runtime_dir

Delete the contents of the user runtime directory.

configure_env

Configure an execution environment.

copy_demo_data

Copy a builtin demo data file to the specified location.

copy_demo_workflow

Copy a builtin demo workflow to the specified location.

get_OS_supported_schedulers

Retrieve a list of schedulers that are supported in principle by this operating system.

get_config_path

Return the full path to the config file, without loading the config.

get_demo_data_file_path

Get the full path to an example data file in the app cache directory.

get_demo_data_files_manifest

Get a dict whose keys are example data file names and whose values are the source files if the source file required unzipping or None otherwise.

get_demo_workflow_template_file

Context manager to get a (temporary) file path to an included demo workflow template.

get_info

Get miscellaneous runtime system information.

get_parameter_task_schema_map

Get a dict mapping parameter types to task schemas that input/output each parameter.

get_scheduler

Get an arbitrary scheduler object.

list_demo_data_files

List available example data files.

list_demo_workflows

Return a list of demo workflow templates included in the app.

load_builtin_template_component_data

Load the template component data built into the package.

load_config

Load the user's configuration.

load_demo_workflow

Load a WorkflowTemplate object from a builtin demo template file.

load_template_components

Load all template component data, warning by default if already loaded.

perm_error_retry

Return a decorator for retrying functions on permission and OS errors that might be associated with cloud-storage desktop sync.

read_known_submissions_file

Retrieve existing workflows that might be running.

reload_config

Reload the configuration.

reload_template_components

Reload all template component data, warning by default if not already loaded.

reset_config

Reset the config file to defaults, and reload the config.

show_demo_workflow

Print the contents of a builtin demo workflow template file.

template_components_from_json_like

Get template components from a (simply parsed) JSON document.

unload_config

Discard any loaded configuration.

update_known_subs_file

Update submission records in the known-submission file.

Attributes

API_logger

The logger for API messages.

Action

The Action class.

ActionEnvironment

The ActionEnvironment class.

ActionRule

The ActionRule class.

ActionScope

The ActionScope class.

ActionScopeType

The ActionScopeType class.

CLI_logger

The logger for CLI messages.

Command

The Command class.

CommandFilesList

The CommandFilesList class.

DirectPosix

The DirectPosix class.

DirectWindows

The DirectWindows class.

Element

The Element class.

ElementAction

The ElementAction class.

ElementActionRun

The ElementActionRun class.

ElementFilter

The ElementFilter class.

ElementGroup

The ElementGroup class.

ElementInputFiles

The ElementInputFiles class.

ElementInputs

The ElementInputs class.

ElementIteration

The ElementIteration class.

ElementOutputFiles

The ElementOutputFiles class.

ElementOutputs

The ElementOutputs class.

ElementParameter

The ElementParameter class.

ElementPropagation

The ElementPropagation class.

ElementResources

The ElementResources class.

ElementSet

The ElementSet class.

Environment

The Environment class.

EnvironmentsList

The EnvironmentsList class.

Executable

The Executable class.

ExecutableInstance

The ExecutableInstance class.

ExecutablesList

The ExecutablesList class.

FileNameExt

The FileNameExt class.

FileNameSpec

The FileNameSpec class.

FileNameStem

The FileNameStem class.

FileSpec

The FileSpec class.

GroupList

The GroupList class.

InputFileGenerator

The InputFileGenerator class.

InputSource

The InputSource class.

InputSourceType

The InputSourceType class.

InputValue

The InputValue class.

Jobscript

The Jobscript class.

Loop

The Loop class.

NumCores

The NumCores class.

OutputFileParser

The OutputFileParser class.

Parameter

The Parameter class.

ParameterValue

The ParameterValue class.

Parameters

The Parameters class.

ParametersList

The ParametersList class.

QueuedScheduler

The QueuedScheduler class.

ResourceList

The ResourceList class.

ResourceSpec

The ResourceSpec class.

Rule

The Rule class.

RunDirAppFiles

The RunDirAppFiles class.

SGEPosix

The SGEPosix class.

SchemaInput

The SchemaInput class.

SchemaOutput

The SchemaOutput class.

SchemaParameter

The SchemaParameter class.

SlurmPosix

The SlurmPosix class.

Submission

The Submission class.

Task

The Task class.

TaskInputParameters

The TaskInputParameters class.

TaskList

The TaskList class.

TaskObjective

The TaskObjective class.

TaskOutputParameters

The TaskOutputParameters class.

TaskSchema

The TaskSchema class.

TaskSchemasList

The TaskSchemasList class.

TaskSourceType

The TaskSourceType class.

TaskTemplateList

The TaskTemplateList class.

ValueSequence

The ValueSequence class.

Workflow

The Workflow class.

WorkflowLoop

The WorkflowLoop class.

WorkflowLoopList

The WorkflowLoopList class.

WorkflowTask

The WorkflowTask class.

WorkflowTaskList

The WorkflowTaskList class.

WorkflowTemplate

The WorkflowTemplate class.

cancel

Cancel the execution of a workflow submission.

command_files

The known template command files.

config

The configuration.

config_logger

The logger for configuration messages.

demo_data_cache_dir

A directory for example data caching.

envs

The known template execution environments.

get_OS_info

Get information about the operating system.

get_known_submissions

Retrieve information about active and recently inactive finished workflows.

get_shell_info

Get information about a given shell and the operating system.

is_config_loaded

Whether the configuration is loaded.

is_template_components_loaded

Whether any template component (e.g.

known_subs_file_path

The path to the file describing known submissions.

log

The application log.

logger

The main underlying logger.

make_and_submit_demo_workflow

Generate and submit a new demo workflow from a file or string containing a workflow template parametrisation.

make_and_submit_workflow

Generate and submit a new workflow from a file or string containing a workflow template parametrisation.

make_demo_workflow

Generate a new workflow from a builtin demo workflow template.

make_workflow

Generate a new workflow from a file or string containing a workflow template parametrisation.

parameters

The known template parameters.

persistence_logger

The logger for persistence engine messages.

run_hpcflow_tests

Run hpcflow test suite.

run_tests

Run the test suite.

run_time_info

Information about the runtime.

runtime_info_logger

The logger for runtime messages.

scheduler_lookup

The scheduler mapping.

scripts

The known template scripts.

show

Show information about running workflows.

show_legend

Output a legend for the jobscript-element and EAR states that are displayed by the show command.

submission_logger

The logger for job submission messages.

submit_workflow

Submit an existing workflow.

task_schemas

The known template task schemas.

template_components

The template component data.

timeit

Whether the timing analysis system is active.

user_cache_dir

The user's cache directory.

user_cache_hostname_dir

The hostname-scoped app cache directory.

user_data_dir

The user's data directory.

user_data_hostname_dir

The directory for holding user data.

user_runtime_dir

The user's temporary runtime directory.

name

The name of the application.

package_name

Name of package.

version

The version of the application.

module

The module name in which the app object is defined.

description

Description of the application.

gh_org

Name of Github organisation responsible for the application.

gh_repo

Github repository containing the application source.

config_options

Configuration options.

pytest_args

Arguments for pytest.

scripts_dir

Directory for scripts.

workflows_dir

Directory for workflows.

demo_data_dir

Directory for demonstration data.

demo_data_manifest_dir

Directory for demonstration data manifests.

docs_import_conv

The convention for the app alias used in import statements in the documentation.

docs_url

URL to documentation.

cli

Command line interface subsystem.

Return type:

T

property API_logger: Logger#

The logger for API messages.

property CLI_logger: Logger#

The logger for CLI messages.

cache_all_demo_data_files()#

Get the name of all cached demo data file.

Return type:

list[pathlib.Path]

cache_demo_data_file(file_name)#

Get the name of a cached demo data file.

Parameters:

file_name (str) –

Return type:

Path

property cancel: _Cancel#

Cancel the execution of a workflow submission.

Parameters:
  • workflow_ref (int | str | Path) – Which workflow to cancel, by ID or path.

  • ref_is_path (str) – One of “id”, “path” or “assume-id” (the default)

clear_demo_data_cache_dir()#

Delete the contents of the example data files cache directory.

Return type:

None

clear_known_submissions_file()#

Clear the known-submissions file of all submissions. This shouldn’t be needed normally.

Return type:

None

clear_user_cache_dir()#

Delete the contents of the cache directory.

Return type:

None

clear_user_cache_hostname_dir()#

Delete the contents of the hostname-scoped cache directory.

Return type:

None

clear_user_runtime_dir()#

Delete the contents of the user runtime directory.

Return type:

None

cli#

Command line interface subsystem.

property command_files: _CommandFilesList#

The known template command files.

property config: Config#

The configuration.

property config_logger: Logger#

The logger for configuration messages.

config_options#

Configuration options.

configure_env(name, setup=None, executables=None, use_current_env=False, env_source_file=None)#

Configure an execution environment.

Parameters:
  • name (str) –

  • setup (list[str] | None) –

  • executables (list[_Executable] | None) –

  • use_current_env (bool) –

  • env_source_file (Path | None) –

copy_demo_data(file_name, dst=None, doc=True)#

Copy a builtin demo data file to the specified location.

Parameters:
  • file_name (str) – The name of the demo data file to copy

  • dst (PathLike | None) – Directory or full file path to copy the demo data file to. If not specified, the current working directory will be used.

  • doc (bool) –

Return type:

str

copy_demo_workflow(name, dst=None, doc=True)#

Copy a builtin demo workflow to the specified location.

Parameters:
  • name (str) – The name of the demo workflow to copy

  • dst (PathLike | None) – Directory or full file path to copy the demo workflow to. If not specified, the current working directory will be used.

  • doc (bool) – If False, the copied workflow template file will not include the doc attribute (if originally present).

Return type:

str

property demo_data_cache_dir: Path#

A directory for example data caching.

demo_data_dir#

Directory for demonstration data.

demo_data_manifest_dir#

Directory for demonstration data manifests.

description#

Description of the application.

docs_import_conv#

The convention for the app alias used in import statements in the documentation.

docs_url#

URL to documentation.

property envs: _EnvironmentsList#

The known template execution environments.

property get_OS_info: Callable[[], Mapping[str, str]]#

Get information about the operating system.

Returns:

Key-value mapping containing system version information.

Return type:

dict[str, str]

get_OS_supported_schedulers()#

Retrieve a list of schedulers that are supported in principle by this operating system.

This does not necessarily mean all the returned schedulers are available on this system.

Return type:

Iterator[str]

get_config_path(config_dir=None)#

Return the full path to the config file, without loading the config.

Parameters:

config_dir (PathLike) –

Return type:

Path

get_demo_data_file_path(file_name)#

Get the full path to an example data file in the app cache directory.

If the file does not already exist in the app cache directory, it will be added (and unzipped if required). The file may first be downloaded from a remote file system such as GitHub (see _get_demo_data_file_source_path for details).

Parameters:

file_name (str) –

Return type:

Path

get_demo_data_files_manifest()#

Get a dict whose keys are example data file names and whose values are the source files if the source file required unzipping or None otherwise.

If the config item demo_data_manifest_file is set, this is used as the manifest file path. Otherwise, the app attribute demo_data_manifest_dir is used, and is expected to be the package/directory in the source code within which a file demo_data_manifest.json is expected.

Return type:

dict[str, Any]

get_demo_workflow_template_file(name, doc=True, delete=True)#

Context manager to get a (temporary) file path to an included demo workflow template.

Parameters:
  • name (str) – Name of the builtin demo workflow template whose file path is to be retrieved.

  • doc (bool) – If False, the yielded path will be to a file without the doc attribute (if originally present).

  • delete (bool) – If True, remove the temporary file on exit.

Return type:

Iterator[Path]

get_info()#

Get miscellaneous runtime system information.

Return type:

dict[str, Any]

property get_known_submissions: _GetKnownSubmissions#

Retrieve information about active and recently inactive finished workflows.

This method removes workflows from the known-submissions file that are found to be inactive on this machine (according to the scheduler/process ID).

Parameters:
  • max_recent (int) – Maximum number of inactive workflows to retrieve.

  • no_update (bool) – If True, do not update the known-submissions file to set submissions that are now inactive.

  • as_json (bool) – If True, only include JSON-compatible information. This will exclude the submission key, for instance.

Returns:

List of descriptions of known items.

Return type:

list[KnownSubmissionItem]

get_parameter_task_schema_map()#

Get a dict mapping parameter types to task schemas that input/output each parameter.

Return type:

dict[str, list[list[str]]]

get_scheduler(scheduler_name, os_name, scheduler_args=None)#

Get an arbitrary scheduler object.

Parameters:
  • scheduler_name (str) –

  • os_name (str) –

  • scheduler_args (dict[str, Any] | None) –

Return type:

Scheduler

property get_shell_info: Callable[[str, bool], VersionInfo]#

Get information about a given shell and the operating system.

Parameters:
  • shell_name (str) – One of the supported shell names.

  • exclude_os (bool) – If True, exclude operating system information.

Returns:

The shell version information descriptor.

Return type:

VersionInfo

gh_org#

Name of Github organisation responsible for the application.

gh_repo#

Github repository containing the application source.

property is_config_loaded: bool#

Whether the configuration is loaded.

property is_template_components_loaded: bool#

Whether any template component (e.g. parameters) has been loaded.

property known_subs_file_path: Path#

The path to the file describing known submissions.

list_demo_data_files()#

List available example data files.

Return type:

tuple[str, …]

list_demo_workflows()#

Return a list of demo workflow templates included in the app.

Return type:

tuple[str, …]

classmethod load_builtin_template_component_data(package)#

Load the template component data built into the package. This is as opposed to the template components defined by users.

Parameters:

package (ModuleType | str) –

Return type:

BasicTemplateComponents

load_config(config_dir=None, config_key=None, warn=True, **overrides)#

Load the user’s configuration.

Parameters:
  • config_dir (PathLike) – Directory containing the configuration, if not default.

  • config_key (str | None) – Key to the configuration within the config file.

  • warn (bool) – Whether to warn if a configuration is already loaded.

Return type:

None

load_demo_workflow(name)#

Load a WorkflowTemplate object from a builtin demo template file.

Parameters:

name (str) –

Return type:

_WorkflowTemplate

load_template_components(warn=True)#

Load all template component data, warning by default if already loaded.

Parameters:

warn (bool) –

Return type:

None

property log: AppLog#

The application log.

property logger: Logger#

The main underlying logger.

property make_and_submit_demo_workflow: _MakeAndSubmitDemoWorkflow#

Generate and submit a new demo workflow from a file or string containing a workflow template parametrisation.

Parameters:
  • workflow_name (str) – Name of the demo workflow to make. Required.

  • template_format (str) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.

  • path (str | Path) – The directory in which the workflow will be generated. The current directory if not specified.

  • name (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 (bool) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.

  • store (str) – The persistent store to use for this workflow.

  • ts_fmt (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 (str) – The datetime format to use when generating the workflow name, where it includes a timestamp.

  • store_kwargs (dict[str, object]) – Keyword arguments to pass to the store’s write_empty_workflow method.

  • variables (dict[str, str]) – String variables to substitute in the demo workflow template file.

  • JS_parallelism (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.

  • wait (bool) – If True, this command will block until the workflow execution is complete.

  • add_to_known (bool) – If True, add the new submission to the known-submissions file, which is used by the show command to monitor current and recent submissions.

  • return_idx (bool) – If True, return a dict representing the jobscript indices submitted for each submission.

  • tasks (list[int]) – List of task indices to include in this submission. By default all tasks are included.

  • cancel (bool) – Immediately cancel the submission. Useful for testing and benchmarking.

  • status (bool) – If True, display a live status to track submission progress.

Returns:

  • Workflow – The created workflow.

  • dict[int, list[int]] – Mapping of submission handles. If requested by return_idx parameter.

property make_and_submit_workflow: _MakeAndSubmitWorkflow#

Generate and submit a new workflow from a file or string containing a workflow template parametrisation.

Parameters:
  • template_path_or_str (str) – Either a path to a template file in YAML or JSON format, or a YAML/JSON string.

  • is_string (str) – Determines whether template_path_or_str is a string or a file.

  • template_format (str) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.

  • path (str | Path) – The directory in which the workflow will be generated. The current directory if not specified.

  • name (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 (bool) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.

  • store (str) – The persistent store to use for this workflow.

  • ts_fmt (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 (str) – The datetime format to use when generating the workflow name, where it includes a timestamp.

  • store_kwargs (dict[str, object]) – Keyword arguments to pass to the store’s write_empty_workflow method.

  • variables (dict[str, str]) – String variables to substitute in template_file_or_str.

  • JS_parallelism (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.

  • wait (bool) – If True, this command will block until the workflow execution is complete.

  • add_to_known (bool) – If True, add the new submission to the known-submissions file, which is used by the show command to monitor current and recent submissions.

  • return_idx (bool) – If True, return a dict representing the jobscript indices submitted for each submission.

  • tasks (list[int]) – List of task indices to include in this submission. By default all tasks are included.

  • cancel (bool) – Immediately cancel the submission. Useful for testing and benchmarking.

  • status (bool) – If True, display a live status to track workflow creation and submission progress.

Returns:

  • Workflow – The created workflow.

  • dict[int, list[int]] – Mapping of submission handles. If requested by return_idx parameter.

property make_demo_workflow: _MakeDemoWorkflow#

Generate a new workflow from a builtin demo workflow template.

Parameters:
  • workflow_name (str) – Name of the demo workflow to make.

  • template_format (str) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.

  • path (str | Path) – The directory in which the workflow will be generated. The current directory if not specified.

  • name (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 (bool) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.

  • store (str) – The persistent store type to use.

  • ts_fmt (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 (str) – The datetime format to use when generating the workflow name, where it includes a timestamp.

  • store_kwargs (dict[str, object]) – Keyword arguments to pass to the store’s write_empty_workflow method.

  • variables (dict[str, str]) – String variables to substitute in the demo workflow template file.

  • status (bool) – If True, display a live status to track workflow creation progress.

Returns:

The created workflow.

Return type:

Workflow

property make_workflow: _MakeWorkflow#

Generate a new workflow from a file or string containing a workflow template parametrisation.

Parameters:
  • template_path_or_str (str) – Either a path to a template file in YAML or JSON format, or a YAML/JSON string.

  • is_string (bool) – Determines if passing a file path or a string.

  • template_format (str) – If specified, one of “json” or “yaml”. This forces parsing from a particular format.

  • path (str | Path) – The directory in which the workflow will be generated. The current directory if not specified.

  • name (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 (bool) – If True and the workflow directory (path + name) already exists, the existing directory will be overwritten.

  • store (str) – The persistent store type to use.

  • ts_fmt (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 (str) – The datetime format to use when generating the workflow name, where it includes a timestamp.

  • store_kwargs (dict[str, object]) – Keyword arguments to pass to the store’s write_empty_workflow method.

  • variables (dict[str, str]) – String variables to substitute in template_file_or_str.

  • status (bool) – If True, display a live status to track workflow creation progress.

Returns:

The created workflow.

Return type:

Workflow

module#

The module name in which the app object is defined.

name#

The name of the application.

package_name#

Name of package.

property parameters: _ParametersList#

The known template parameters.

perm_error_retry()#

Return a decorator for retrying functions on permission and OS errors that might be associated with cloud-storage desktop sync. engine operations.

property persistence_logger: Logger#

The logger for persistence engine messages.

pytest_args#

Arguments for pytest.

read_known_submissions_file()#

Retrieve existing workflows that might be running.

Return type:

list[KnownSubmission]

reload_config(config_dir=None, config_key=None, warn=True, **overrides)#

Reload the configuration. Use if a user has updated the configuration file outside the scope of this application.

Parameters:
  • config_dir (PathLike) –

  • config_key (str | None) –

  • warn (bool) –

Return type:

None

reload_template_components(warn=True)#

Reload all template component data, warning by default if not already loaded.

Parameters:

warn (bool) –

Return type:

None

reset_config(config_dir=None, config_key=None, warn=True, **overrides)#

Reset the config file to defaults, and reload the config.

Parameters:
  • config_dir (PathLike) –

  • config_key (str | None) –

  • warn (bool) –

Return type:

None

property run_hpcflow_tests: _RunTests#

Run hpcflow test suite. This function is only available from derived apps.

property run_tests: _RunTests#

Run the test suite.

property run_time_info: RunTimeInfo#

Information about the runtime.

property runtime_info_logger: Logger#

The logger for runtime messages.

property scheduler_lookup: dict[tuple[str, str], type[Scheduler]]#

The scheduler mapping.

property scripts: dict[str, pathlib.Path]#

The known template scripts.

scripts_dir#

Directory for scripts.

property show: _Show#

Show information about running workflows.

Parameters:
  • max_recent (int) – Maximum number of inactive workflows to show.

  • full (bool) – If True, provide more information; output may spans multiple lines for each workflow submission.

  • no_update (bool) – If True, do not update the known-submissions file to remove workflows that are no longer running.

show_demo_workflow(name, syntax=True, doc=False)#

Print the contents of a builtin demo workflow template file.

Parameters:
  • name (str) – The name of the demo workflow file to print.

  • syntax (bool) – If True, use rich to syntax-highlight the output.

  • doc (bool) – If False, the printed workflow template file contents will not include the doc attribute (if originally present).

property show_legend: Callable[[], None]#

Output a legend for the jobscript-element and EAR states that are displayed by the show command.

property submission_logger: Logger#

The logger for job submission messages.

property submit_workflow: _SubmitWorkflow#

Submit an existing workflow.

Parameters:
  • workflow_path (str) – Path to an existing workflow

  • JS_parallelism (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.

  • tasks (list[int]) – List of task indices to include in this submission. By default all tasks are included.

Returns:

Mapping of submission handles. If requested by return_idx parameter.

Return type:

dict[int, list[int]]

property task_schemas: _TaskSchemasList#

The known template task schemas.

property template_components: TemplateComponents#

The template component data.

template_components_from_json_like(json_like)#

Get template components from a (simply parsed) JSON document.

Parameters:

json_like (dict[str, dict]) –

Return type:

TemplateComponents

property timeit: bool#

Whether the timing analysis system is active.

unload_config()#

Discard any loaded configuration.

Return type:

None

update_known_subs_file(inactive_IDs, start_times, end_times)#

Update submission records in the known-submission file.

Note

We aim for atomicity to help with the scenario where a new workflow submission is adding itself to the file at the same time as we have decided an existing workflow should no longer be part of this file. Ideally, such a scenario should not arise because both operations should only ever be interactively initiated by the single user (Workflow.submit and App.get_known_submissions). If this operation is atomic, then at least the known-submissions file should be left in a usable (but inaccurate) state.

Returns:

List of local IDs removed from the known-submissions file due to the maximum number of recent workflows to store being exceeded.

Return type:

list[int]

Parameters:
property user_cache_dir: Path#

The user’s cache directory.

property user_cache_hostname_dir: Path#

The hostname-scoped app cache directory.

property user_data_dir: Path#

The user’s data directory.

property user_data_hostname_dir: Path#

The directory for holding user data.

We segregate by hostname to account for the case where multiple machines might use the same shared file system.

property user_runtime_dir: Path#

The user’s temporary runtime directory.

version#

The version of the application.

workflows_dir#

Directory for workflows.