Skip to content

Parse manifest.contributors to fill in the RO-Crate#4147

Open
muffato wants to merge 10 commits intodevfrom
rocrate_manifest_contributors
Open

Parse manifest.contributors to fill in the RO-Crate#4147
muffato wants to merge 10 commits intodevfrom
rocrate_manifest_contributors

Conversation

@muffato
Copy link
Copy Markdown
Member

@muffato muffato commented Mar 29, 2026

Here I want to include all information from the manifest.contributors field into the RO-Crate contributor list:

  • name
  • affiliation
  • ORCID
  • GitHub handle
  • role

That's a new function named parse_manifest_contributors. I've kept the updated original code that parses manifest.author for backwards compatibility in parse_manifest_authors as it also serves as a fallback.
add_main_authors is now first a dispatcher method for the two aforementioned methods, before adding the returned contributors to the RO-Crate

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@muffato muffato self-assigned this Mar 29, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 90.07634% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.62%. Comparing base (4531c6b) to head (6d72e22).

Files with missing lines Patch % Lines
nf_core/pipelines/rocrate.py 90.07% 13 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muffato muffato force-pushed the rocrate_manifest_contributors branch 2 times, most recently from b5c5d6c to d869153 Compare March 29, 2026 23:56
@muffato muffato marked this pull request as ready for review March 31, 2026 07:36
Copilot AI review requested due to automatic review settings March 31, 2026 07:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.contributors over manifest.author when 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.

@mashehu mashehu added this to the 4.1.0 milestone Mar 31, 2026
@muffato muffato force-pushed the rocrate_manifest_contributors branch 2 times, most recently from 36e1a3d to 57d4106 Compare March 31, 2026 22:49
@muffato muffato force-pushed the rocrate_manifest_contributors branch 2 times, most recently from 4116541 to 73c10d4 Compare April 4, 2026 16:48
@muffato muffato force-pushed the rocrate_manifest_contributors branch from 73c10d4 to 4903ebb Compare April 4, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants