Repository navigation
Conversation
Add the gateway-publish composite action (a Python CLI, installed with uv from its lock file) and two reusable workflows that use it: - gateway-validate.yml builds a dataset repo's Gateway metadata from its LinkML schema and gateway/metadata.yaml, and validates it against HDRUK 4.1.0 and HDR UK's TRASER service. No secrets; for PRs. - gateway-publish.yml validates a release, then, in an approval environment, sends it to the Gateway as a new version of an existing dataset and reads it back. Also add the action's pytest suite to action-tests.yml, a Dependabot entry for its uv.lock, docs and samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validate with TRASER only, which checks the same HDRUK 4.1.0 schema the Gateway uses, and drop the bundled HDRUK 3.0.0 and 4.1.0 schemas and the local validator. Drop the CLI commands that publishing doesn't use (list, delete, update/create from a file) and the live test. Replace the test fixtures with one small LinkML schema that covers each mapping case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the gateway-publish package with a single script, gateway_publish.py (validate, create, push), plus one test file. Merge gateway-validate.yml and gateway-publish.yml into gateway.yml: it always validates, and publishes after an environment approval when `publish: true`. Drop the samples and the action README; the docs page has the caller snippets and the script's docstring has the API notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Gateway blocks web UI edits, including status changes, for datasets managed by an integration, so every change goes through a PR and a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The script takes --gateway-url and --traser-url instead of falling back to built-in defaults; the defaults live only in the workflow inputs. The team comes only from gateway.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split main() into validate, create and push functions. Require --version for create and push, so publishing without a version fails instead of publishing 0.0.0. Turn network errors into clear messages, warning that a failed write may still have been applied. Comment the conventions a reader can't infer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AndyRae
marked this pull request as ready for review
November 23, 2026 16:47
The script never writes to the dataset repo. create prints the new dataset_id (as soon as the Gateway returns it) and pid, and a person adds them to gateway/gateway.yaml and commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a `create` input to gateway.yml. A dataset repo runs it once from a workflow_dispatch workflow, behind the same environment approval as publishing, so nobody needs the Gateway credentials locally. The job log prints the dataset_id and pid for a person to commit to gateway.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prquinlan
reviewed
Nov 24, 2026
Print errors as ::error:: so they show on the run summary and PR checks, like the repo's other actions. The script is only run through the workflow, so drop the local create instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
PR Description
Adds a reusable workflow that publishes a dataset repo's metadata to the HDR UK Health Data Research Gateway, so each LinkML dataset repo (starting with
nuh-data-sact) keeps its Gateway entry up to date on every release.This enables our approach of using Github/LinkML as the source of truth for NUH data, and publishing out to catalogues automatically. Worth reading the linked issue for reasoning of our approach around this.
And see the
nuh-data-sactrepository for how this will work at a data level: https://github.com/Health-Informatics-UoN/nuh-data-sactHow
A dataset repo holds its LinkML schema plus two hand-written files:
gateway/metadata.yaml(catalogue fields such as title, abstract and coverage, in HDR shape) andgateway/gateway.yaml(team,DRAFT/ACTIVEstatus, and the Gateway's dataset ID).The script:
metadata.yaml.Creating the dataset on the Gateway is a one-off: the dataset repo runs this workflow with
create: truefrom a manualworkflow_dispatch, behind the same approval. It prints the Gateway's dataset ID, which a person then commits togateway.yaml.This has been tested end to end against the live Gateway, using the demographics schema from
nuh-data.And built up from the HDR docs: https://hdruk.atlassian.net/wiki/spaces/HDRGTD/pages/3315630110/Custom+Integrations
Note that if you point an AI at this change, it likely will want to add a lot of tests, and swell this PR to 30+ files. The design choice is to deliberately keep this lean, yet still meaningful.
Related Issues or other material
Related: Health-Informatics-UoN/nuh-data#10
✅ Added/updated tests?