Skip to content

Commit

Permalink
Added correct recipe to translate BenchmarkingEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfernandez committed Nov 21, 2024
1 parent 594b6cb commit 54f0faf
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 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
# 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/
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/BenchmarkingEvent
side_objects_paths:
contacts: MIG-1.0/Contact
Expand All @@ -8,10 +8,35 @@
"_id": $id
}
|
(
.bench_contact_ids | map(
$contacts[.].links[] | select(.label == "ORCID")
|
.uri
| ltrimstr("orcid:")
| ltrimstr("https://orcid.org/")
| "orcid:" + .
)
) as $bench_contact_ids
|
. * {
"_id": $id,
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/BenchmarkingEvent"
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/BenchmarkingEvent",
"bench_contact_ids": $bench_contact_ids
}
|
if .url then
. * {
"links": [
{
"uri": .url,
"label": "MainSite"
}
]
}
|
del(.url)
end
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/Challenge
side_objects_paths:
contacts: MIG-1.0/Contact
Expand Down

0 comments on commit 54f0faf

Please sign in to comment.