+
Skip to content

Conversation

jpfeuffer
Copy link
Contributor

For repos that follow the nf-core template but need authentication.

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

@jpfeuffer jpfeuffer requested a review from fabianegli June 5, 2025 15:20

This comment was marked as outdated.

@jpfeuffer jpfeuffer changed the base branch from main to dev June 5, 2025 15:21
@jpfeuffer
Copy link
Contributor Author

Oops wrong base branch. Fixed.

@jpfeuffer
Copy link
Contributor Author

jpfeuffer commented Jun 6, 2025

Done. Test failures (most likely) unrelated or at least I have no idea what they mean.

@jpfeuffer jpfeuffer requested a review from mashehu June 6, 2025 09:29
@MatthiasZepper
Copy link
Member

Done. Test failures (most likely) unrelated or at least I have no idea what they mean.

There is a problem mapping your CLI arguments to the parameters of the DownloadWorkflow class init() function. It seems they are disordered, and therefore you get the TypeError("object of type 'bool' has no len()")

Apart from that, please mind that there is a major refactor of Downloads ongoing (#3634). Preferably, all new contributions would already be based on and point to this new structure.

@JulianFlesch
Copy link
Contributor

How does this fit with the pipeline downloads refactoring @MatthiasZepper @jpfeuffer?
Is this salvageable or maybe already covered by the PRs that were merged?

@jpfeuffer
Copy link
Contributor Author

jpfeuffer commented Aug 29, 2025

Good question. Who knows more about the refactor?
From what I gathered from @MatthiasZepper s comment this might not yet be covered.
This is mainly about the repo download, not the download of the individual containers etc.
(Which from what I could see was the main focus of the refactor but judging from its size probably not the only focus)

@jpfeuffer
Copy link
Contributor Author

Yes, I checked. And the mechanism for a download of the repo data/files is still the same.
The patch can be carried over as-is, just for the new folder structure.

@jpfeuffer
Copy link
Contributor Author

And well there needs to be a little fix for the CLI apparently. Note that I just added the CLI option because I still wanted to allow downloads from the Zip URLs because they will never be rate-limited. While non-authenticated downloads from the API can be.

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.30%. Comparing base (31b79df) to head (9b8d397).
⚠️ Report is 157 commits behind head on dev.

Files with missing lines Patch % Lines
nf_core/pipelines/download/download.py 57.14% 6 Missing ⚠️
nf_core/commands_pipelines.py 0.00% 3 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.

@jpfeuffer
Copy link
Contributor Author

jpfeuffer commented Sep 18, 2025

I quickly let copilot rebase the changes. (and fixed the cli bug)
If you want more code coverage you would need to think about a test case with a Git token. I am not familiar enough with your internal CI to suggest a way forward here.
@JulianFlesch

@jpfeuffer jpfeuffer requested review from JulianFlesch and MatthiasZepper and removed request for fabianegli and mashehu September 18, 2025 14:17
Copy link
Member

@MatthiasZepper MatthiasZepper left a comment

Choose a reason for hiding this comment

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

Julian has kindly taken over the maintainer role for Downloads, so I leave the ultimate decision to him, but I am leaning towards a few changes still.

default=4,
help="Number of allowed parallel tasks",
)
@click.option(
Copy link
Member

Choose a reason for hiding this comment

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

I have some reservations regarding the--api-downloadoption from a user experience perspective. The current solution exposes implementation details that users shouldn't need to think about. Instead, we could focus on what the user actually wants to achieve - authenticated vs. anonymous downloads.

Consider something like --authenticated and a help text like Enable authenticated download (with better rate limits, access to private repos, etc.) instead.

Potentially, even --auth-method <method> to future-proof it, if we want to support multiple authentication methods in the future. For example, the option to download pipelines not hosted on GitHub has also been a long-standing request and similar features could then be successively added without renaming / replacing too many CLI arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MatthiasZepper while I agree with the switch to authenticated, I am not sure if auth_method is helpful here, even in the future.
I think there is usually only one method for each SCM/git provider and even if there are more, you would require extensive logic to make sure that people do not use "github authentication" when actually wanting to download from gitlab.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in nf-core infrastructure projects Sep 23, 2025
@JulianFlesch JulianFlesch modified the milestones: 3.4.0, 3.5.0 Oct 7, 2025
- Rename --api-download to --authenticated for better UX
- Replace os.rename with Pathlib operations
- Refactor download_wf_files method to reduce code duplication
- Rename compress to compress_type consistently across codebase
- Update all references and tests accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants

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