design-research-experiments
design-research-experiments is the study-design and orchestration layer
in the CMU Design Research Collective design-research ecosystem. It makes
hypotheses, factors, conditions, replications, and artifact flows explicit
before execution.
It composes sibling libraries rather than reimplementing them:
design-research-agentsfor executable agent behavior, workflows, and tracesdesign-research-problemsfor problem catalogs, registries, and evaluatorsdesign-research-analysisfor downstream unified-table analysis and reporting
Quality Signals
- Coverage reports total line coverage for the default deterministic test suite; CI requires at least 95%.
- Examples Passing reports checked-in example scripts that execute successfully in the examples workflow.
- API in Examples reports curated top-level
__all__exports referenced by runnable examples.N/Nmeans every supported top-level export appears in at least one example, and CI requires 100%.
Run make coverage, make examples-test, and make examples-coverage to reproduce these checks locally.
Overview
This package centers on reproducible experiment structure and execution:
- typed schemas for studies, factors, blocks, hypotheses, outcomes, and analysis plans
- design-of-experiments materialization (full/constrained factorial, randomized block, repeated measures, latin square, custom matrices)
- run orchestration with deterministic seeding, always-on per-run evidence,
optional checkpointing, resume support, and interactive
tqdmprogress - explicit, disabled-by-default paper-support aggregation and paper-draft assembly with provenance, curated references, visible TODOs, and author-review boundaries
- standalone condition callbacks for simulations that do not require synthetic problem or agent bindings
- canonical artifact exports (
study.yaml,manifest.json,conditions.csv,runs.csv,events.csv,evaluations.csv, and machine-readable hypothesis/plan files) - documented artifact contracts that downstream analysis can ingest directory-first
- documented composition seams for user code:
design_research_problems.integration, the stabledesign_research_agents.studyfacade, and the top-leveldesign_research_analysisartifact API
design-research-experiments itself is the orchestration surface. There is
intentionally no separate design_research_experiments.integration module.
Internally, the package adapters consume
design_research_problems.integration and
design_research_agents.integration; the latter is a compatibility seam, not
the recommended authoring API. New user code should use
design_research_agents.study.
Quickstart
Requires Python 3.12+.
Maintainer workflows target Python 3.12 (.python-version).
For a VS Code path that starts from PyPI and then shows the repository example
workflow, see
VS Code Start.
Install the base package from PyPI:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install design-research-experiments
The base install is enough to define, validate, and materialize a study:
from design_research_experiments import build_design, build_prompt_framing_study
study = build_prompt_framing_study()
conditions = build_design(study)
print(study.study_id, len(conditions))
For contributor workflows from a source checkout:
python -m venv .venv
source .venv/bin/activate
make dev
make test
Run the repository's basic example:
make run-example
This repo maintains a hard 95% total line-coverage floor in CI via
make coverage. The repo-specific rule tracks the family-wide coverage policy
in cmudrc/design-research#4.
CLI
The package installs a drexp CLI:
drexp validate-study path/to/study.yaml
drexp materialize-design path/to/study.yaml
drexp generate-doe --kind lhs --factors-json '{"x": [0, 1], "y": [10, 20]}' --n-samples 12 --out artifacts/doe.csv
drexp run-study path/to/study.yaml
drexp resume-study path/to/study.yaml
drexp export-analysis path/to/study.yaml
drexp draft-paper path/to/output_dir --require-complete
drexp bundle-results path/to/output_dir
Install design-research-experiments[doe] to enable optional SciPy/QMC and
pyDOE3 backends for generate-doe --backend ...; the stdlib backend remains
the default.
Examples
See examples/README.md for runnable scripts, including end-to-end recipe executions.
Docs
See the published documentation for guides, the artifact contract, and API reference.
For whole-stack orientation and canonical cross-package examples, use the
design-research umbrella documentation.
Build docs locally with:
make docs-check
make docs-build
Public API
Selected primary entry points include:
Study,Factor,Level,Constraint,Condition,Block,DesignSpec,DesignKindRecipeStudyConfig,ComparisonStudyConfig, and recipe-specific typed config classesHypothesis,OutcomeSpec,AnalysisPlanRunSpec,RunResult,RunOutput,ConditionRunner,BenchmarkBundlebuild_design,generate_doe,materialize_conditionsbuild_univariate_comparison_study,build_bivariate_comparison_study,build_strategy_comparison_study, and other recipe buildersrun_study,resume_study,load_run_evidence_recordscollect_paper_support,export_paper_support,export_paper_draft,PaperDraftIncompleteErrorexport_analysis_tables,validate_study
Contributing
Contribution workflow and quality gates are documented in CONTRIBUTING.md.
Metadata
Release files for design-research-experiments 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| design_research_experiments-0.4.0.tar.gz | 125.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| design_research_experiments-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 216.7 kB
Release files / design_research_experiments-0.4.0.tar.gz
| Download URL | design_research_experiments-0.4.0.tar.gz |
|---|---|
| Size | 125.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1fecca50c7712f7df1cfe777dd2f647a3f0c4f536dec24a2ccc6fe57e6ae79c
|
|
BLAKE2b-256 checksum How to use checksums |
7573b263bbc3fabda109004cf16fab52063afa553497be7630243ebe50a85b90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / design_research_experiments-0.4.0-py3-none-any.whl
| Download URL | design_research_experiments-0.4.0-py3-none-any.whl |
|---|---|
| Size | 90.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f16f581fda7ed322d43abcf43055aa7bf4a739b2ac12e29dad0b6fb1638fc587
|
|
BLAKE2b-256 checksum How to use checksums |
00a9543b975d0ffb931461a9cc5f4dd5c65873d7158c436568f274cd877ae1b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency log