Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,33 @@ 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/)):

```bash
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
```


4 changes: 0 additions & 4 deletions examples/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions project.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ classes:
id:
title:
description:
PI:
range: User
start_date:
range: date
end_date:
Expand Down
241 changes: 241 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"$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": {
"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
}

Loading