-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
we are updating the compatibility schema prototypes to be entirely graphs, meaning that every node must be represented in the graph. This also makes our lives simpler because we do not need a separate json schema for some custom format - we can just use JGF! While there are tools that are using V1, I reviewed the differences and think V2 is better in that we can lookup specific nodes in N1 time (without needing to iterate over a list) and this seems to be the preference for the json graph maintainers, so we should go that route and (eventually) update underlying tools that might use this to support that. In addition, I am adding an example for a compatibility spec, or what would be an artifact that represents an application or container image, and uses one or more compatibility schemas. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
453 additions
and
104 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
{ | ||
"compatibilities": { | ||
"io.archspec.cpu": { | ||
"version": "0.0.0", | ||
"annotations": [ | ||
"family", | ||
"model", | ||
"target", | ||
"vendor" | ||
] | ||
} | ||
"graph": { | ||
"id": "io.archspec", | ||
"type": "compspec", | ||
"label": "compatibilities", | ||
"nodes": { | ||
"cpu": { | ||
"label": "central processing unit (cpu)" | ||
}, | ||
"cpu.family": { | ||
"label": "cpu family" | ||
}, | ||
"cpu.model": { | ||
"label": "cpu model" | ||
}, | ||
"cpu.target": { | ||
"label": "cpu target" | ||
}, | ||
"cpu.vendor": { | ||
"label": "cpu vendor" | ||
} | ||
}, | ||
"edges": [ | ||
{ | ||
"source": "cpu", | ||
"target": "cpu.family", | ||
"relation": "contains" | ||
}, | ||
{ | ||
"source": "cpu", | ||
"target": "cpu.model", | ||
"relation": "contains" | ||
}, | ||
{ | ||
"source": "cpu", | ||
"target": "cpu.target", | ||
"relation": "contains" | ||
}, | ||
{ | ||
"source": "cpu", | ||
"target": "cpu.vendor", | ||
"relation": "contains" | ||
} | ||
], | ||
"metadata": { | ||
"version": "0.0.0", | ||
"source": "https://github.com/supercontainers/compspec" | ||
} | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"version": "0.0.0", | ||
"kind": "CompatibilitySpec", | ||
"metadata": { | ||
"name": "lammps-prototype" | ||
}, | ||
"compatibilities": [ | ||
{ | ||
"name": "io.archspec", | ||
"version": "0.0.0", | ||
"schema": "https://raw.githubusercontent.com/supercontainers/compspec/main/archspec/compspec.json", | ||
"attributes": { | ||
"cpu.model": "13th Gen Intel(R) Core(TM) i5-1335U", | ||
"cpu.target": "amd64", | ||
"cpu.vendor": "GenuineIntel" | ||
} | ||
}, | ||
{ | ||
"name": "org.supercontainers", | ||
"version": "0.0.0", | ||
"schema": "https://raw.githubusercontent.com/supercontainers/compspec/main/supercontainers/compspec.json", | ||
"attributes": { | ||
"mpi.implementation": "mpich", | ||
"mpi.version": "4.1.1", | ||
"os.name": "Ubuntu 22.04.3 LTS", | ||
"os.release": "22.04.3", | ||
"os.vendor": "ubuntu", | ||
"os.version": "22.04", | ||
"hardware.gpu.available": "yes" | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "http://jsongraphformat.info/v2.1/json-graph-schema.json", | ||
"title": "JSON Graph Schema", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"graph": { "$ref": "#/definitions/graph" } | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"graph" | ||
] | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"graphs": { | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/graph" } | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
], | ||
"definitions": { | ||
"graph": { | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"directed": { "type": [ "boolean" ], "default": true }, | ||
"type": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] }, | ||
"nodes": { | ||
"type": "object", | ||
"additionalProperties": { "$ref": "#/definitions/node" } | ||
}, | ||
"edges": { | ||
"type": [ "array" ], | ||
"items": { "$ref": "#/definitions/edge" } | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"directed": { "type": [ "boolean" ], "default": true }, | ||
"type": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] }, | ||
"nodes": { | ||
"type": "object", | ||
"additionalProperties": { "$ref": "#/definitions/node" } | ||
}, | ||
"hyperedges": { | ||
"type": [ "array" ], | ||
"items": { "$ref": "#/definitions/directedhyperedge" } | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"directed": { "type": [ "boolean" ], "enum": [false] }, | ||
"type": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] }, | ||
"nodes": { | ||
"type": "object", | ||
"additionalProperties": { "$ref": "#/definitions/node" } | ||
}, | ||
"hyperedges": { | ||
"type": [ "array" ], | ||
"items": { "$ref": "#/definitions/undirectedhyperedge" } | ||
} | ||
}, | ||
"required": [ "directed" ] | ||
} | ||
] | ||
}, | ||
"node": { | ||
"type": "object", | ||
"properties": { | ||
"label": { "type": "string" }, | ||
"metadata": { "type": "object" }, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"edge": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"source": { "type": "string" }, | ||
"target": { "type": "string" }, | ||
"relation": { "type": "string" }, | ||
"directed": { "type": [ "boolean" ], "default": true }, | ||
"label": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] } | ||
}, | ||
"required": [ "source", "target" ] | ||
}, | ||
"directedhyperedge": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"source": { "type": "array", "items": { "type": "string" } }, | ||
"target": { "type": "array", "items": { "type": "string" } }, | ||
"relation": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] } | ||
}, | ||
"required": [ "source", "target" ] | ||
}, | ||
"undirectedhyperedge": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"nodes": { "type": "array", "items": { "type": "string" } }, | ||
"relation": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"metadata": { "type": [ "object" ] } | ||
}, | ||
"required": [ "nodes" ] | ||
} | ||
} | ||
} |
Oops, something went wrong.