尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证A working model of a defense hardware manufacturer, from purchase order to fielded unit. SQLMesh, Iceberg, Flyte, DuckDB.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A working model of a defense hardware manufacturer, from purchase order to fielded unit, and four questions it answers:
The write-up, with interactive figures, is at zainhameedo.com/materiel.
The company and its data are synthetic. The generator (generate.py) simulates realistic mechanics: late parts stall builds, bad lots fail inspection, fielded units fail and wait on spares. It also plants one causal effect, a 35% cut in defect rates for suppliers enrolled in a development program, so the analysis can be checked against a known answer.
source extracts ──► Iceberg ──► SQLMesh ───────────────────────────► export ──► web page
(10 tables) snapshots staging ─► entities ─► analysis JSON
views product exposure
part part risk
supplier readiness
order line quality panel ──► Poisson DiD
build (statsmodels)
fielded unit
repair
└───────────────────────────── one Flyte workflow ─────────────────────────────┘
| Layer | What it does |
|---|---|
lake.py | Lands each source table as an Apache Iceberg table (local SQLite catalog standing in for Glue/S3) and points a DuckDB view at its current snapshot. |
transform/models/staging | Typed, renamed views over the sources, with key and validity audits. |
transform/models/core | One definition of each thing the business talks about, with relationships and derived facts: is this order late, is this unit down, how many sources does this part have. |
transform/models/analysis | Supplier exposure, part risk, build performance, fleet readiness, and the supplier quality panel. |
causal.py | Naive comparisons vs. difference-in-differences (Poisson, supplier and month fixed effects, clustered SEs), an event study and a placebo. |
pipeline.py | The Flyte workflow: land, test, plan and audit, export. |
22 models, 33 audits run on every build, SQLMesh unit tests for the logic that is easiest to get wrong (lateness of open orders, repair intervals clipped to months), and pytest checks that the estimator recovers the planted effect and finds none in the placebo.
Requires uv.
uv sync
uv run pyflyte run src/materiel/pipeline.py pipeline # land, transform, export (~30s)
uv run pytest -q # estimator tests
cd transform && uv run sqlmesh test # model unit tests
Explore the models with cd transform && uv run sqlmesh ui, or query the warehouse directly:
cd transform && uv run sqlmesh fetchdf "select * from analysis.part_risk order by risk_score desc limit 10"
Locally everything runs on DuckDB over a directory. With real systems behind it, the catalog becomes Glue, the warehouse S3, and SQLMesh runs on Athena; only lake.py's catalog and transform/config.py's gateway change. Sources would land incrementally, and the larger fact models (order lines, work orders) would become incremental by time.