Skip to content

feat: Name a dataset's device and shot in its JSON-LD - #219

Merged
NathanCummings merged 2 commits into
mainfrom
feat/dataset-device-and-shot-jsonld
Oct 26, 2026
Merged

NathanCummings merged 2 commits into
mainfrom
feat/dataset-device-and-shot-jsonld

Conversation

@NathanCummings

@NathanCummings NathanCummings commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

What this changes

A dataset's JSON-LD now names the device and shot it is filed under, as fuel:device and fuel:shot. Until now it mentioned neither, so a catalogue reading FDS's records as linked data could not tell which shot a dataset is about without taking FDS's identifiers apart.

The values are plain text, the device's name and the shot's ID:

{
  "@type": "dcat:Dataset",
  "@id": "https://example.org/datasets/13",
  "title": "Equilibrium (Shot 30421)",
  "fuel:device": "mast",
  "fuel:shot": "30421"
}

They are not links to FDS's device and shot documents: other catalogues give the same device and shot addresses of their own, but can use the same names, so a search across catalogues can filter on these values. A dataset attached to a device but no shot has fuel:device only, and a global dataset has neither. Shot and collection documents are unchanged.

The JSON-LD page of the docs gains a "Device and shot" section, and its namespace and mapping tables list the two terms.

How it was tested

  • A new test reads the JSON-LD of a dataset on a shot, one on a device only and a global one, and checks which of the two terms each carries. It fails without the change.
  • I ran this branch merged with the JSON-LD dataset listing (feat: Answer dataset listings in JSON-LD when asked #220) as a second FDS in containers, seeded with the example catalogue. Its listing of the simulated datasets on MAST shot 30420 gave three nodes, each with "fuel:device": "mast" and "fuel:shot": "30420". A local prototype of federated search, running in another FDS, read the device and shot of those records from these two terms.
  • The two branches touch neighbouring lines of map_dataset_to_dcat and the docs page; they merge without conflict in either order.

Checklist

  • uv run ruff check . and uv run ruff format --check . pass
  • uv run pyright passes
  • uv run --all-extras pytest passes
  • Tests cover the change
  • Documentation updated, if the change is user-visible
  • Authorisation checks, if any, live in the service layer rather than the router (none added)

🤖 Generated with Claude Code

A dataset's JSON-LD now carries fuel:device and fuel:shot: the name of the
device it is filed under and the ID of its shot, as plain text. Another
catalogue can filter on them without knowing the addresses FDS gives
devices and shots. A dataset on a device but no shot has fuel:device only,
and a global dataset has neither.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@NathanCummings
NathanCummings marked this pull request as ready for review October 26, 2026 18:39
@NathanCummings
NathanCummings merged commit ce00e07 into main Oct 26, 2026
13 checks passed
@NathanCummings
NathanCummings deleted the feat/dataset-device-and-shot-jsonld branch October 26, 2026 18:39
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