veoibd_synapse package

Submodules

veoibd_synapse.dag_tools module

Provide functions for working with our DAGs.

class veoibd_synapse.dag_tools.ProjectDAG(project_id, synapse_session)[source]

Bases: networkx.classes.digraph.DiGraph

Class to generate and manage our project structure.

__init__(project_id, synapse_session)[source]

Set up instance.

check_children(node_id, func)[source]

Return list of child-ids where func returns True.

follow_path_to_folder(path, origin=None, create=False)[source]

Return terminal folder’s synID after traversing the defined path.

class veoibd_synapse.dag_tools.SynNode(entity_dict, synapse_session=None, is_root=False)[source]

Bases: munch.Munch

Provide methods and attributes to model an entity node in a DAG of Synapse Entities.

__eq__(other)[source]

Return True if equal.

__hash__()[source]

Return hash value.

__init__(entity_dict, synapse_session=None, is_root=False)[source]

Initialize an entity node object.

__ne__(other)[source]

Return True if NOT equal.

__str__()[source]

Override this.

store()[source]

If self.needs_update is True, run sys.store and reset needs_update.

veoibd_synapse.dag_tools.is_folder_named_x(child, name)[source]

Return True if child is a folder named name.

veoibd_synapse.errors module

Provide error classes for veoibd-synapse-data-manager.

exception veoibd_synapse.errors.NoResult[source]

Bases: veoibd_synapse.errors.VEOIBDSynapseError

Raise when an iteration has nothing to return, but normally would.

exception veoibd_synapse.errors.NotImplementedYet(msg=None)[source]

Bases: NotImplementedError, veoibd_synapse.errors.VEOIBDSynapseError

Raise when a section of code that has been left for another time is asked to execute.

__init__(msg=None)[source]

Set up the Exception.

exception veoibd_synapse.errors.VEOIBDSynapseError[source]

Bases: Exception

Base error class for veoibd-synapse-data-manager.

exception veoibd_synapse.errors.ValidationError[source]

Bases: veoibd_synapse.errors.VEOIBDSynapseError

Raise when a validation/sanity check comes back with unexpected value.

veoibd_synapse.interface module

Provide a representation of the interactions between a Synapse Project and other Synapse Entities.

class veoibd_synapse.interface.VEOProject(name=None, annotations=None, synapse_client=None, config_tree=None, **kwargs)[source]

Bases: object

Manage a collection of Synapse Entities common to a single project.

__init__(name=None, annotations=None, synapse_client=None, config_tree=None, **kwargs)[source]

Initialize an empty ProjectData object.

_build_remote_entity_dag()[source]

Build a DAG of the remote project structure.

_get_project_entity()[source]

Set self.project after retrieving the synapse object by name, create the Project if it does not exist.

_get_remote_entity_dicts()[source]

Query Synapse for all entity information related to this Project ID.

_process_annotations(annotations)[source]

Process annotation values.

_process_config_tree(config_tree)[source]

Process configuration values.

veoibd_synapse.misc module

Provide misc common functions to the rest of the CLI.

veoibd_synapse.misc.chunk_md5(path, size=1024000)[source]

Calculate and return the md5-hexdigest of a file in chunks of size.

veoibd_synapse.misc.load_csv(csv, **kwargs)[source]
veoibd_synapse.misc.nan_to_str(x, replacement=None)[source]

Return empty string if pd.isnull(x): replacement otherwise.

Parameters:
  • x (unknown) – object to inspect
  • replacement (None|str) – string to use as replacement (default: “”)
veoibd_synapse.misc.process_config(config=None)[source]

Prepare single config file.

veoibd_synapse.misc.update_configs(directory, to_update=None)[source]

Collect, combine, and return all *.yaml files in directory.

Module contents

Top-level package for veoibd_synapse.