Run it locally
Get the factory running on your own machine, to try it or to work on it.
Before you start
- Python 3, and a clone of the repository.
- Run every command from the repository root. The default setup needs no account, no warehouse and no API key.
Steps
1. Create a virtual environment and install the dependencies:
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
2. Load some data. showcase loads sample source systems and several data
products already in flight, which is the better choice for exploring the web app;
demo walks the worked example from empty to a live release.
.venv/bin/python -m dpf showcase
# or: .venv/bin/python -m dpf demo
Both write to var/, created on first use and ignored by git.
python -m dpf reset deletes it, to start over.
3. Run the web interface:
.venv/bin/python -m dpf serve
It listens on http://127.0.0.1:8200. Set PORT to use a different one.
4. Optional — let the agents draft. Without ANTHROPIC_API_KEY, the three
agent steps (requirements, the data model, the data contract) show their Run
the agent button disabled. Every step except the first section of the data contract v0.1 for a
system can still be done by hand — see
Known limitations.
To turn them on, put the key in a .env file at the repository root:
echo 'ANTHROPIC_API_KEY=sk-ant-…' >> .env
.env is read once per process and never overrides a key already exported in
your shell. It is in .gitignore and never gets committed.
5. Run the tests:
.venv/bin/python -m pytest -q
The suite is offline: no network call, no API key, no real warehouse. Tests
marked llm, which call the Anthropic API, are deselected by default; tests marked
databricks skip themselves unless a real workspace is configured.
Check that it worked
showcase prints the products it built and how far each one walked; serve prints
the URL it is listening on. Open it, and the sidebar lists the data products you
loaded. pytest -q ends with every test passing.
If it does not work
ModuleNotFoundErroron startup. The virtual environment is not active, or the install step did not finish. Re-run.venv/bin/pip install -r requirements.txtand use.venv/bin/python, not whateverpythonresolves to on yourPATH.- Port already in use. Something else is on 8200:
PORT=8300 .venv/bin/python -m dpf serve. - Run the agent stays disabled after adding the key. Restart
serve—.envis read once per process, not on every request.
Related
- Deploy — putting this on a server instead of a laptop.
- Your first data product — walking the showcase data step by step.
- Command line — every command, generated from the parser.