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

Add --target option to nf-test list #196

Closed
drpatelh opened this issue Feb 1, 2024 · 3 comments
Closed

Add --target option to nf-test list #196

drpatelh opened this issue Feb 1, 2024 · 3 comments

Comments

@drpatelh
Copy link

drpatelh commented Feb 1, 2024

Hi @lukfor ! Thank you very much for getting the recent release out so quickly 🙏🏽 ! We have managed to simplify a lot of the nf-test code by implementing the functionality provided in #184

We are now finishing up with the CI and realised that we need 1 (famous last words!) more feature to help us run targeted tests in our CI/CD.

Following on from #187 would it be possible to have another option in nf-test list that returns the name of the --target component that is being tested, please?

For example, this would return:

  1. SRATOOLS_FASTERQDUMP for this process test
  2. FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS for this workflow test
  3. isSraId for this function test

Ideally, we would also have the ability to select which component this returns. For example:

nf-test list --silent --format csv --target process <TEST_PATH>
nf-test list --silent --format csv --target workflow <TEST_PATH>
nf-test list --silent --format csv --target function EST_PATH>

The --target option could also be decoupled from the type of component being returned if that makes more sense on the implementation side.

At the moment, we are trying to use hacky bash to restrict the tags for testing but that's not a flexible solution....

Let us know what you think!!! This is literally the last thing (famous last words!!) we need for our standardised V2 nf-test release of nf-core/fetchngs

@adamrtalbot
Copy link

For what it's worth, I think we should have two args for nf-test list here:

--target
Returns the function/process/workflow name

This one could replace --tags as a new arg --output names/targets/tags to make it more generic.

--filter
Return only results relating to a function/process/workflow/pipeline

The second one could be used with nf-test test for some additional filtering. e.g. nf-test test --filter workflows will only test workflow level tests.

@lukfor
Copy link
Collaborator

lukfor commented Feb 1, 2024

Thanks, sounds good! I will try to find some time next week.

@kenibrewer
Copy link
Contributor

This issue is covered by the --filter option (See https://www.nf-test.com/docs/cli/test/#-filter-types). Thanks again @lukfor !

@lukfor lukfor closed this as completed Oct 14, 2024
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

No branches or pull requests

4 participants