Foundry Dev Tools
Configure and use the Foundry backend that exists in the current code
MDFactory has a first-class Foundry backend in the sync layer. That backend is implemented through foundry_dev_tools plus the fdt command-line tooling used by the interactive config flow.
What the code expects
The current Foundry path relies on:
- the Python package
foundry_dev_tools - the
fdtcommand being available onPATH
mdfactory sync init config explicitly runs fdt config, then validates connectivity by constructing FoundryContext.
Configure the backend
Set the backend type:
[database]
TYPE = foundryThen run the interactive wizard:
mdfactory sync init configWhat the wizard does:
- Runs
fdt config - Checks for Foundry Dev Tools config files in standard locations
- Validates that
FoundryContext()can connect - Prompts for a Foundry
BASE_PATH - Prompts for
ANALYSIS_NAME - Derives dataset paths for runs, molecules, analyses, and artifacts
- Writes
~/.mdfactory/config.ini
Derived dataset layout
Given:
[foundry]
BASE_PATH = /Group Functions/mdfactory
ANALYSIS_NAME = analysisthe config flow derives:
- runs:
/Group Functions/mdfactory/runs - molecules:
/Group Functions/mdfactory/molecules - analysis root:
/Group Functions/mdfactory/analysis - artifacts root:
/Group Functions/mdfactory/artifacts
Within that layout, the code maps:
ANALYSIS_OVERVIEW -> <ANALYSIS_DB_PATH>/overviewANALYSIS_<NAME> -> <ANALYSIS_DB_PATH>/<name>ARTIFACT_<NAME> -> <ARTIFACT_DB_PATH>/<name>
Validate the setup
mdfactory sync init checkWhen [database] TYPE = foundry, this checks:
- Foundry authentication and connectivity
- the configured base path
- the configured runs, molecules, analysis, and artifact dataset roots
Initialize schemas
After configuration, initialize the datasets used by the sync commands:
mdfactory sync init systems
mdfactory sync init analysis
mdfactory sync init artifactsThis is the recommended way to establish the expected tables or datasets before pushing data.
Push and pull with Foundry
Push run metadata:
mdfactory sync push systems build_summary.yamlPush analyses:
mdfactory sync push analysis build_summary.yamlPush artifacts:
mdfactory sync push artifacts build_summary.yamlQuery overview data:
mdfactory sync pull analysis --overview
mdfactory sync pull artifacts --overviewBackend behavior
The Foundry backend is implemented by FoundryDataSource, which uses FoundryContext and dataset paths from the active config. MDFactory still uses the same high-level sync commands regardless of backend; only the storage implementation changes.
