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

Feature/test datasets #3494

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

Conversation

JulianFlesch
Copy link

@JulianFlesch JulianFlesch commented Mar 18, 2025

This is a DRAFT.

This PR adds functionality to list and search the nf-core/test-datasets github repository via a new subcommand test-datasets. Closes #3487 where this feature was requested.

Changes:

  • Adds new subcommands: test-datasets search, test-datasets list, test-datasets list-branches
  • Adds new test-datasets folder with command and utility functions

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

Julian Flesch added 29 commits March 13, 2025 14:20
@JulianFlesch JulianFlesch marked this pull request as draft March 18, 2025 08:04
Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

I made some comments especially about the structure of the files, but it is looking good! 😄

Copy link
Member

Choose a reason for hiding this comment

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

To follow the same structure as in other commands, the main functions of each sub-command should be moved to its own script. utils should only contain the functions that are common to all these scripts.

Copy link
Author

Choose a reason for hiding this comment

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

I restructured all logic into search.py and list.py 👍 But I would suggest keeping all functions in utils.py in the same plce, as they are either exported by more than one other file, or depend on each other.

@mirpedrol
Copy link
Member

And one last comment. When we print the list of files or branches, we could use a rich table like we do here

@jfy133
Copy link
Member

jfy133 commented Mar 30, 2025

Noooo no rich stuff!!!!! Makes it much harder to copy and paste 😭🫠🫠😭🫠😭🫠😭

@JulianFlesch
Copy link
Author

I'm on the fence on this one. Usually I also prefer plain text output because it is just easier to pipe, but rich is used a lot in nf-core, right?
How about another flag -t, --plain-text to print plain text output instead of a rich table? Or we could always default to plain text, if -u or -g is given.

@jfy133
Copy link
Member

jfy133 commented Mar 31, 2025

I'm on the fence on this one. Usually I also prefer plain text output because it is just easier to pipe, but rich is used a lot in nf-core, right?
How about another flag -t, --plain-text to print plain text output instead of a rich table? Or we could always default to plain text, if -u or -g is given.

Latter is probably best I think, as makes me and you happy but default sticks with the typical nf-core convention

@JulianFlesch
Copy link
Author

Oh and one more general question: Whats our stance on type hints @mirpedrol ? Should I add them?
Their use across nf-core seemed a bit inconsistent to me, at first. But now I see them more and more :D

@mirpedrol
Copy link
Member

We are slowly adopting them when we add new code or modify old code, so yes, you should add them 😄

@JulianFlesch JulianFlesch changed the title [Draft] Feature/test datasets Feature/test datasets Apr 2, 2025
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