Skip to content

Commit

Permalink
Almost finished recipe for challenges
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfernandez committed Nov 21, 2024
1 parent 54f0faf commit 242ab39
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions json-schemas/from_1.0.x_to_2.0.x.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# python oeb-migrator.py --base_url https://openebench.bsc.es/api/scientific/ -cr oeb_api_auth_new.json --bdm-dir w3id-oeb-schemas --bdm-tag 2.0 --fetched-concept-dir MIG-1.0 --recipes ../benchmarking-data-model_2.0.x/json-schemas/from_1.0.x_to_2.0.x.yaml --output-dir MIG-2.0 --validate --concepts BenchmarkingEvent Challenge Community Contact Dataset Metrics Reference TestAction Tool
# python oeb-migrator.py --base_url https://openebench.bsc.es/api/scientific/ -cr oeb_api_auth_new.json --bdm-dir w3id-oeb-schemas --bdm-tag 2.0 --recipes ../benchmarking-data-model_2.0.x/json-schemas/from_1.0.x_to_2.0.x.yaml --output-dir MIG-2.0 --validate --input MIG-1.0/Contact --input MIG-1.0/Community/ --input MIG-1.0/Tool/ --input MIG-1.0/Metrics/ --input MIG-1.0/BenchmarkingEvent/
# python oeb-migrator.py --base_url https://openebench.bsc.es/api/scientific/ -cr oeb_api_auth_new.json --bdm-dir w3id-oeb-schemas --bdm-tag 2.0 --recipes ../benchmarking-data-model_2.0.x/json-schemas/from_1.0.x_to_2.0.x.yaml --output-dir MIG-2.0 --validate --input MIG-1.0/Contact --input MIG-1.0/Community/ --input MIG-1.0/Tool/ --input MIG-1.0/Metrics/ --input MIG-1.0/BenchmarkingEvent/ --input MIG-1.0/Reference --input MIG-1.0/Challenge/
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/BenchmarkingEvent
side_objects_paths:
contacts: MIG-1.0/Contact
Expand Down Expand Up @@ -45,10 +45,36 @@
"_id": $id
}
|
(
.challenge_contact_ids | map(
$contacts[.].links[] | select(.label == "ORCID")
|
.uri
| ltrimstr("orcid:")
| ltrimstr("https://orcid.org/")
| "orcid:" + .
)
) as $challenge_contact_ids
|
. * {
"_id": $id,
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/Challenge"
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/Challenge",
"challenge_contact_ids": $challenge_contact_ids,
"participation_model": "anonymous"
}
|
if .url then
. * {
"links": [
{
"uri": .url,
"label": "MainSite"
}
]
}
|
del(.url)
end
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/Community
side_objects_paths:
contacts: MIG-1.0/Contact
Expand Down

0 comments on commit 242ab39

Please sign in to comment.