Skip to content

Commit

Permalink
fix workflow schema
Browse files Browse the repository at this point in the history
Signed-off-by: B Hashemian <3968947+bhashemian@users.noreply.github.com>
  • Loading branch information
bhashemian committed Mar 7, 2025
1 parent 69529c2 commit 5344575
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ We do not require that community members conduct formal Software Quality Assuran
Every application and operator should have an associated *metadata.json* file which describes the features
and dependencies.

`metadata.json` schemas differ slightly for [applications](./applications/metadata.schema.json), [GXF extensions](./gxf_extensions/metadata.schema.json), [operators](./operators/metadata.schema.json), and [tutorials](./tutorials/metadata.schema.json), but generally follow the convention below:
`metadata.json` schemas differ slightly for [workflows](./workflows/metadata.schema.json), [applications](./applications/metadata.schema.json), [GXF extensions](./gxf_extensions/metadata.schema.json), [operators](./operators/metadata.schema.json), and [tutorials](./tutorials/metadata.schema.json), but generally follow the convention below:

```json
// Main json definition for application or operator
Expand Down
2 changes: 1 addition & 1 deletion utilities/gather_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def generate_build_and_run_command(metadata: dict) -> str:

def gather_metadata(repo_path, exclude_files: None) -> dict:
"""Collect project metadata from JSON files into a single dictionary"""
SCHEMA_TYPES = ["application", "operator", "gxf_extension", "tutorial"]
SCHEMA_TYPES = ["workflow", "application", "operator", "gxf_extension", "tutorial"]

metadata_files = find_metadata_files(repo_path)
metadata = []
Expand Down
3 changes: 2 additions & 1 deletion utilities/summarize_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ProjectType(Enum):
APPLICATION = 0
GXF_EXTENSION = 1
OPERATOR = 2
WORKFLOW = 3


@dataclass
Expand All @@ -68,9 +69,9 @@ def schema(self) -> dict:

project_type_data = [
ProjectTypeData(ProjectType.APPLICATION, "applications", "application"),
ProjectTypeData(ProjectType.APPLICATION, "workflows", "workflow"),
ProjectTypeData(ProjectType.GXF_EXTENSION, "gxf_extensions", "gxf_extension"),
ProjectTypeData(ProjectType.OPERATOR, "operators", "operator"),
ProjectTypeData(ProjectType.WORKFLOW, "workflows", "workflow"),
]


Expand Down
13 changes: 6 additions & 7 deletions workflows/metadata.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "holohub/application/v1",
"$id": "holohub/workflow/v1",
"type": "object",
"properties": {
"application": {
"workflow": {
"type": "object",
"properties": {
"name": {
Expand All @@ -30,6 +30,9 @@
"holoscan_sdk": {
"$ref": "holohub/project/v1#/$defs/sdk_version"
},
"holoscscan_sensor_bridge": {
"$ref": "holohub/project/v1#/$defs/sdk_version"
},
"ranking": {
"$ref": "holohub/project/v1#/$defs/ranking"
},
Expand All @@ -51,6 +54,7 @@
"platforms",
"tags",
"holoscan_sdk",
"holoscscan_sensor_bridge",
"ranking",
"dependencies"
]
Expand All @@ -59,11 +63,6 @@
"$ref": "holohub/gxf_extension/v1#/properties/gxf_extension"
},
"oneOf": [
{
"required": [
"workflow"
]
},
{
"required": [
"workflow"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application": {
"name": "Real-Time AI Surgical Video Processing Workflow",
"workflow": {
"name": "Real-Time Surgical Edge AI Workflow",
"authors": [
{
"name": "Holoscan Team",
Expand All @@ -18,11 +18,19 @@
"3.0.0"
]
},
"holoscscan_sensor_bridge": {
"minimum_required_version": "2.0.0",
"tested_versions": [
"2.0.0"
]
},
"platforms": [
"amd64",
"arm64"
],
"tags": [
"Workflow",
"End-to-End Application",
"Multiai",
"SSD",
"Detection",
Expand Down Expand Up @@ -51,7 +59,7 @@
"libraries": [
{
"name": "cupy",
"version": "11.6.0"
"version": "13.3.0"
}
]
},
Expand Down

0 comments on commit 5344575

Please sign in to comment.