Parse manifest.contributors to fill in the RO-Crate#4147
Conversation
Codecov Report❌ Patch coverage is
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b5c5d6c to
d869153
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the RO-Crate generation logic to populate the crate contributor/person entities using the full manifest.contributors structure (name, affiliation, ORCID, GitHub, role), while keeping manifest.author parsing for backwards compatibility.
Changes:
- Prefer
manifest.contributorsovermanifest.authorwhen adding people/roles to the RO-Crate workflow entity. - Add parsing + normalization for
manifest.contributors(field trimming, URL normalization, email backfilling from git). - Expand RO-Crate tests to cover contributor parsing, role mapping, and fallback behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
nf_core/pipelines/rocrate.py |
Adds contributor parsing/normalization and uses contribution roles to populate RO-Crate person entities and workflow properties. |
tests/pipelines/test_rocrate.py |
Adds helper utilities + new tests for contributor parsing, normalization, and role/identifier mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
36e1a3d to
57d4106
Compare
Co-authored-by: Copilot <[email protected]>
…an exception Co-authored-by: Copilot <[email protected]>
4116541 to
73c10d4
Compare
73c10d4 to
4903ebb
Compare
4bdc0fc to
d4c996f
Compare
mashehu
left a comment
There was a problem hiding this comment.
Thanks, this was for a long time on my to-do list. 🤩
Co-authored-by: Matthias Hörtenhuber <[email protected]>
Co-authored-by: Matthias Hörtenhuber <[email protected]>
Co-authored-by: Matthias Hörtenhuber <[email protected]>
Co-authored-by: Matthias Hörtenhuber <[email protected]>
8e47f3a to
4a0c8e4
Compare
|
I've applied all the changes. Thanks for the review ! |
Here I want to include all information from the
manifest.contributorsfield into the RO-Crate contributor list:That's a new function named
parse_manifest_contributors. I've kept the updated original code that parsesmanifest.authorfor backwards compatibility inparse_manifest_authorsas it also serves as a fallback.add_main_authorsis now first a dispatcher method for the two aforementioned methods, before adding the returned contributors to the RO-Crate.Factored out and fleshed out
_get_git_email_for_nameto search an email in the git historyPR checklist
CHANGELOG.mdis updateddocsis updated