Skip to content

Commit 3c779ac

Browse files
committed
data(game): add 168,883 video games from Wikidata + wire game category
Adds the new `game` category (TechEngine PR #41): 168,883 video games sourced from Wikidata (P31=Q7889) via SPARQL — name, release_date, platforms, genres, developers, publishers; source_urls cite each Wikidata entity. All verified:false. Bumps the engine submodule to the game-category pin and mirrors the GAME_REQUIRED rule into app/validate.py. Sharded under data/game/<xx>/. No fabrication — every field comes from Wikidata. Refs #1
1 parent 2ae8fe7 commit 3c779ac

168,885 files changed

Lines changed: 2765707 additions & 1 deletion

File tree

Some content is hidden

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

app/validate.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@
105105
"verified",
106106
}
107107

108+
GAME_REQUIRED = {
109+
"slug",
110+
"name",
111+
"source_urls",
112+
"verified",
113+
}
114+
108115
DATE_RE = re.compile(r"^\d{4}-\d{2}-\d{2}$")
109116

110117

@@ -229,6 +236,7 @@ def validate() -> list[str]:
229236
cpus = _load("cpu")
230237
laptops = _load("laptop")
231238
monitors = _load("monitor")
239+
games = _load("game")
232240

233241
brand_slugs = {rec["slug"] for _, rec in brands if "slug" in rec}
234242
soc_slugs = {rec["slug"] for _, rec in socs if "slug" in rec}
@@ -246,6 +254,7 @@ def validate() -> list[str]:
246254
("cpu", cpus),
247255
("laptop", laptops),
248256
("monitor", monitors),
257+
("game", games),
249258
):
250259
_check_unique_slugs(category, records, errors)
251260

@@ -397,6 +406,17 @@ def validate() -> list[str]:
397406
errors.append(f"{fname}: brand '{rec.get('brand')}' not a known brand")
398407
_check_variant_path(fname, rec, "monitor", errors, allow_flat=True)
399408

409+
for fname, rec in games:
410+
_check_required(fname, rec, GAME_REQUIRED, errors)
411+
_check_source_urls(fname, rec, errors)
412+
_check_slug(fname, rec.get("slug"), errors)
413+
if rec.get("release_date") is not None:
414+
_check_date(fname, rec["release_date"], errors)
415+
if rec.get("rating") is not None:
416+
_check_range(fname, "rating", rec.get("rating"), 0, 5, errors)
417+
if rec.get("metacritic") is not None:
418+
_check_range(fname, "metacritic", rec.get("metacritic"), 0, 100, errors)
419+
400420
return errors
401421

402422

data/game/0-/0-99-skarbiec.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"slug": "0-99-skarbiec",
3+
"name": "0-99 (Skarbiec)",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q126188192"
7+
]
8+
}

data/game/0-/0-a-d.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"slug": "0-a-d",
3+
"name": "0 A.D.",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q161234"
7+
],
8+
"release_date": "2021-02-21",
9+
"platforms": [
10+
"Berkeley Software Distribution",
11+
"macOS",
12+
"Microsoft Windows"
13+
],
14+
"genres": [
15+
"real-time strategy",
16+
"historical video game"
17+
],
18+
"developers": [
19+
"Stanislas Dolcini",
20+
"Wildfire Games"
21+
],
22+
"publishers": [
23+
"Wildfire Games"
24+
]
25+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"slug": "0-abyssalsomewhere",
3+
"name": "0_abyssalSomewhere",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q116600557"
7+
],
8+
"release_date": "2018-07-12",
9+
"platforms": [
10+
"Microsoft Windows"
11+
]
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"slug": "0-day-attack-on-earth",
3+
"name": "0 Day Attack on Earth",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q5949313"
7+
],
8+
"release_date": "2009-12-23",
9+
"genres": [
10+
"action game"
11+
]
12+
}

data/game/0-/0-day.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"slug": "0-day",
3+
"name": "0 Day",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q116600558"
7+
],
8+
"release_date": "2016-11-15",
9+
"platforms": [
10+
"Microsoft Windows"
11+
]
12+
}

data/game/0-/0-degrees.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"slug": "0-degrees",
3+
"name": "0 Degrees",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q126974839"
7+
],
8+
"release_date": "2021-05-19",
9+
"publishers": [
10+
"Eastasiasoft"
11+
]
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"slug": "0-ji-no-kane-to-cinderella-halloween-wedding",
3+
"name": "0-Ji no Kane to Cinderella: Halloween Wedding",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q11184904"
7+
],
8+
"release_date": "2013-01-01",
9+
"genres": [
10+
"visual novel",
11+
"otome game"
12+
]
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"slug": "0-kara-no-shogi-shogi-youchien-ayumi-gumi",
3+
"name": "0 Kara no Shogi - Shogi Youchien Ayumi-Gumi",
4+
"verified": false,
5+
"source_urls": [
6+
"https://www.wikidata.org/wiki/Q124430627"
7+
]
8+
}

0 commit comments

Comments
 (0)