Skip to content

Generalize Wikidata cross-link registry to cover OEIS (P829) #17

Description

@katjabercic

The WD_OTHER_SOURCES registry in web/slurper/wd_raw_item.py already handles cross-links for nLab, MathWorld, ProofWiki, and EoM. Wire OEIS in the same way using Wikidata property P829 ("OEIS ID", 443 statements as of 2026-06-06).

How the registry works

WD_OTHER_SOURCES maps Item.Source → {wd_property, json_key}. The SPARQL query, a per-source WikidataSlurper, and save_links are all auto-generated from it. Links get label = Link.Label.WIKIDATA (provenance = Wikidata, not the target source). No new Link.Label is needed.

Tasks

  • Add Item.Source.OEIS: {"wd_property": "wdt:P829", "json_key": "oeisID"} to WD_OTHER_SOURCES.
  • Add an OEISRawItem(OtherWdRawItem) subclass with a url() builder and a case in BaseWdRawItem.raw_item.
  • Verify identifier form: OEIS stores A000045; P829 values also include the A prefix — they should match as-is.
  • make fix-files clean; tests pass.

Dependency

The OEIS slurper (issue #16) runs after this, this determines which sequences to import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions