Request org details to fill in more template fields#4146
Request org details to fill in more template fields#4146
Conversation
Codecov Report❌ Patch coverage is
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0b9cffe to
88d714f
Compare
There was a problem hiding this comment.
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_urlfields, backfill logic for legacy.nf-core.yml, and helper utilities to compute org + docs URLs. - Update pipeline template files to use
usage_url/output_urlinstead of hard-codednf-co.relinks 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.
mashehu
left a comment
There was a problem hiding this comment.
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
|
No pb. I still need to go through the comments made by Copilot in this PR and the other one. |
19cbd55 to
ace83da
Compare
b6eba81 to
6589cdd
Compare
This allows testing the creator entity
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 toorgwhich is the name on GitHub)org_url: organisation websiteWhile 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.mdanddocs/output.md, which can be accessed from the git web UI.So here I take the approach of:
https://nf-co.re/{{ short_name }}/usageoccurrences with the GitHub equivalent (+ support for other common forges), or else assuming the org URL supports{ short_name }}/usagepath (which we do ;) )I collect the org URL and name in the
pipelines createTUI, but only for non-nf-core pipelines (no need to burden official nf-core pipelines with the extra box.PR checklist
CHANGELOG.mdis updateddocsis updated