module myna.core.db.database
Define the requirements and behavior of the base Myna Database class.
class Database
The base class for a Myna database
method Database.__init__
__init__()
method Database.exists
exists()
Check if database exists at the specified path
method Database.get_cui_info
get_cui_info()
method Database.load
load(metadata_type)
Load and return a metadata value
method Database.set_path
set_path(path)
Set the path for the database
method Database.sync
sync(component_type, step_types, output_class, files)
Sync files resulting from a workflow step to the database
method Database.write_segment_sync_metadata
write_segment_sync_metadata(
sync_metadata_file,
simulation_file_path,
segment_key
)
Write metadata for a file being synced to the database
Args:
sync_metadata_file(str): Path to the YAML file where metadata is storedsimulation_file_path(str): Path to the simulation file being syncedsegment_key(str): Key identifying the segment in the database
class NoDatabase
Non-existent database used for tasks that don't actually require build data
method NoDatabase.__init__
__init__()
method NoDatabase.exists
exists() → bool
method NoDatabase.get_cui_info
get_cui_info()
Returns 'N/A' since there is no database.
method NoDatabase.load
load(metadata_type, **kwargs)
Returns None since there is no database to load from.
method NoDatabase.set_path
set_path(path)
method NoDatabase.sync
sync(component_type, step_types, output_class, files)
Returns an empty list since there is no database to sync to.
method NoDatabase.write_segment_sync_metadata
write_segment_sync_metadata(
sync_metadata_file,
simulation_file_path,
segment_key
)
Write metadata for a file being synced to the database
Args:
sync_metadata_file(str): Path to the YAML file where metadata is storedsimulation_file_path(str): Path to the simulation file being syncedsegment_key(str): Key identifying the segment in the database
This file was automatically generated via lazydocs.