Skip to content

feat(website): add unscored website category (§6.12) - #48

Merged
Seungpyo1007 merged 1 commit into
mainfrom
feat/website-category
Jul 30, 2026
Merged

feat(website): add unscored website category (§6.12)#48
Seungpyo1007 merged 1 commit into
mainfrom
feat/website-category

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

What

A website collection for websites and web services, shaped like the existing standalone categories (game, software): no Brand FK — operators are a free-text owners list — and unscored.

Unlocks a ~47k-record import on the TechAPI side from Wikidata's Q35127 subtree, which is the only large source left that adds genuinely new entities rather than duplicating what the dataset already has. (A Steam-based games top-up was measured first and rejected: 90% of its titles already exist, and the apparent remainder is mostly name variants of records we hold — PUBG: BATTLEGROUNDS vs our playerunknowns-battlegrounds.)

Fields

Chosen from what the source actually populates, measured before designing rather than after:

field upstream coverage
homepage_url 89%
launch_date 42%
languages 41%
owners 17%

homepage_url, not url. Every read schema already uses url for the API self-link (url_for(...)); naming the site's own address url would have shadowed one of the two silently. A test asserts both are present and distinct.

Changes

  • app/models/website.py, app/schemas/website.py, website_read() serializer, app/routers/websites.py (list with sort+paginate, detail)
  • registered in main.py and in dump.py COLLECTIONS
  • seed.py loads data/website; validate.py enforces WEBSITE_REQUIRED = {slug, name, source_urls, verified} plus slug, date and source-url checks
  • 4 integration tests: list, detail, unknown-sort → 400, missing → 404

Verification

ruff check app tests ✅ · mypy app ✅ (101 files) · pytest tests/integration/test_websites.py 4 passed

Adds a `website` collection for websites and web services, following the same
standalone shape as game and software: no Brand FK (operators are a free-text
`owners` list) and no scoring.

Fields were chosen from what the source actually populates rather than from what
a website could theoretically have: homepage_url (89% populated upstream),
launch_date (42%), languages (41%), owners (17%).

`homepage_url` rather than `url` for the site's own address -- `url` is reserved
across every read schema for the API self-link, and a collision there would have
silently shadowed one of the two.

- model/schema/serializer/router, registered in main.py and dump.py COLLECTIONS
- seed loads data/website; validate.py enforces WEBSITE_REQUIRED
  {slug, name, source_urls, verified} plus slug/date/source-url checks
- 4 integration tests: list, detail, unknown-sort rejection, 404
@Seungpyo1007
Seungpyo1007 merged commit f785908 into main Jul 30, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the feat/website-category branch July 30, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant