From de03efced4b0b0ffcc169d836517355a5af03457 Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:15:01 +0100 Subject: [PATCH 1/6] Remove complicated PI tag from example --- project.schema.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/project.schema.yaml b/project.schema.yaml index e10f43c..0691c4f 100644 --- a/project.schema.yaml +++ b/project.schema.yaml @@ -6,8 +6,6 @@ classes: id: title: description: - PI: - range: User start_date: range: date end_date: From 0954cb8408a4a7eec1428decb1d7662a92beebfb Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:16:49 +0100 Subject: [PATCH 2/6] Base built schema is needed --- schema.json | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 schema.json diff --git a/schema.json b/schema.json new file mode 100644 index 0000000..72f008b --- /dev/null +++ b/schema.json @@ -0,0 +1,251 @@ +{ + "$defs": { + "CPU": { + "additionalProperties": false, + "description": "", + "properties": { + "cores": { + "type": [ + "integer", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "threads": { + "type": [ + "integer", + "null" + ] + }, + "vendor": { + "type": [ + "string", + "null" + ] + } + }, + "title": "CPU", + "type": "object" + }, + "OS": { + "additionalProperties": false, + "description": "", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "version": { + "type": [ + "string", + "null" + ] + } + }, + "title": "OS", + "type": "object" + }, + "PFF": { + "additionalProperties": false, + "description": "", + "properties": { + "project": { + "anyOf": [ + { + "$ref": "#/$defs/Project" + }, + { + "type": "null" + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/$defs/System" + }, + { + "type": "null" + } + ] + }, + "user": { + "anyOf": [ + { + "$ref": "#/$defs/User" + }, + { + "type": "null" + } + ] + } + }, + "title": "PFF", + "type": "object" + }, + "Project": { + "additionalProperties": false, + "description": "", + "properties": { + "PI": { + "anyOf": [ + { + "$ref": "#/$defs/User" + }, + { + "type": "null" + } + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "end_date": { + "format": "date", + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "start_date": { + "format": "date", + "type": [ + "string", + "null" + ] + }, + "title": { + "type": [ + "string", + "null" + ] + } + }, + "title": "Project", + "type": "object" + }, + "System": { + "additionalProperties": false, + "description": "", + "properties": { + "hardware": { + "anyOf": [ + { + "$ref": "#/$defs/CPU" + }, + { + "type": "null" + } + ] + }, + "hostname": { + "type": [ + "string", + "null" + ] + }, + "software": { + "anyOf": [ + { + "$ref": "#/$defs/OS" + }, + { + "type": "null" + } + ] + } + }, + "title": "System", + "type": "object" + }, + "User": { + "additionalProperties": false, + "description": "", + "properties": { + "email": { + "type": [ + "string", + "null" + ] + }, + "full_name": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "orcid": { + "type": [ + "string", + "null" + ] + } + }, + "title": "User", + "type": "object" + } + }, + "$id": "provenance-file-format", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "additionalProperties": true, + "description": "", + "metamodel_version": "1.11.0", + "properties": { + "project": { + "anyOf": [ + { + "$ref": "#/$defs/Project" + }, + { + "type": "null" + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/$defs/System" + }, + { + "type": "null" + } + ] + }, + "user": { + "anyOf": [ + { + "$ref": "#/$defs/User" + }, + { + "type": "null" + } + ] + } + }, + "title": "provenance-file-format", + "type": "object", + "version": null +} + From ce6252ac85b63578d84101db61c0425ea4bd1fc0 Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:26:05 +0100 Subject: [PATCH 3/6] Bump generated schema --- schema.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/schema.json b/schema.json index 72f008b..b7de8ed 100644 --- a/schema.json +++ b/schema.json @@ -94,16 +94,6 @@ "additionalProperties": false, "description": "", "properties": { - "PI": { - "anyOf": [ - { - "$ref": "#/$defs/User" - }, - { - "type": "null" - } - ] - }, "description": { "type": [ "string", From f0e048da4613b4dcdf3d9cca4eed8cc5bf7ec70a Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:29:13 +0100 Subject: [PATCH 4/6] Update README --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 9c4287b..145e20c 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,31 @@ The initial use-case is capture of provenance on HPC systems (SLURM), for adding 4. A creation tool will be provided for these files. This will guide users in populating the appropriate files, and will validate the files against the LINK-ML schema. 5. SLURM plugin will scan PFFPATH locations as job runs. *.pff files found will be validated against the schema, then metadata ingested. +## Schemas + +- `schema.yaml` — entry schema (imports the fragments below) +- `user.schema.yaml` / `project.schema.yaml` / `system.schema.yaml` — definitions + +## Development + +Setup (requires [uv](https://docs.astral.sh/uv/)): + + uv sync --group dev + +## Regenerating the compiled schema + +`schema.json` is the compiled output of `schema.yaml`. After changing any schema, regenerate it and commit: + +```bash +uv run linkml generate json-schema schema.yaml > schema.json +``` + +CI fails if `schema.json` is out of date. + +## Validating the example + +```bash +uv run linkml validate -s schema.yaml -C PFF examples/example.yaml +``` + From e2c55db137237dfc6159f7f47a2979e0aa553bb3 Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:29:36 +0100 Subject: [PATCH 5/6] Missed a code tag --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 145e20c..1999b17 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ The initial use-case is capture of provenance on HPC systems (SLURM), for adding Setup (requires [uv](https://docs.astral.sh/uv/)): - uv sync --group dev +```bash +uv sync --group dev +``` ## Regenerating the compiled schema From 9aaafb8e45a2b0a86ae3c3f199fb8f3b9803cff8 Mon Sep 17 00:00:00 2001 From: Oliver Woolland Date: Fri, 31 Jul 2026 16:30:53 +0100 Subject: [PATCH 6/6] Update example --- examples/example.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/example.yaml b/examples/example.yaml index 11b3842..e646fac 100644 --- a/examples/example.yaml +++ b/examples/example.yaml @@ -8,10 +8,6 @@ project: description: > Fictional research programme in psychoceramics, the supposed study of cracked pots. Professor Carberry is said to still teach at Brown University. - PI: - id: jcarberry - full_name: Josiah Stinkney Carberry - orcid: https://orcid.org/0000-0002-1825-0097 start_date: "1929-04-01" system: hardware: