Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move WorkflowRepo class into seperate file, since it will be shared b… #3506

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

MatthiasZepper
Copy link
Member

Move WorkflowRepo class into separate file, since it will be shared with container handlers as well.

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

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

Attention: Patch coverage is 68.62745% with 48 lines in your changes missing coverage. Please review.

Project coverage is 77.02%. Comparing base (33830f9) to head (adc9129).
Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
nf_core/pipelines/downloads/workflow_repo.py 68.66% 47 Missing ⚠️
nf_core/__main__.py 50.00% 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.

Copy link
Member

Choose a reason for hiding this comment

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

The name of the directory should be in singular as we do with the other commands nf_core/pipelines/download
And since we are creating this new folder, the script nf_core/pipelines/download.py should also be moved here

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason for it to be plural was that the main file is called download.py. This ambiguity resulted in errors like

ModuleNotFoundError: No module named 'nf_core.pipelines.download.singularity'; 'nf_core.pipelines.download' is not a package
ImportError: cannot import name 'DownloadWorkflow' from 'nf_core.pipelines.download'

Calling the directory downloads therefore was a straightforward way to avoid ambiguity and avoid name collisions. By moving the main file inside the directory, of course, it would be possible to resolve that as well.

Regarding the plural, I rather think we should reconsider moving it under pipelines in the first place. After all, we will eventually have separate commands for nf-core download(s) container (#2408) and nf-core download(s) pipelines and nf-core download(s) plugins (#3344) commands.

The name for tools 2.x was obviously nf-core download, but if you prefer to have it consistent with modules, subworkflows or pipelines turning it into the downloads plural would work as well, I guess.

Comment on lines +25 to +30
stderr = rich.console.Console(
stderr=True,
style="dim",
highlight=False,
force_terminal=nf_core.utils.rich_force_colors(),
)
Copy link
Member

Choose a reason for hiding this comment

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

This is not used here

Suggested change
stderr = rich.console.Console(
stderr=True,
style="dim",
highlight=False,
force_terminal=nf_core.utils.rich_force_colors(),
)

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.

4 participants