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

Extend list command by additional output formats #105

Merged
merged 4 commits into from
Aug 30, 2023
Merged

Conversation

lukfor
Copy link
Collaborator

@lukfor lukfor commented Aug 24, 2023

This PR extends the list command by:

  • --tags to get a list of all tags
  • --format json to get the output as json
  • --format raw to get tests without formatting
  • --silent to hide the program header

Open tasks:

  • Copy examples to docs and describe flags/options

Examples:

List of all testcases as json:

nf-test list --format json --silent
["/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@69b98c67","/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@fdb6c1cc","/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@d1c219eb","/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@3c54e3cb",...]

List of all testcases as unformatted ist:

nf-test list --format raw --silent
/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@69b98c67
/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@fdb6c1cc
/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@d1c219eb
/Users/lukfor/Development/git/nf-gwas/tests/main.nf.test@3c54e3cb
...

List of all tags as json:

nf-test list --tags --format json --silent
["fastqc","snakemake"]

List of all tags as unformatted list:

nf-test list --tags --format raw --silent
fastqc
snakemake

@edmundmiller
Copy link
Contributor

Is there a quick dev env I can hop into to test this or a script I can download?

The code looks good to me!

@lukfor lukfor merged commit 1f97f4c into main Aug 30, 2023
2 checks passed
@lukfor lukfor deleted the features/list-tags branch August 30, 2023 09:55
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.

2 participants