MDFactoryMDFactory

Settings

Unified configuration for mdfactory.

Absorbs all functionality from the old config.py module and the Config class from data_manager.py.

Attributes

attributeDEFAULT_CONFIG
= {'cgenff': {'SILCSBIODIR': ''}, 'storage': {'PARAMETERS': ''}, 'database': {'TYPE': 'sqlite'}, 'databases': {'USE_RUN_DB': 'true', 'USE_ANALYSIS_DB': 'true'}, 'sqlite': {'RUN_DB_PATH': '', 'ANALYSIS_DB_PATH': ''}, 'csv': {'RUN_DB_PATH': '', 'ANALYSIS_DB_PATH': ''}, 'foundry': {'BASE_PATH': '/Group Functions/mdfactory', 'ANALYSIS_NAME': 'analysis', 'RUN_DB_PATH': '/Group Functions/mdfactory/runs', 'ANALYSIS_DB_PATH': '/Group Functions/mdfactory/analysis', 'ARTIFACT_DB_PATH': '/Group Functions/mdfactory/artifacts'}}
attributeconfig
= configparser.ConfigParser()
attributecgenff_configconfigparser.SectionProxy

Return the CGenFF config section.

attributecgenff_dirPath

Return the CGenFF directory (SILCSBIODIR).

attributeparameter_storePath

Return the parameter store directory.

Functions

func_get_defaults()dict[str, dict[str, str]]

Compute all default config values including platform-appropriate paths.

Returns

dict[str, dict[str, str]]
func__init__(self)
paramself

Returns

None
func_load_config(self)

Load configuration from defaults, then user config, then env overrides.

paramself

Returns

None
funcreload(self)

Reload configuration from disk.

paramself

Returns

None
funcis_configured(self)bool

Check if a user config file exists.

paramself

Returns

bool
funcensure_dirs(self)

Create data and config directories if they don't exist.

paramself

Returns

None
func_resolve_local_path(self, raw_path)str

Resolve a local filesystem path from config.

Expand environment variables and ~. Resolve relative paths against the directory of the active config file.

paramself
paramraw_pathstr

Raw path string from config

Returns

str

Absolute, expanded path string

funcget_db_path(self, db_name, db_type='sqlite')str

Get the path for a specific database.

paramself
paramdb_namestr

Logical database name (e.g., "RUN_DATABASE", "ANALYSIS_AREA_PER_LIPID")

paramdb_typestr
= 'sqlite'

Backend type, currently only "sqlite" is supported

Returns

str

Absolute path to the database file

funcget_foundry_path(self, db_name)str

Get the path for a specific Foundry dataset.

paramself
paramdb_namestr

Logical database name

Returns

str

Foundry dataset path

funcget_csv_path(self, db_name)str

Get the CSV file path for a specific database/table.

paramself
paramdb_namestr

Logical database name

Returns

str

Absolute path to the CSV file

On this page