feat(website): add unscored website category (§6.12) - #48
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A
websitecollection for websites and web services, shaped like the existing standalone categories (game, software): no Brand FK — operators are a free-textownerslist — 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: BATTLEGROUNDSvs ourplayerunknowns-battlegrounds.)Fields
Chosen from what the source actually populates, measured before designing rather than after:
homepage_urllaunch_datelanguagesownershomepage_url, noturl. Every read schema already usesurlfor the API self-link (url_for(...)); naming the site's own addressurlwould 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)main.pyand indump.pyCOLLECTIONSseed.pyloadsdata/website;validate.pyenforcesWEBSITE_REQUIRED = {slug, name, source_urls, verified}plus slug, date and source-url checksVerification
ruff check app tests✅ ·mypy app✅ (101 files) ·pytest tests/integration/test_websites.py4 passed ✅