33> ** Validation, ingestion, and serving engine for the [ TechAPI] ( https://github.com/GetTechAPI/TechAPI ) dataset.**
44
55[ ![ test] ( https://github.com/GetTechAPI/TechEngine/actions/workflows/test.yml/badge.svg )] ( https://github.com/GetTechAPI/TechEngine/actions/workflows/test.yml )
6-   ; Code: ** MIT** · Data: lives in ** [ TechAPI] ( https://github.com/GetTechAPI/TechAPI ) ** (CC-BY-SA 4.0)
6+   ; Code: ** MIT** - Data: lives in ** [ TechAPI] ( https://github.com/GetTechAPI/TechAPI ) ** (CC-BY-SA 4.0)
77
88TechEngine owns everything * around* the data: schema validation, the FastAPI
9- read API, the static JSON dump generator, the engine's own landing site, and
10- (next up) automated coverage checks and a weekly ingestion crawler .
9+ read API, the static JSON dump generator, the engine's own landing site,
10+ automated coverage checks, and the weekly ingestion/refresh crawlers .
1111
1212The dataset and the public-facing playground site live in
1313[ TechAPI] ( https://github.com/GetTechAPI/TechAPI ) so each can be versioned,
1414mirrored, and licensed independently. The site shipped in this repo is the
15- engine's own landing — what TechEngine is, what it runs, link out to docs.
15+ engine's own landing: what TechEngine is, what it runs, and links out to docs.
1616
1717## Layout
1818
19- ```
19+ ``` text
2020app/
21- ├ validate.py # schema/range/uniqueness checks
22- ├ seed.py # data/ → SQLModel database
23- ├ dump.py # API → static JSON tree
24- ├ main.py # FastAPI entrypoint
25- ├ models/ # SQLModel tables
26- ├ routers/ # /v1/{brands,socs,smartphones,gpus,cpus}
27- ├ schemas/ # Pydantic response models
28- ├ services/ # scoring (algorithm_version-tagged)
29- ├ coverage/ # upstream-vs-curated diff + Markdown report
30- └ ingest/ # draft new records from upstream pages
21+ validate.py # schema/range/uniqueness checks
22+ seed.py # data/ -> SQLModel database
23+ dump.py # API -> static JSON tree
24+ main.py # FastAPI entrypoint
25+ models/ # SQLModel tables
26+ routers/ # /v1/{brands,socs,smartphones,gpus,cpus}
27+ schemas/ # Pydantic response models
28+ services/ # scoring (algorithm_version-tagged)
29+ coverage/ # upstream-vs-curated diff + Markdown report
30+ ingest/ # draft new records from upstream pages
3131tests/ # unit + integration
3232site/ # Astro engine landing (deploys to Pages)
3333docs/ # SPEC / DATA_PIPELINE / DEVELOPMENT
34- TechAPI/ # submodule → GetTechAPI/TechAPI (clickable @ <sha> link)
34+ TechAPI/ # submodule -> GetTechAPI/TechAPI (clickable @ <sha> link)
3535.github/workflows/
36- ├ validate-data.yml # workflow_call: PR-time data validation for TechAPI
37- ├ weekly-refresh.yml # cron: live-scrape → integrity gate → dump → PR to TechAPI
38- ├ weekly-ingest.yml # cron: draft new SKUs, open PR against TechAPI
39- ├ coverage-report.yml # cron: gap report, sticky issue (TechEngine + TechAPI)
40- ├ refresh-data.yml # smoke-test: rebuild the dump on engine (app/**) changes
41- ├ notify-techapi.yml # push→ main: ping TechAPI to bump its TechEngine submodule
42- ├ bump-techapi.yml # dispatch: advance this repo's TechAPI submodule pointer
43- ├ deploy-pages.yml # build & deploy engine site + dump
44- └ test.yml # lint + type-check + tests
36+ validate-data.yml # workflow_call: PR-time data validation for TechAPI
37+ weekly-refresh.yml # cron: live-scrape -> integrity gate -> dump -> PR to TechAPI
38+ weekly-ingest.yml # cron: draft new SKUs, open PR against TechAPI
39+ coverage-report.yml # cron: gap report, sticky issue (TechEngine + TechAPI)
40+ refresh-data.yml # smoke-test: rebuild the dump on engine (app/**) changes
41+ notify-techapi.yml # push to main: ping TechAPI to bump its TechEngine submodule
42+ bump-techapi.yml # dispatch: advance this repo's TechAPI submodule pointer
43+ deploy-pages.yml # build & deploy engine site + dump
44+ test.yml # lint + type-check + tests
4545```
4646
47- ## How the two repos connect
47+ ## How The Two Repos Connect
4848
4949Both repos live in the ** GetTechAPI** org and each includes the other as a git
5050** submodule** (a clickable ` @ <sha> ` pin). Three automations keep them in step:
5151
52- - ** validate-data.yml** (` workflow_call ` ) — TechAPI's PR-time check calls into
52+ - ** validate-data.yml** (` workflow_call ` ) - TechAPI's PR-time check calls into
5353 TechEngine to validate its data.
54- - ** weekly-refresh.yml** — live-scrapes benchmarks, runs the full-dataset
54+ - ** weekly-refresh.yml** - live-scrapes benchmarks, runs the full-dataset
5555 integrity gate (` app.validate ` + ` integrity_check.py --strict ` ), regenerates
5656 the static dump, and opens a dated refresh PR against TechAPI.
57- - ** Submodule autosync** — every push to TechEngine ` main ` fires
57+ - ** Submodule autosync** - every push to TechEngine ` main ` fires
5858 ` notify-techapi.yml ` , which pings TechAPI to bump its TechEngine pointer;
5959 conversely ` bump-techapi.yml ` advances TechEngine's TechAPI pointer when
6060 TechAPI changes. Bumps are loop-guarded, so each real change converges to one.
6161
6262Every Python entry point reads data from a ** TechAPI checkout** . The location
63- can be overridden via ` TECHAPI_DATA_DIR ` ; the default looks for ` ../TechAPI/data `
64- next to this repo, which matches a local dev layout .
63+ can be overridden via ` TECHAPI_DATA_DIR ` ; by default TechEngine supports both
64+ layouts: ` TechAPI/TechEngine ` as a submodule and ` TechAPI ` beside ` TechEngine ` .
6565
6666## Quickstart
6767
6868``` bash
6969git clone https://github.com/GetTechAPI/TechAPI.git ../TechAPI # data source
7070pip install -e " .[dev]"
7171python -m app.validate # check data integrity
72- python -m app.seed # data/ → ./techapi.db (SQLite)
72+ python -m app.seed # data/ -> ./techapi.db (SQLite)
7373uvicorn app.main:app --reload # serve; curl localhost:8000/v1/cpus/ryzen-9-9950x3d
7474python -m app.dump # generate ./dump/v1/... static tree
7575```
@@ -87,14 +87,14 @@ Spins up Postgres 16, seeds from the mounted TechAPI checkout, serves on `:8000`
8787## Roadmap
8888
8989- [x] Split out from TechAPI; sibling-checkout data pipeline
90- - [x] ** Coverage gap detector** — diff curated dataset vs upstream catalogs
90+ - [x] ** Coverage gap detector** - diff curated dataset vs upstream catalogs
9191 and surface missing SKUs as a sticky weekly issue
9292 ([ #1 ] ( https://github.com/GetTechAPI/TechEngine/issues/1 ) )
93- - [x] ** Weekly ingestion crawler** — scrape canonical sources and open PRs
93+ - [x] ** Weekly ingestion crawler** - scrape canonical sources and open PRs
9494 against TechAPI with new SKUs (requires the ` TECHAPI_TOKEN ` secret to push)
9595 ([ #2 ] ( https://github.com/GetTechAPI/TechEngine/issues/2 ) )
96- - [x] ** Weekly refresh pipeline** — live benchmark enrichment → full-dataset
97- integrity gate → static dump → dated refresh PR (` weekly-refresh.yml ` )
96+ - [x] ** Weekly refresh pipeline** - live benchmark enrichment -> full-dataset
97+ integrity gate -> static dump -> dated refresh PR (` weekly-refresh.yml ` )
9898- [x] ** Bidirectional submodule autosync** between TechEngine and TechAPI
9999- [ ] More sources (Intel ARK, AMD product pages, TechPowerUp DB)
100100
0 commit comments