Skip to content

Commit 54f0faf

Browse files
committed
Added correct recipe to translate BenchmarkingEvents
1 parent 594b6cb commit 54f0faf

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

json-schemas/from_1.0.x_to_2.0.x.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 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
2-
# 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
2+
# 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/
33
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/BenchmarkingEvent
44
side_objects_paths:
55
contacts: MIG-1.0/Contact
@@ -8,10 +8,35 @@
88
"_id": $id
99
}
1010
|
11+
(
12+
.bench_contact_ids | map(
13+
$contacts[.].links[] | select(.label == "ORCID")
14+
|
15+
.uri
16+
| ltrimstr("orcid:")
17+
| ltrimstr("https://orcid.org/")
18+
| "orcid:" + .
19+
)
20+
) as $bench_contact_ids
21+
|
1122
. * {
1223
"_id": $id,
13-
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/BenchmarkingEvent"
24+
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/BenchmarkingEvent",
25+
"bench_contact_ids": $bench_contact_ids
1426
}
27+
|
28+
if .url then
29+
. * {
30+
"links": [
31+
{
32+
"uri": .url,
33+
"label": "MainSite"
34+
}
35+
]
36+
}
37+
|
38+
del(.url)
39+
end
1540
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/Challenge
1641
side_objects_paths:
1742
contacts: MIG-1.0/Contact

0 commit comments

Comments
 (0)