Skip to content

Request org details to fill in more template fields#4146

Draft
muffato wants to merge 22 commits intodevfrom
org_details
Draft

Request org details to fill in more template fields#4146
muffato wants to merge 22 commits intodevfrom
org_details

Conversation

@muffato
Copy link
Copy Markdown
Member

@muffato muffato commented Mar 29, 2026

My motivation is to make the RO-Crates more accurate by using actual correct org details (URL and full name). RO-Crates are automatically updated by the nf-core tooling at every template update, version bump. Fixing them every time is quite time consuming.
I introduce two new template parameters:

  • org_name: full name of the organisation (as opposite to org which is the name on GitHub)
  • org_url: organisation website

While doing it I realised that several template fields could benefit from the extra information and avoid wrongly pointing at https://nf-co.re. Looking into it, I then realised that you had just added {% if is_nfcore -%} blocks as a workaround for those wrong links :) so here I undo some of these thanks to the new org URL field.

Not all https://nf-co.re/ ocurrences need to be tuned to the org. Not all org websites will have pages like you have on https://nf-co.re/ . But all repos created by the tooling have doc/usage.md and docs/output.md, which can be accessed from the git web UI.
So here I take the approach of:

  1. Using https://github.com/$org as the default URL
  2. Changing all https://nf-co.re/{{ short_name }}/usage occurrences with the GitHub equivalent (+ support for other common forges), or else assuming the org URL supports { short_name }}/usage path (which we do ;) )

I collect the org URL and name in the pipelines create TUI, but only for non-nf-core pipelines (no need to burden official nf-core pipelines with the extra box.

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 95.53571% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.25%. Comparing base (3858865) to head (05c9fa9).

Files with missing lines Patch % Lines
nf_core/pipelines/rocrate.py 93.75% 3 Missing ⚠️
nf_core/pipelines/create/basicdetails.py 98.03% 1 Missing ⚠️
nf_core/pipelines/create/utils.py 88.88% 1 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 org_details branch 5 times, most recently from 0b9cffe to 88d714f Compare March 31, 2026 02:12
@muffato muffato marked this pull request as ready for review March 31, 2026 07:35
Copilot AI review requested due to automatic review settings March 31, 2026 07:35
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 adds organisation metadata (org_name, org_url) to the pipeline template config and uses it to generate more accurate RO-Crate publisher metadata and template documentation links (including forge-aware GitHub/GitLab/Bitbucket/Codeberg doc URLs).

Changes:

  • Add org_name / org_url fields, backfill logic for legacy .nf-core.yml, and helper utilities to compute org + docs URLs.
  • Update pipeline template files to use usage_url / output_url instead of hard-coded nf-co.re links in multiple places.
  • Extend and adjust test coverage for URL generation, RO-Crate metadata, template sync backfilling, and the create TUI behavior.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
nf_core/utils.py Adds org/docs URL helpers, new template config fields, and backfill for legacy configs.
nf_core/pipelines/create/utils.py Validates org_url and requires org metadata fields in create config inputs.
nf_core/pipelines/create/basicdetails.py Adds TUI inputs for org metadata and keeps them in sync with org until overridden.
nf_core/pipelines/create/create.py Populates derived org metadata and injects usage_url / output_url into Jinja params.
nf_core/pipelines/rocrate.py Uses template org metadata for RO-Crate publisher and attempts to source topics from org site.
nf_core/pipelines/lint/multiqc_config.py Uses org_url + forge-aware output docs URLs for expected MultiQC report comment.
nf_core/pipeline-template/README.md Switches usage/output links to usage_url / output_url variables.
nf_core/pipeline-template/nextflow_schema.json Updates help text to reference usage_url.
nf_core/pipeline-template/main.nf Prints website URL using org_url for all pipelines.
nf_core/pipeline-template/docs/usage.md Replaces nf-core-only warning with org-aware link to usage_url.
nf_core/pipeline-template/docs/README.md Replaces nf-core-conditional website text with org-aware org_url.
nf_core/pipeline-template/docs/CONTRIBUTING.md Updates help links to use usage_url with nf-core Slack info conditional.
nf_core/pipeline-template/assets/multiqc_config.yml Updates report comment to always link to output_url.
nf_core/pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml Uses usage_url for pipeline docs link (nf-core troubleshooting link stays conditional).
tests/test_utils.py Adds parametrized tests for forge-aware docs URL helpers.
tests/pipelines/test_sync.py Adds regression test ensuring legacy configs backfill org_url during template rebuild.
tests/pipelines/test_rocrate.py Stabilizes git author history + adds RO-Crate tests for org metadata usage (with request mocking).
tests/pipelines/test_create.py Extends create tests to assert org metadata defaults and propagated template links.
tests/pipelines/test_create_app.py Adds TUI test for org metadata auto-fill/restore behavior + button helper.
tests/pipelines/__snapshots__/test_create_app/test_customisation_help.svg Updates snapshot output after UI changes.
tests/pipelines/__snapshots__/test_create_app/test_basic_details_custom.svg Updates snapshot output after UI changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nf_core/pipelines/lint/multiqc_config.py Outdated
Comment thread nf_core/pipelines/rocrate.py Outdated
Comment thread nf_core/pipelines/rocrate.py Outdated
Comment thread nf_core/pipelines/rocrate.py Outdated
Comment thread nf_core/utils.py Outdated
Comment thread nf_core/utils.py
Copy link
Copy Markdown
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

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

We are in the middle of wrapping up a release and this feels like a bigger change to the template, so I will have a more thorough review after this release

@muffato
Copy link
Copy Markdown
Member Author

muffato commented Mar 31, 2026

No pb. I still need to go through the comments made by Copilot in this PR and the other one.

@mashehu mashehu added this to the 4.1.0 milestone Mar 31, 2026
@muffato muffato mentioned this pull request Mar 31, 2026
4 tasks
@muffato muffato deleted the branch dev April 3, 2026 01:10
@muffato muffato closed this Apr 3, 2026
@muffato muffato reopened this Apr 5, 2026
@muffato muffato changed the base branch from template to dev April 5, 2026 00:39
@muffato muffato force-pushed the org_details branch 2 times, most recently from 19cbd55 to ace83da Compare April 5, 2026 00:43
@muffato muffato marked this pull request as draft April 5, 2026 09:17
@muffato muffato force-pushed the org_details branch 5 times, most recently from b6eba81 to 6589cdd Compare April 7, 2026 02:02
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