Reproducible Econ
Config-driven stage execution, atomic parquet DataFrame caching, provenance manifests, and paper-ready report emitters for reproducible economic research.
Status
- Version
0.1.0, first public release (beta): APIs and configs may change before 1.0 - Release notes: CHANGELOG.md, plans: ROADMAP.md
What This Repo Does
reproducible-econ is the lightweight pipeline infrastructure layer for the Econ Agent Harness workshop:
- One-command pipeline runner: Load a single YAML config (
includes:+${var}interpolation), validate the stage DAG (cycle and missing-producer checks), and execute stages in topological order viauv run python -m reproducible_econ.pipeline.runner --config <yaml>. - Atomic stage cache with v2 fingerprints: Cache declared pandas DataFrame outputs as parquet with metadata sidecars, SHA-256 verification before load, retention pruning, and explicit
cache_miss_reasondiagnostics (no_cache,no_cache_flag,fingerprint_changed: <components>,checksum_mismatch,metadata_mismatch). - Run manifest (
run_manifest.json): Record Git commit and dirty state (staged + unstaged), Python and public package versions, config SHA-256, input/output file inventories, per-stage timings/fingerprints/artifact summaries, and claim verification counts. - Report emitters: Emit booktabs LaTeX tables (
LatexTableStage),\newcommandpaper macros (LatexMacroStage), optional matplotlib figures (FigureStageBase), and declarative econometric claim checks (ClaimCheckStage).
It intentionally contains no LLM, transformer, cloud, Overleaf API, or agent dependencies.
Install for Development
Core runtime dependencies are pandas, pyarrow, and pyyaml. Figure generation uses an optional figures extra (matplotlib>=3.8).
uv sync
uv run pytest -q
To include optional matplotlib figure generation:
uv sync --extra figures
uv run --extra figures pytest -q
Not yet on PyPI, install from GitHub:
uv add "reproducible-econ @ git+https://github.com/corybaird/reproducible-econ"
Quickstart
uv run --extra figures python -m reproducible_econ.pipeline.runner \
--config references/configs/example_pipeline.yaml
Runs the synthetic Phillips curve pipeline end to end: LaTeX tables, macros, a figure, claim checks, and a provenance manifest under reports/macro_demo/, with a parquet cache under .cache/macro_demo/. See docs/quickstart.md and the package tour below.
Quickstart: Synthetic Phillips Curve Example
The repository ships a self-contained synthetic Phillips curve pipeline (src/reproducible_econ/examples/macro_demo.py, driven by references/configs/example_pipeline.yaml) that generates its quarterly panel deterministically from project.seed with no external CSV or network calls.
1. Cold Run
uv run --extra figures python -m reproducible_econ.pipeline.runner \
--config references/configs/example_pipeline.yaml
Without --extra figures, plot_phillips skips cleanly with a warning (plotting.on_missing_matplotlib: skip) and all other stages complete normally.
Outputs land under reports/macro_demo/:
tables/summary_stats.tex— booktabs summary statistics tabletables/phillips_estimates.tex— booktabs OLS regression results tablefigures/phillips_scatter.png— scatter plot + fitted line (when--extra figuresis installed)macros.tex—\newcommandmacros (\BaselineCoef,\BaselineCoefShort,\BaselineSE,\BaselineP,\BaselineN,\PersistenceCoef,\UnivariateCoef, ...)claims_report.json— declarative verification for headline slope and persistence claims (fail_on_error: falseby default; warnings logged and counts recorded in the manifest)run_manifest.json— full provenance manifest
2. Warm Cache Hit
Run the exact same command a second time:
uv run --extra figures python -m reproducible_econ.pipeline.runner \
--config references/configs/example_pipeline.yaml
prepare_data and estimate_ols both report cache_hit (elapsed_sec: 0.0) and reload their verified parquet artifacts from .cache/macro_demo/.
3. One-Line Config Diff
Change a single parameter in references/configs/example_pipeline.yaml — for example, set estimation.winsorize_pct: 0.05 (or change data.lag_periods / data.end_quarter) — and re-run:
- Editing
estimation.winsorize_pct:prepare_datahits cache (status: "cache_hit"), whileestimate_olsre-executes withcache_miss_reason: "fingerprint_changed: config"and refreshesphillips_estimates.tex,macros.tex,phillips_scatter.png,claims_report.json, andrun_manifest.json. - Editing
data.end_quarterordata.lag_periods:prepare_datare-executes withcache_miss_reason: "fingerprint_changed: config", andestimate_olsre-executes withcache_miss_reason: "fingerprint_changed: upstream".
4. Targeted Runs and Forced Re-Execution
Run a subset of stages or a phase (automatically pulling in required upstream stages):
uv run python -m reproducible_econ.pipeline.runner \
--config references/configs/example_pipeline.yaml \
--targets export_macros check_claims
Bypass the cache for all stages:
uv run python -m reproducible_econ.pipeline.runner \
--config references/configs/example_pipeline.yaml \
--no-cache
Applied Research Projects
Two real-data applied pipelines live under projects/ (data under data/raw/ is gitignored and not committed):
- Basic (single model): Nakamura and Steinsson (2018) yield-curve event study —
RobustOLSModelreplication of QJE Table I with LaTeX tables, paper macros, and declarativeClaimCheckStageverification (projects/nakamura_steinsson_2018/pipeline.yaml). - Advanced (multi-model): Bauer and Swanson (2023) monetary policy surprises — FOMC Eurodollar PCA alignment, pre-announcement predictability OLS, Jordà local projections (
mps_orthvs rawmpsand 12-lag robustness), Proxy-SVAR, LP-IV, IRF figures, tables, macros, and claim checks (projects/bauer_swanson_2023/pipeline.yaml).
Citations for the papers and datasets these projects use are in docs/citations.md and docs/data_sources.md.
Run either project with stats-transformer via uv run --with:
uv run --with "stats-transformer>=1.11.1" --extra figures \
python -m reproducible_econ.pipeline.runner --config projects/nakamura_steinsson_2018/pipeline.yaml
uv run --with "stats-transformer>=1.11.1" --extra figures \
python -m reproducible_econ.pipeline.runner --config projects/bauer_swanson_2023/pipeline.yaml
Report Emitters and Overleaf Workflow
reproducible-econ contains no Overleaf sync, git-push, or API code. All report artifacts write under a single configurable output.reports_dir with stable filenames (tables/*.tex, figures/*.png, macros.tex, claims_report.json, run_manifest.json) so paper \input{} and \includegraphics{} references do not break across runs.
To use with Overleaf:
- Clone your Overleaf project locally.
- Point
output.reports_dirin your YAML config at a subfolder inside that checkout (or copy the directory in your own build script). - Review the git diff and commit/push with your own git workflow.
If you also want a timestamped archive of each manifest alongside run_manifest.json, set output.timestamped_manifest: true (or use ${run_timestamp} inside output.reports_dir).
Included Emitters
reproducible_econ.emitters.LatexTableStage: Pure-PythonbooktabsLaTeX table exporter (zerojinja2dependency) with automatic LaTeX escaping, column subsetting/renaming, and optional.csvmirror.reproducible_econ.emitters.LatexMacroStage: Emits\newcommandmacros from tidy DataFrames with strict checks for missing, ambiguous, NaN, or colliding macro names.reproducible_econ.emitters.FigureStageBase: Base stage formatplotlibfigures with lazy import, headless"Agg"backend setup, optional.mplstyle, and configurableskip/errorbehavior when thefiguresextra is absent.reproducible_econ.emitters.ClaimCheckStage: Verifies declarative claims (sign,coef±tol,pval_below/pval_above/pval_between,n_obs,date_min/date_max, and genericbounds), writesclaims_report.json, and records counts inrun_manifest.json["claims"].
Direct StageExecutor Usage
Stages can also be executed directly without the YAML runner. A stage implements run(data, config) and stores DataFrame outputs in data:
from reproducible_econ import StageExecutor
config = {
"factor": 2,
"output": {"cache_dir": ".cache/example", "reports_dir": "reports/example"},
}
executor = StageExecutor(config, "params.yaml")
data = executor.run(
"estimate",
EstimateStage(),
data,
cache_inputs=["factor"],
cache=True,
output_keys=["estimates"],
upstream_keys=["model_data"],
)
manifest_path = executor.finalize()
When cache_inputs is omitted on a cached stage, StageExecutor hashes the full config excluding the output and cache blocks so report directory changes do not bust computation caches.
Workshop Integration
The harness combines this package with:
Runnable workshop notebooks and configs: econ-agent-workshop.
Scope
- Deterministic config-driven stage execution
- Explicit DataFrame artifacts with atomic parquet caching
- Content-based v2 cache fingerprints and miss diagnostics
- Provenance manifests and paper-ready report emitters
The package does not provide econometric model suites, LLM/agent tooling, Overleaf sync clients, distributed execution, or a workflow GUI.
License
MIT
Metadata
Release files for reproducible-econ 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| reproducible_econ-0.1.0.tar.gz | 207.9 kB | Without provenance | Details for reproducible_econ-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reproducible_econ-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for reproducible_econ-0.1.0-py3-none-any.whl |
Total release size: 243.2 kB
Release files / reproducible_econ-0.1.0.tar.gz
| Download URL | reproducible_econ-0.1.0.tar.gz |
|---|---|
| Size | 207.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e76d2286200a3dd086f391f73bbda15641a60f18e95b871bcbdeb073176aa771
|
|
BLAKE2b-256 checksum How to use checksums |
933ab2c8f005c8dad65c39e474853300fd7dd7bfb22db0574863371adfe77d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / reproducible_econ-0.1.0-py3-none-any.whl
| Download URL | reproducible_econ-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
036859039441d43f3d24e35dd051411665e16d1b70a286c97848e0c2cd6c64fa
|
|
BLAKE2b-256 checksum How to use checksums |
1a76f9b93c41183ab16d7e96a2f45157dbd6c21bea14e124224dfceb29041ed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for reproducible-econ 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.