+
Skip to content

Conversation

JulianFlesch
Copy link
Contributor

@JulianFlesch JulianFlesch commented May 13, 2025

Description

Changes the output table of the test-datasets search sub-command to wrap long one-word rows to essentially avoid ellipsis-cutting URLs.
This change was suggested in this website PR comment.
For copy-pasting urls the -u flag is still more suitable

Before Changes:

% nf-core test-datasets search -b mag minigut_reads
<nf-core logo cut out ...>
Searching files on branch:  mag
┌──────────────────┬────────────────────────────────────────┐
│ File Name:       │ test_data/minigut_reads.fastq.gz       │
│ Nextflow Import: │ params.pipelines_testdata_base_path +  │
│                  │ "test_data/minigut_reads.fastq.gz"     │
│ Download Link:   │ https://raw.githubusercontent.com/nf-… │
└──────────────────┴────────────────────────────────────────┘

After Changes:

 % nf-core test-datasets search -b mag minigut_reads
<nf-core logo cut out ...>
Searching files on branch:  mag
┌──────────────────┬────────────────────────────────────────┐
│ File Name:       │ test_data/minigut_reads.fastq.gz       │
│ Nextflow Import: │ params.pipelines_testdata_base_path +  │
│                  │ "test_data/minigut_reads.fastq.gz"     │
│ Download Link:   │ https://raw.githubusercontent.com/nf-c │
│                  │ ore/test-datasets/refs/heads/mag/test_ │
│                  │ data/minigut_reads.fastq.gz            │
└──────────────────┴────────────────────────────────────────┘

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

@JulianFlesch JulianFlesch requested a review from mashehu May 13, 2025 14:53
stdout.print(create_download_url(branch, selection))
else:
table = rich.table.Table(show_header=False)
table.add_column("")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe these also needs the wrapping for longer file names?

Copy link
Contributor Author

@JulianFlesch JulianFlesch May 13, 2025

Choose a reason for hiding this comment

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

No, this line describes the first COLUMN (containing "File:", "Nextflow Import:", "Download Link").
All rows in the second column will now be wrapped ;)

The table will always wrap text when it contains multiple words, but it doesn't know how to wrap the url, so the default behavior is to "ellipsis" it.
In essence, if the table gets too small it will do something like:

File
---------
Nextflow
Import
---------
Download
Link

Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.46%. Comparing base (d8bfccb) to head (798b248).
Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
nf_core/test_datasets/search.py 0.00% 2 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.

@JulianFlesch JulianFlesch merged commit 6748478 into nf-core:dev May 13, 2025
97 checks passed
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载