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.SectionProxyReturn the CGenFF config section.
attributecgenff_dirPathReturn the CGenFF directory (SILCSBIODIR).
attributeparameter_storePathReturn 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)paramselfReturns
Nonefunc_load_config(self)Load configuration from defaults, then user config, then env overrides.
paramselfReturns
Nonefuncreload(self)Reload configuration from disk.
paramselfReturns
Nonefuncis_configured(self) → boolCheck if a user config file exists.
paramselfReturns
boolfuncensure_dirs(self)Create data and config directories if they don't exist.
paramselfReturns
Nonefunc_resolve_local_path(self, raw_path) → strResolve a local filesystem path from config.
Expand environment variables and ~. Resolve relative paths
against the directory of the active config file.
paramselfparamraw_pathstrRaw path string from config
Returns
strAbsolute, expanded path string
funcget_db_path(self, db_name, db_type='sqlite') → strGet the path for a specific database.
paramselfparamdb_namestrLogical database name (e.g., "RUN_DATABASE", "ANALYSIS_AREA_PER_LIPID")
paramdb_typestr= 'sqlite'Backend type, currently only "sqlite" is supported
Returns
strAbsolute path to the database file
funcget_foundry_path(self, db_name) → strGet the path for a specific Foundry dataset.
paramselfparamdb_namestrLogical database name
Returns
strFoundry dataset path
funcget_csv_path(self, db_name) → strGet the CSV file path for a specific database/table.
paramselfparamdb_namestrLogical database name
Returns
strAbsolute path to the CSV file
