Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 16 additions & 0 deletions app/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@
"verified",
}

SOFTWARE_REQUIRED = {
"slug",
"name",
"source_urls",
"verified",
}

DATE_RE = re.compile(r"^\d{4}-\d{2}-\d{2}$")


Expand Down Expand Up @@ -237,6 +244,7 @@ def validate() -> list[str]:
laptops = _load("laptop")
monitors = _load("monitor")
games = _load("game")
software = _load("software")

brand_slugs = {rec["slug"] for _, rec in brands if "slug" in rec}
soc_slugs = {rec["slug"] for _, rec in socs if "slug" in rec}
Expand All @@ -255,6 +263,7 @@ def validate() -> list[str]:
("laptop", laptops),
("monitor", monitors),
("game", games),
("software", software),
):
_check_unique_slugs(category, records, errors)

Expand Down Expand Up @@ -417,6 +426,13 @@ def validate() -> list[str]:
if rec.get("metacritic") is not None:
_check_range(fname, "metacritic", rec.get("metacritic"), 0, 100, errors)

for fname, rec in software:
_check_required(fname, rec, SOFTWARE_REQUIRED, errors)
_check_source_urls(fname, rec, errors)
_check_slug(fname, rec.get("slug"), errors)
if rec.get("release_date") is not None:
_check_date(fname, rec["release_date"], errors)

return errors


Expand Down
15 changes: 15 additions & 0 deletions data/game/10/10-computer-hits-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"slug": "10-computer-hits-2",
"name": "10 Computer Hits 2",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q98399029"
],
"release_date": "1986-01-01",
"platforms": [
"Amstrad CPC"
],
"publishers": [
"Beau Jolly"
]
}
15 changes: 15 additions & 0 deletions data/game/10/10-computer-hits-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"slug": "10-computer-hits-3",
"name": "10 Computer Hits 3",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q105669831"
],
"release_date": "1986-01-01",
"platforms": [
"Amstrad CPC"
],
"publishers": [
"Beau Jolly"
]
}
15 changes: 15 additions & 0 deletions data/game/10/10-computer-hits-4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"slug": "10-computer-hits-4",
"name": "10 Computer Hits 4",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q98399061"
],
"release_date": "1988-01-01",
"platforms": [
"Amstrad CPC"
],
"publishers": [
"Beau Jolly"
]
}
15 changes: 15 additions & 0 deletions data/game/10/10-computer-hits-5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"slug": "10-computer-hits-5",
"name": "10 Computer Hits 5",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q113516824"
],
"release_date": "1989-01-01",
"platforms": [
"Amstrad CPC"
],
"publishers": [
"Beau Jolly"
]
}
15 changes: 15 additions & 0 deletions data/game/10/10-computer-hits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"slug": "10-computer-hits",
"name": "10 Computer Hits",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q96621136"
],
"release_date": "1985-01-01",
"platforms": [
"Amstrad CPC"
],
"publishers": [
"Beau Jolly"
]
}
8 changes: 8 additions & 0 deletions data/game/10/10-great-games.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "10-great-games",
"name": "10 Great Games",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q126184165"
]
}
8 changes: 8 additions & 0 deletions data/game/10/10-intelligent-strategy-games.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "10-intelligent-strategy-games",
"name": "10 Intelligent Strategy Games",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q126185033"
]
}
8 changes: 8 additions & 0 deletions data/game/10/10-megahits-vol-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "10-megahits-vol-2",
"name": "10 Megahits Vol 2",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q126187179"
]
}
8 changes: 8 additions & 0 deletions data/game/10/10-megahits-vol-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "10-megahits-vol-3",
"name": "10 Megahits Vol 3",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q126187164"
]
}
11 changes: 11 additions & 0 deletions data/game/10/100-000-pyramid-demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"slug": "100-000-pyramid-demo",
"name": "$100,000 Pyramid demo",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q104243716"
],
"genres": [
"game show video game"
]
}
21 changes: 21 additions & 0 deletions data/game/10/100-bullets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"slug": "100-bullets",
"name": "100 Bullets",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q8529"
],
"platforms": [
"Game Boy Advance",
"PlayStation Portable",
"Nintendo DS",
"Wii",
"PlayStation 3"
],
"genres": [
"action game"
],
"developers": [
"Acclaim Studios Austin"
]
}
17 changes: 17 additions & 0 deletions data/game/11/1171.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"slug": "1171",
"name": "1171",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q120804394"
],
"platforms": [
"personal computer"
],
"genres": [
"shooter game"
],
"developers": [
"Parallax Arts Studio"
]
}
13 changes: 13 additions & 0 deletions data/game/12/12-is-better-than-6-the-apostles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"slug": "12-is-better-than-6-the-apostles",
"name": "12 is Better Than 6: The Apostles",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q116493396"
],
"release_date": "2017-12-06",
"platforms": [
"macOS",
"Microsoft Windows"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "1428-shadows-over-silesia-tourney-at-the-bear-rock",
"name": "1428: Shadows over Silesia - Tourney at the Bear Rock",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q140462379"
]
}
12 changes: 12 additions & 0 deletions data/game/16/16-bit-collection-data-east-vol-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"slug": "16-bit-collection-data-east-vol-1",
"name": "16-Bit Collection: Data East Vol. 1",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q30932006"
],
"release_date": "2017-09-30",
"platforms": [
"Super Nintendo Entertainment System"
]
}
12 changes: 12 additions & 0 deletions data/game/16/1602-a-d-by-royal-command.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"slug": "1602-a-d-by-royal-command",
"name": "1602 A.D.: By Royal Command",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q2264180"
],
"release_date": "2006-06-03",
"genres": [
"strategy video game"
]
}
8 changes: 8 additions & 0 deletions data/game/17/1701-a-d-gold-edition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"slug": "1701-a-d-gold-edition",
"name": "1701 A.D. Gold Edition",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q121889010"
]
}
12 changes: 12 additions & 0 deletions data/game/1s/1st-cd-edition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"slug": "1st-cd-edition",
"name": "1st CD Edition",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q111435792"
],
"release_date": "1989-01-01",
"platforms": [
"Commodore 64"
]
}
16 changes: 16 additions & 0 deletions data/game/2-/2-hot-2-handle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"slug": "2-hot-2-handle",
"name": "2-Hot 2-Handle",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q126184931"
],
"release_date": "1991-01-01",
"platforms": [
"Amstrad CPC",
"Commodore Amiga"
],
"publishers": [
"Ocean Software"
]
}
12 changes: 12 additions & 0 deletions data/game/2-/2-por-1-basketball-two-on-two-star-raiders-ii.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"slug": "2-por-1-basketball-two-on-two-star-raiders-ii",
"name": "2 Por 1 - Basketball Two-On-Two + Star Raiders II",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q134599382"
],
"release_date": "1987-01-01",
"platforms": [
"Amstrad CPC"
]
}
14 changes: 14 additions & 0 deletions data/game/20/20-em-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"slug": "20-em-1",
"name": "20 em 1",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q4630619"
],
"developers": [
"Tectoy"
],
"publishers": [
"Tectoy"
]
}
9 changes: 9 additions & 0 deletions data/game/20/2018-fifa-world-cup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"slug": "2018-fifa-world-cup",
"name": "2018 FIFA World Cup",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q55004100"
],
"release_date": "2018-05-29"
}
19 changes: 19 additions & 0 deletions data/game/3-/3-in-1-supergun.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"slug": "3-in-1-supergun",
"name": "3 in 1 Supergun",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q101225378"
],
"release_date": "1993-01-01",
"platforms": [
"Nintendo Entertainment System"
],
"genres": [
"light-gun shooter",
"shooter game"
],
"publishers": [
"Micro Genius"
]
}
21 changes: 21 additions & 0 deletions data/game/30/30-days-until-wedding-bells.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"slug": "30-days-until-wedding-bells",
"name": "30 Days Until Wedding Bells",
"verified": false,
"source_urls": [
"https://www.wikidata.org/wiki/Q63436573"
],
"release_date": "2019-01-01",
"platforms": [
"Microsoft Windows"
],
"genres": [
"interactive fiction"
],
"developers": [
"Team Koala Lampoon"
],
"publishers": [
"Team Koala Lampoon"
]
}
Loading
Loading