Skip to content

Commit

Permalink
Update generation (#64)
Browse files Browse the repository at this point in the history
* generate_schema adds unique property

* update workflow and operation with new generation script

* remove unused imports, change unique location

* update operations.json with new format

* fix version numbering
  • Loading branch information
uhbrar authored Jan 13, 2022
1 parent f700482 commit 3756b54
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions schema/build/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def generate_component(op: str):
op,
],
},
"unique": (True if data.get("unique") else False),
"parameters": data["parameters"],
},
"required": [
Expand Down
32 changes: 31 additions & 1 deletion schema/operation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://standards.ncats.io/operation/1.1.0/schema",
"$id": "https://standards.ncats.io/operation/1.2.0/schema",
"anyOf": [
{
"$ref": "#/$defs/OperationAnnotate"
Expand Down Expand Up @@ -104,6 +104,7 @@
"annotate"
]
},
"unique": true,
"parameters": {}
},
"required": [
Expand All @@ -121,6 +122,7 @@
"annotate_edges"
]
},
"unique": true,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -152,6 +154,7 @@
"annotate_nodes"
]
},
"unique": true,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -183,6 +186,7 @@
"bind"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -200,6 +204,7 @@
"complete_results"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -217,6 +222,7 @@
"enrich_results"
]
},
"unique": true,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -256,6 +262,7 @@
"fill"
]
},
"unique": true,
"parameters": {
"type": "object",
"oneOf": [
Expand Down Expand Up @@ -329,6 +336,7 @@
"filter_kgraph"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -346,6 +354,7 @@
"filter_kgraph_continuous_kedge_attribute"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -412,6 +421,7 @@
"filter_kgraph_discrete_kedge_attribute"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -468,6 +478,7 @@
"filter_kgraph_discrete_knode_attribute"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -513,6 +524,7 @@
"filter_kgraph_orphans"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -530,6 +542,7 @@
"filter_kgraph_percentile"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -598,6 +611,7 @@
"filter_kgraph_std_dev"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -674,6 +688,7 @@
"filter_kgraph_top_n"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -741,6 +756,7 @@
"filter_results"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -758,6 +774,7 @@
"filter_results_top_n"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -789,6 +806,7 @@
"lookup"
]
},
"unique": true,
"parameters": {}
},
"required": [
Expand All @@ -806,6 +824,7 @@
"lookup_and_score"
]
},
"unique": true,
"parameters": {}
},
"required": [
Expand All @@ -823,6 +842,7 @@
"overlay"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -840,6 +860,7 @@
"overlay_compute_jaccard"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -888,6 +909,7 @@
"overlay_compute_ngd"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -930,6 +952,7 @@
"overlay_connect_knodes"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -947,6 +970,7 @@
"overlay_fisher_exact_test"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -994,6 +1018,7 @@
"restate"
]
},
"unique": true,
"parameters": {}
},
"required": [
Expand All @@ -1011,6 +1036,7 @@
"score"
]
},
"unique": true,
"parameters": {}
},
"required": [
Expand All @@ -1028,6 +1054,7 @@
"sort_results"
]
},
"unique": false,
"parameters": {}
},
"required": [
Expand All @@ -1045,6 +1072,7 @@
"sort_results_edge_attribute"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1094,6 +1122,7 @@
"sort_results_node_attribute"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1143,6 +1172,7 @@
"sort_results_score"
]
},
"unique": false,
"parameters": {
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions schema/workflow.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://standards.ncats.io/workflow/1.1.0/schema",
"$id": "https://standards.ncats.io/workflow/1.2.0/schema",
"type": "array",
"items": {
"$ref": "https://standards.ncats.io/operation/1.1.0/schema"
"$ref": "https://standards.ncats.io/operation/1.2.0/schema"
}
}

0 comments on commit 3756b54

Please sign in to comment.