Skip to content

Slurper: House of Graphs invariants #10

Description

@katjabercic

Extend source coverage to House of Graphs: just the invariants (e.g. "chromatic number", "girth", "treewidth"), not the graphs or invariant values.

Source

  • Endpoint: GET https://houseofgraphs.org/api/invariantsdo not send
    Accept: application/json (it returns {"error":true,"message":"Unauthorized"});
    the default Accept: */* returns HAL+JSON. No auth, no pagination.
  • Shape: _embedded.invariantModelList[].entityinvariantId,
    invariantName (= keyword), definition (HTML), typeName (b/i/r).
    ~52 entries.

Tasks

  • web/slurper/source_house_of_graphs.py with a slurper class + module-level
    instance.
  • Add a HOUSE_OF_GRAPHS choice to Item.Source.
  • Map each invariant → Item(source=HOUSE_OF_GRAPHS, identifier=str(invariantId), url=f"https://houseofgraphs.org/invariants/{id}", name=invariantName, description=<definition with HTML stripped>).
  • New Item.Source member with a ≤4-char tag (e.g. HoG = "HoG"); add it to
    Item.Source.key().
  • management/commands/import_house_of_graphs.py and clear_house_of_graphs.py.
  • Wire the importer into populate-db.
  • Makefile target import-house-of-graphs.
  • make create-migrations for the new Source choice.
  • Make basic tests.
  • make fix-files clean; tests pass.

Notes

  • No Wikidata cross-link property for invariants — they connect to existing concepts
    via the NAME_EQ heuristic (Chromatic Number, Girth, …), which makes them handy
    for the alignment-benchmark work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions