Skip to content

Commit

Permalink
Added correct recipe for Metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfernandez committed Nov 21, 2024
1 parent bd72bc1 commit 594b6cb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
fail_fast: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
# This one has been added to fail fast on syntax errors
# before running expensive pylint
- id: check-json
- id: check-yaml
types: [file]
files: \.(yaml|yml)$
- repo: https://github.com/inab/python-extended-json-schema-validator.git
rev: v0.15.1
hooks:
Expand Down
17 changes: 16 additions & 1 deletion json-schemas/from_1.0.x_to_2.0.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,25 @@
"_id": $id
}
|
(
.metrics_contact_ids | map(
$contacts[.].links[] | select(.label == "ORCID")
|
.uri
| ltrimstr("orcid:")
| ltrimstr("https://orcid.org/")
| "orcid:" + .
)
) as $metrics_contact_ids
|
. * {
"_id": $id,
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/Metrics"
"_schema": "https://w3id.org/openebench/scientific-schemas/2.0/Metrics",
"metrics_contact_ids": $metrics_contact_ids,
"name": .title
}
|
del(.title)
- schema: https://www.elixir-europe.org/excelerate/WP2/json-schemas/1.0/Reference
side_objects_paths:
contacts: MIG-1.0/Contact
Expand Down

0 comments on commit 594b6cb

Please sign in to comment.