Skip to content

Commit

Permalink
Merge pull request #72 from SciCatProject/fix-schema
Browse files Browse the repository at this point in the history
Fix schema finding and selector
  • Loading branch information
YooSunYoung authored Aug 28, 2024
2 parents 54c8a63 + 0b371b7 commit 84ea462
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 101 deletions.
30 changes: 15 additions & 15 deletions resources/base.imsc.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": c5bed39a-4379-11ef-ba5a-ffbc783163b6
"name" : "Generic metadata schema"
"id": "c5bed39a-4379-11ef-ba5a-ffbc783163b6",
"name" : "Generic metadata schema",
"instrument" : "",
"selector" : "filename:starts_with:/ess/data",
"variables" : {
Expand All @@ -11,8 +11,8 @@
},
"proposal_id": {
"source": "NXS",
"path": ""/entry/experiment_identifier",
"value_type": "string",
"path": "/entry/experiment_identifier",
"value_type": "string"
},
"pi_firstname": {
"source": "SC",
Expand All @@ -33,24 +33,24 @@
"value_type": "string"
},
"dataset_name": {
"source": "NXS"
"path": ""/entry/title",
"source": "NXS",
"path": "/entry/title",
"value_type": "string"
},
"instrument_name": {
"source": "NXS",
"path": ""/entry/instrument/name",
"value_type": "string",
"path": "/entry/instrument/name",
"value_type": "string"
},
"instrument_id": {
"source": "SC",
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D"
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D",
"field": "id",
"value_type": "string"
},
"start_time": {
"source": "NXS",
"path": ""/entry/start_time",
"path": "/entry/start_time",
"value_type": "date"
},
"end_time": {
Expand All @@ -60,17 +60,17 @@
},
"run_number": {
"source": "NXS",
"path": ""/entry/entry_identifier",
"path": "/entry/entry_identifier",
"value_type": "integer"
},
"acquisition_team_members_list": {
"source": "NXS",
"path" : "/entry/user_*/name",
"value_type": "string[]"
}
},
"acquisition_team_members": {
"source": "VALUE",
"operator" : "join_with_space"
"operator" : "join_with_space",
"value" : "<acquisition_team_members>",
"value_type": "string"
},
Expand Down Expand Up @@ -102,7 +102,7 @@
"field_type": "high_level",
"machine_name": "proposalId",
"value": "proposal_id",
"type": "string",
"type": "string"
},
"dataset_name": {
"field_type": "high_level",
Expand Down Expand Up @@ -178,7 +178,7 @@
"field_type": "scientific_metadata",
"machine_name": "acquisition_team_members",
"human_name": "Acquisition Team Members",
"values": "<acquisition_team_members>",
"value": "<acquisition_team_members>",
"type": "string"
},
"owner_group": {
Expand Down
30 changes: 15 additions & 15 deletions resources/coda.imsc.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id" : "715ce7ba-3f91-11ef-932f-37a5c6fd60b1"
"name" : "Coda Metadata Schema"
"id" : "715ce7ba-3f91-11ef-932f-37a5c6fd60b1",
"name" : "Coda Metadata Schema",
"instrument": "coda",
"selector": "filename:starts_with:/ess/data/coda",
"variables" : {
Expand All @@ -11,8 +11,8 @@
},
"proposal_id": {
"source": "NXS",
"path": ""/entry/experiment_identifier",
"value_type": "string",
"path": "/entry/experiment_identifier",
"value_type": "string"
},
"pi_firstname": {
"source": "SC",
Expand All @@ -33,24 +33,24 @@
"value_type": "string"
},
"dataset_name": {
"source": "NXS"
"path": ""/entry/title",
"source": "NXS",
"path": "/entry/title",
"value_type": "string"
},
"instrument_name": {
"source": "NXS",
"path": ""/entry/instrument/name",
"value_type": "string",
"path": "/entry/instrument/name",
"value_type": "string"
},
"instrument_id": {
"source": "SC",
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D"
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D",
"field": "id",
"value_type": "string"
},
"start_time": {
"source": "NXS",
"path": ""/entry/start_time",
"path": "/entry/start_time",
"value_type": "date"
},
"end_time": {
Expand All @@ -60,17 +60,17 @@
},
"run_number": {
"source": "NXS",
"path": ""/entry/entry_identifier",
"path": "/entry/entry_identifier",
"value_type": "integer"
},
"acquisition_team_members_list": {
"source": "NXS",
"path" : "/entry/user_*/name",
"value_type": "string[]"
}
},
"acquisition_team_members": {
"source": "VALUE",
"operator" : "join_with_space"
"operator" : "join_with_space",
"value" : "<acquisition_team_members>",
"value_type": "string"
},
Expand Down Expand Up @@ -102,7 +102,7 @@
"field_type": "high_level",
"machine_name": "proposalId",
"value": "<proposal_id>",
"type": "string",
"type": "string"
},
"dataset_name": {
"field_type": "high_level",
Expand Down Expand Up @@ -178,7 +178,7 @@
"field_type": "scientific_metadata",
"machine_name": "acquisition_team_members",
"human_name": "Acquisition Team Members",
"values": "<acquisition_team_members>",
"value": "<acquisition_team_members>",
"type": "string"
},
"owner_group": {
Expand Down
30 changes: 15 additions & 15 deletions resources/dream.imsc.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id" : "72a991ee-437a-11ef-8fd2-1f95660accb7"
"name" : "dream Metadata Schema"
"id" : "72a991ee-437a-11ef-8fd2-1f95660accb7",
"name" : "dream Metadata Schema",
"instrument": "dream",
"selector": "filename:starts_with:/ess/data/dream",
"variables" : {
Expand All @@ -11,8 +11,8 @@
},
"proposal_id": {
"source": "NXS",
"path": ""/entry/experiment_identifier",
"value_type": "string",
"path": "/entry/experiment_identifier",
"value_type": "string"
},
"pi_firstname": {
"source": "SC",
Expand All @@ -33,24 +33,24 @@
"value_type": "string"
},
"dataset_name": {
"source": "NXS"
"path": ""/entry/title",
"source": "NXS",
"path": "/entry/title",
"value_type": "string"
},
"instrument_name": {
"source": "NXS",
"path": ""/entry/instrument/name",
"value_type": "string",
"path": "/entry/instrument/name",
"value_type": "string"
},
"instrument_id": {
"source": "SC",
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22<instrument_name>%22%20%7D%20%7D"
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22<instrument_name>%22%20%7D%20%7D",
"field": "id",
"value_type": "string"
},
"start_time": {
"source": "NXS",
"path": ""/entry/start_time",
"path": "/entry/start_time",
"value_type": "date"
},
"end_time": {
Expand All @@ -60,17 +60,17 @@
},
"run_number": {
"source": "NXS",
"path": ""/entry/entry_identifier",
"path": "/entry/entry_identifier",
"value_type": "integer"
},
"acquisition_team_members_list": {
"source": "NXS",
"path" : "/entry/user_*/name",
"value_type": "string[]"
}
},
"acquisition_team_members": {
"source": "VALUE",
"operator" : "join_with_space"
"operator" : "join_with_space",
"value" : "<acquisition_team_members>",
"value_type": "string"
},
Expand Down Expand Up @@ -102,7 +102,7 @@
"field_type": "high_level",
"machine_name": "proposalId",
"value": "proposal_id",
"type": "string",
"type": "string"
},
"dataset_name": {
"field_type": "high_level",
Expand Down Expand Up @@ -178,7 +178,7 @@
"field_type": "scientific_metadata",
"machine_name": "acquisition_team_members",
"human_name": "Acquisition Team Members",
"values": "<acquisition_team_members>",
"value": "<acquisition_team_members>",
"type": "string"
},
"owner_group": {
Expand Down
30 changes: 15 additions & 15 deletions resources/loki.imsc.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id" : "891322f6-437a-11ef-980a-7bdc756bd0b3"
"name" : "Loki Metadata Schema"
"id" : "891322f6-437a-11ef-980a-7bdc756bd0b3",
"name" : "Loki Metadata Schema",
"instrument": "loki",
"selector": "filename:starts_with:/ess/data/dream",
"variables" : {
Expand All @@ -11,8 +11,8 @@
},
"proposal_id": {
"source": "NXS",
"path": ""/entry/experiment_identifier",
"value_type": "string",
"path": "/entry/experiment_identifier",
"value_type": "string"
},
"pi_firstname": {
"source": "SC",
Expand All @@ -33,24 +33,24 @@
"value_type": "string"
},
"dataset_name": {
"source": "NXS"
"path": ""/entry/title",
"source": "NXS",
"path": "/entry/title",
"value_type": "string"
},
"instrument_name": {
"source": "NXS",
"path": ""/entry/instrument/name",
"value_type": "string",
"path": "/entry/instrument/name",
"value_type": "string"
},
"instrument_id": {
"source": "SC",
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22<instrument_name>%22%20%7D%20%7D"
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22<instrument_name>%22%20%7D%20%7D",
"field": "id",
"value_type": "string"
},
"start_time": {
"source": "NXS",
"path": ""/entry/start_time",
"path": "/entry/start_time",
"value_type": "date"
},
"end_time": {
Expand All @@ -60,17 +60,17 @@
},
"run_number": {
"source": "NXS",
"path": ""/entry/entry_identifier",
"path": "/entry/entry_identifier",
"value_type": "integer"
},
"acquisition_team_members_list": {
"source": "NXS",
"path" : "/entry/user_*/name",
"value_type": "string[]"
}
},
"acquisition_team_members": {
"source": "VALUE",
"operator" : "join_with_space"
"operator" : "join_with_space",
"value" : "<acquisition_team_members>",
"value_type": "string"
},
Expand Down Expand Up @@ -102,7 +102,7 @@
"field_type": "high_level",
"machine_name": "proposalId",
"value": "proposal_id",
"type": "string",
"type": "string"
},
"dataset_name": {
"field_type": "high_level",
Expand Down Expand Up @@ -178,7 +178,7 @@
"field_type": "scientific_metadata",
"machine_name": "acquisition_team_members",
"human_name": "Acquisition Team Members",
"values": "<acquisition_team_members>",
"value": "<acquisition_team_members>",
"type": "string"
},
"owner_group": {
Expand Down
Loading

0 comments on commit 84ea462

Please sign in to comment.