Skip to content

Commit ad4346d

Browse files
authored
Merge pull request #440 from GetTechAPI/develop
release: 1,821 chips, row-checked verification, date precision (2026-11-27)
2 parents 41f77e4 + bd0f325 commit ad4346d

3,699 files changed

Lines changed: 52588 additions & 2055 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/collect.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
inputs.task == 'ingest'
7575
permissions:
7676
contents: read
77-
uses: GetTechAPI/TechEngine/.github/workflows/ingest.yml@bea44ea7c5ce1ae4c02f9bac8599b4b4648925d6 # main, TechEngine #141
77+
uses: GetTechAPI/TechEngine/.github/workflows/ingest.yml@8df72d6329be8ff846a4bf434fdc4d7ba9b9a2ad # main, TechEngine #141
7878
with:
7979
category: ${{ inputs.category }}
8080
limit: ${{ inputs.limit }}
@@ -86,7 +86,7 @@ jobs:
8686
inputs.task == 'refresh'
8787
permissions:
8888
contents: read
89-
uses: GetTechAPI/TechEngine/.github/workflows/refresh.yml@bea44ea7c5ce1ae4c02f9bac8599b4b4648925d6 # main, TechEngine #141
89+
uses: GetTechAPI/TechEngine/.github/workflows/refresh.yml@8df72d6329be8ff846a4bf434fdc4d7ba9b9a2ad # main, TechEngine #141
9090
with:
9191
sleep: ${{ inputs.sleep }}
9292

@@ -96,7 +96,7 @@ jobs:
9696
inputs.task == 'promote'
9797
permissions:
9898
contents: read
99-
uses: GetTechAPI/TechEngine/.github/workflows/verify-promote.yml@bea44ea7c5ce1ae4c02f9bac8599b4b4648925d6 # main, TechEngine #141
99+
uses: GetTechAPI/TechEngine/.github/workflows/verify-promote.yml@8df72d6329be8ff846a4bf434fdc4d7ba9b9a2ad # main, TechEngine #141
100100
with:
101101
apply: ${{ inputs.apply }}
102102
max_urls: ${{ inputs.max_urls }}

‎README.md‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ November 2026.
5050
| Category | Path under `data/` | Files | Example |
5151
| --- | --- | ---: | --- |
5252
| `brand` | `brand/<country>/<slug>.json` | 3,101 | `brand/kr/samsung.json` |
53-
| `soc` | `soc/<manufacturer>/<year>/<slug>.json` | 1,339 | `soc/qualcomm/2024/snapdragon-8-elite.json` |
54-
| `cpu` | `cpu/<manufacturer>/<year>/<consumer\|enterprise>/<slug>.json` | 5,277 | `cpu/intel/2023/consumer/core-i9-14900k.json` |
55-
| `gpu` | `gpu/<manufacturer>/<year>/<consumer\|enterprise>/<slug>.json` | 2,340 | `gpu/nvidia/2025/consumer/geforce-rtx-5090.json` |
53+
| `soc` | `soc/<manufacturer>/<year>/<slug>.json` | 1,449 | `soc/qualcomm/2024/snapdragon-8-elite.json` |
54+
| `cpu` | `cpu/<manufacturer>/<year>/<consumer\|enterprise>/<slug>.json` | 6,412 | `cpu/intel/2023/consumer/core-i9-14900k.json` |
55+
| `gpu` | `gpu/<manufacturer>/<year>/<consumer\|enterprise>/<slug>.json` | 2,864 | `gpu/nvidia/2025/consumer/geforce-rtx-5090.json` |
5656
| `socket` | `socket/<slug>.json` | 78 | `socket/lga1156.json` |
57-
| `chipset` | `chipset/<manufacturer>/<slug>.json` | 727 | `chipset/intel/intel-z790.json` |
57+
| `chipset` | `chipset/<manufacturer>/<slug>.json` | 725 | `chipset/intel/intel-z790.json` |
5858
| `smartphone` | `smartphone/<brand>/<year>/<slug>.json` or `smartphone/<brand>/<year>/<base_model>/<slug>.json` | 96,407 | `smartphone/samsung/2025/galaxy-s25.json` |
5959
| `tablet` | `tablet/<brand>/<year>/<base_model>/<slug>.json` | 3,416 | `tablet/huawei/2020/matepad-t8/matepad-t8.json` |
60-
| `watch` | `watch/<brand>/<year>/<base_model>/<slug>.json` | 546 | `watch/samsung/2024/galaxy-watch-fe/…` |
61-
| `pda` | `pda/<brand>/<year>/<base_model>/<slug>.json` | 431 | `pda/hp/2000/ipaq-h3600/ipaq-h3600-base.json` |
62-
| `laptop` | `laptop/<brand>/<year>/<base_model>/<slug>.json` | 2,977 | `laptop/dell/2017/dell-inspiron-5567/…` |
60+
| `watch` | `watch/<brand>/<year>/<base_model>/<slug>.json` | 547 | `watch/samsung/2024/galaxy-watch-fe/…` |
61+
| `pda` | `pda/<brand>/<year>/<base_model>/<slug>.json` | 443 | `pda/hp/2000/ipaq-h3600/ipaq-h3600-base.json` |
62+
| `laptop` | `laptop/<brand>/<year>/<base_model>/<slug>.json` | 3,016 | `laptop/dell/2017/dell-inspiron-5567/…` |
6363
| `monitor` | `monitor/<brand>/<year>/<base_model>/<slug>.json` | 437 | `monitor/samsung/2023/samsung-m50b/…` |
6464
| `device_catalog` | `device_catalog/<brand>/<slug>.json` | 20,366 | `device_catalog/kazam/kazam-thunder-345-lte.json` |
6565
| `software` | `software/<prefix>/<slug>.json` | 42,492 | `software/sw/sweble.json` |
@@ -73,10 +73,14 @@ November 2026.
7373
no sourced country lives under `brand/unknown/`; that is most of them (2,674).
7474
- `<consumer|enterprise>` is a coarse folder split. A CPU record's own `segment`
7575
field is finer: `desktop`, `laptop`, `hedt` or `server`.
76-
- A CPU, GPU or SoC needs only its name, manufacturer and a source (a CPU or
77-
GPU also its `release_date`); other specs may be null. A SoC without a
78-
`release_date` lives at `soc/<manufacturer>/unknown/<slug>.json`, and a CPU
79-
without a `segment` at `cpu/<manufacturer>/<year>/unknown/<slug>.json`.
76+
- A CPU, GPU or SoC needs only its name, manufacturer and a source; other specs
77+
may be null. A chip without a `release_date` lives under `unknown/` in place
78+
of the year: `soc/<manufacturer>/unknown/<slug>.json`,
79+
`cpu/<manufacturer>/unknown/<consumer|enterprise>/<slug>.json`. A CPU without
80+
a `segment` lives at `cpu/<manufacturer>/<year>/unknown/<slug>.json`.
81+
- A chip whose source states the release only to the month or the year keeps a
82+
full `release_date` with the unstated parts as `01`, and
83+
`release_date_precision` (`month` or `year`) says so.
8084
- Sockets and chipsets have no year folder. `socket/` is flat because a socket
8185
shared by several makers has `manufacturer: null`. Their `release_date` may
8286
be `YYYY`, `YYYY-MM` or `YYYY-MM-DD`, as precise as the source; every other

‎app/validate.py‎

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
# Media links may only point at free Wikimedia Commons files, never third-party hotlinks.
4545
COMMONS_UPLOAD_RE = re.compile(r"https://upload\.wikimedia\.org/wikipedia/commons/\S+")
4646
COMMONS_FILEPATH_RE = re.compile(r"https://commons\.wikimedia\.org/wiki/Special:FilePath/\S+")
47-
# Chips need identity and a source too; a CPU or GPU also needs its release date
48-
# (the year folder). Other specs stay null when no source states them. A SoC
49-
# without a release date lives under <manufacturer>/unknown/, and a CPU without
50-
# a segment under <year>/unknown/ in place of the segment folder.
47+
# Chips need identity and a source too. Other specs stay null when no source
48+
# states them. A chip without a release date lives under <manufacturer>/unknown/
49+
# in place of the year folder, and a CPU without a segment under <year>/unknown/
50+
# in place of the segment folder.
5151
SOC_REQUIRED = {"slug", "name", "manufacturer"}
5252
CHIP_UNKNOWN_SEGMENT_DIR = "unknown"
5353
# Devices need identity and a source only. Specs a source does not state
@@ -72,14 +72,12 @@
7272
"slug",
7373
"name",
7474
"manufacturer",
75-
"release_date",
7675
}
7776

7877
CPU_REQUIRED = {
7978
"slug",
8079
"name",
8180
"manufacturer",
82-
"release_date",
8381
}
8482

8583
LAPTOP_REQUIRED = {
@@ -138,6 +136,10 @@
138136
# Categories a catalog entry can be promoted to (``promoted_to`` = "<category>/<slug>").
139137
PROMOTION_TARGETS = {"smartphone", "tablet", "watch", "pda"}
140138
DATE_PRECISIONS = {"day", "month", "year", "year_estimated"}
139+
# A chip dated only to the month or the year keeps a full release_date; the parts
140+
# its source does not state are stored as 01 and release_date_precision says so.
141+
CHIP_DATE_PRECISIONS = ("day", "month", "year")
142+
CHIP_DATE_PRECISION_SUFFIX = {"month": "-01", "year": "-01-01"}
141143
RELEASE_YEAR_SOURCES = {"model_code", "record"}
142144
RESOLUTION_RE = re.compile(r"^[1-9]\d{1,4}x[1-9]\d{1,4}$")
143145

@@ -248,6 +250,28 @@ def _check_identity_fields(name: str, record: dict[str, Any], errors: list[str])
248250
)
249251

250252

253+
def _check_chip_date_precision(name: str, record: dict[str, Any], errors: list[str]) -> None:
254+
"""release_date_precision on a CPU, GPU or SoC: day | month | year (absent or null = day)."""
255+
precision = record.get("release_date_precision")
256+
if precision is None:
257+
return
258+
if not isinstance(precision, str) or precision not in CHIP_DATE_PRECISIONS:
259+
errors.append(
260+
f"{name}: release_date_precision {precision!r} not in {list(CHIP_DATE_PRECISIONS)}"
261+
)
262+
return
263+
release_date = record.get("release_date")
264+
if release_date is None:
265+
errors.append(f"{name}: release_date_precision '{precision}' needs a release_date")
266+
return
267+
suffix = CHIP_DATE_PRECISION_SUFFIX.get(precision)
268+
if suffix is not None and not str(release_date).endswith(suffix):
269+
errors.append(
270+
f"{name}: release_date_precision '{precision}' needs a release_date "
271+
f"ending in '{suffix}' (got '{release_date}')"
272+
)
273+
274+
251275
def _check_unique_slugs(
252276
category: str, records: list[tuple[str, dict[str, Any]]], errors: list[str]
253277
) -> None:
@@ -336,6 +360,18 @@ def _check_year_folder(fname: str, rec: dict[str, Any], year: str, errors: list[
336360
)
337361

338362

363+
def _check_chip_path(fname: str, rec: dict[str, Any], category: str, errors: list[str]) -> None:
364+
"""CPU/GPU year folder: <category>/<manufacturer>/<year or "unknown">/<segment>/<slug>.json."""
365+
parts = Path(fname).parts
366+
if len(parts) == 5:
367+
_check_year_folder(fname, rec, parts[2], errors)
368+
elif rec.get("release_date") is None:
369+
errors.append(
370+
f"{fname}: release_date is null, so it must live at "
371+
f"'{category}/<manufacturer>/{DEVICE_UNKNOWN_YEAR_DIR}/<segment>/<slug>.json'"
372+
)
373+
374+
339375
def _check_variant_path(
340376
fname: str,
341377
rec: dict[str, Any],
@@ -453,6 +489,7 @@ def validate() -> list[str]:
453489
_check_slug(fname, rec.get("slug"), errors)
454490
if rec.get("release_date") is not None:
455491
_check_date(fname, rec["release_date"], errors)
492+
_check_chip_date_precision(fname, rec, errors)
456493
_check_range(fname, "process_nm", rec.get("process_nm"), 1.0, 100.0, errors)
457494
if rec.get("manufacturer") not in brand_slugs:
458495
errors.append(f"{fname}: manufacturer '{rec.get('manufacturer')}' not a known brand")
@@ -491,7 +528,8 @@ def validate() -> list[str]:
491528
_check_slug(fname, rec.get("slug"), errors)
492529
if rec.get("release_date") is not None:
493530
_check_date(fname, rec["release_date"], errors)
494-
_check_range(fname, "ram_gb", rec.get("ram_gb"), 0.016, 64, errors)
531+
# Lower bound 0.0001: 1990s PDAs shipped with 128-512 KB.
532+
_check_range(fname, "ram_gb", rec.get("ram_gb"), 0.0001, 64, errors)
495533
_check_identity_fields(fname, rec, errors)
496534
_check_range(fname, "battery_mah", rec.get("battery_mah"), 50, 20000, errors)
497535
_check_range(fname, "weight_g", rec.get("weight_g"), 10, 2000, errors)
@@ -508,31 +546,38 @@ def validate() -> list[str]:
508546
_check_required(fname, rec, GPU_REQUIRED, errors)
509547
_check_source_urls(fname, rec, errors)
510548
_check_slug(fname, rec.get("slug"), errors)
511-
if "release_date" in rec:
549+
if rec.get("release_date") is not None:
512550
_check_date(fname, rec["release_date"], errors)
551+
_check_chip_date_precision(fname, rec, errors)
513552
_check_range(fname, "memory_gb", rec.get("memory_gb"), 0.001, 512, errors)
514-
_check_range(fname, "tdp_w", rec.get("tdp_w"), 1, 3000, errors)
553+
_check_number(fname, "tdp_w", rec.get("tdp_w"), 1, 3000, errors)
515554
if "msrp_usd" in rec:
516555
_check_range(fname, "msrp_usd", rec["msrp_usd"], 50, 100000, errors)
517556
if rec.get("manufacturer") not in brand_slugs:
518557
errors.append(f"{fname}: manufacturer '{rec.get('manufacturer')}' not a known brand")
558+
_check_chip_path(fname, rec, "gpu", errors)
519559

520560
valid_segments = {"desktop", "laptop", "hedt", "server"}
521561
for fname, rec in cpus:
522562
_check_required(fname, rec, CPU_REQUIRED, errors)
523563
_check_source_urls(fname, rec, errors)
524564
_check_slug(fname, rec.get("slug"), errors)
525-
if "release_date" in rec:
565+
if rec.get("release_date") is not None:
526566
_check_date(fname, rec["release_date"], errors)
567+
_check_chip_date_precision(fname, rec, errors)
527568
_check_range(fname, "cores", rec.get("cores"), 1, 512, errors)
528569
_check_range(fname, "threads", rec.get("threads"), 1, 1024, errors)
570+
# Fractional watts are real (4.5 W mobile parts, sub-watt embedded ones).
571+
_check_number(fname, "tdp_w", rec.get("tdp_w"), 0, 10000, errors)
529572
if "msrp_usd" in rec:
530573
_check_range(fname, "msrp_usd", rec["msrp_usd"], 20, 50000, errors)
531574
seg = rec.get("segment")
532575
if seg is not None and seg not in valid_segments:
533576
errors.append(f"{fname}: segment '{seg}' not in {sorted(valid_segments)}")
534577
# Path convention: cpu/<manufacturer>/<year>/<consumer|enterprise>/<slug>.json,
535-
# with CHIP_UNKNOWN_SEGMENT_DIR as the folder when the segment is unknown.
578+
# with DEVICE_UNKNOWN_YEAR_DIR as the year when the release date is unknown and
579+
# CHIP_UNKNOWN_SEGMENT_DIR as the folder when the segment is unknown.
580+
_check_chip_path(fname, rec, "cpu", errors)
536581
parts = Path(fname).parts
537582
segment_dir = parts[3] if len(parts) == 5 else None
538583
if seg is None and segment_dir != CHIP_UNKNOWN_SEGMENT_DIR:
@@ -553,11 +598,12 @@ def validate() -> list[str]:
553598
_check_slug(fname, rec.get("slug"), errors)
554599
if rec.get("release_date") is not None:
555600
_check_date(fname, rec["release_date"], errors)
556-
_check_range(fname, "ram_gb", rec.get("ram_gb"), 1, 256, errors)
601+
# Lower bound 0.0001: 1980s portables shipped with 256 KB and weighed 7-8 kg.
602+
_check_number(fname, "ram_gb", rec.get("ram_gb"), 0.0001, 256, errors)
557603
if rec.get("storage_gb") is not None:
558604
_check_range(fname, "storage_gb", rec.get("storage_gb"), 1, 65536, errors)
559605
if rec.get("weight_g") is not None:
560-
_check_range(fname, "weight_g", rec.get("weight_g"), 300, 6000, errors)
606+
_check_range(fname, "weight_g", rec.get("weight_g"), 300, 10000, errors)
561607
if "msrp_usd" in rec:
562608
_check_range(fname, "msrp_usd", rec["msrp_usd"], 50, 50000, errors)
563609
if rec.get("brand") not in brand_slugs:

0 commit comments

Comments
 (0)