jobflow_remote.utils.data module#

jobflow_remote.utils.data.check_dict_keywords(obj: Any, keywords: list[str]) bool[source]#
jobflow_remote.utils.data.convert_store(spec_dict: dict, valid_stores) Store[source]#

Build a store based on the dict spec configuration from JobFlow TODO expose the methods from jobflow and don’t duplicate the code.

jobflow_remote.utils.data.convert_utc_time(datetime_value: datetime) datetime[source]#

Convert a time in UTC (used in the DB) to the time zone of the system where the code is being executed.

Parameters:

datetime_value – a datetime object in UTC

Return type:

The datetime in the zone of the current system

jobflow_remote.utils.data.deep_merge_dict(d1: MutableMapping, d2: Mapping, path: list[str] | None = None, raise_on_conflicts: bool = True, inplace: bool = True) MutableMapping[source]#

Merge a dictionary d2 into a dictionary d1 recursively.

Parameters:
  • d1

  • d2

  • path

  • raise_on_conflicts

  • inplace

jobflow_remote.utils.data.remove_none(obj)[source]#
jobflow_remote.utils.data.store_from_dict(store_dict: dict) Store[source]#
jobflow_remote.utils.data.suuid() str[source]#

Generate a string UUID (universally unique identifier).

Uses the UUID4 specification.

Returns:

A UUID.

Return type:

str

jobflow_remote.utils.data.uuid_to_path(uuid: str, index: int | None = 1, num_subdirs: int = 3, subdir_len: int = 2)[source]#