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 version option for bioconda-utils cli command #1005

Open
corneliusroemer opened this issue Jul 11, 2024 · 2 comments
Open

Add version option for bioconda-utils cli command #1005

corneliusroemer opened this issue Jul 11, 2024 · 2 comments

Comments

@corneliusroemer
Copy link
Member

I was surprised to find that there seems to be no -v/--version/version argument for bioconda-utils. I would like to know which version I've got installed, but can't figure out a way to do so:

❯ bioconda-utils -V                                                              
usage: bioconda-utils [-h]
                      {build,dag,dependent,lint,duplicates,update-pinning,bioconductor-skeleton,clean-cran-skeleton,autobump,handle-merged-pr,annotate-build-failures,list-build-failures,bulk-trigger-ci}
                      ...
bioconda-utils: error: unrecognized arguments: -V

❌127 ❯ bioconda-utils version
usage: bioconda-utils [-h]
                      {build,dag,dependent,lint,duplicates,update-pinning,bioconductor-skeleton,clean-cran-skeleton,autobump,handle-merged-pr,annotate-build-failures,list-build-failures,bulk-trigger-ci}
                      ...
bioconda-utils: error: argument {build,dag,dependent,lint,duplicates,update-pinning,bioconductor-skeleton,clean-cran-skeleton,autobump,handle-merged-pr,annotate-build-failures,list-build-failures,bulk-trigger-ci}: invalid choice: 'version' (choose from 'build', 'dag', 'dependent', 'lint', 'duplicates', 'update-pinning', 'bioconductor-skeleton', 'clean-cran-skeleton', 'autobump', 'handle-merged-pr', 'annotate-build-failures', 'list-build-failures', 'bulk-trigger-ci')

❌2 ❯ bioconda-utils -v     
usage: bioconda-utils [-h]
                      {build,dag,dependent,lint,duplicates,update-pinning,bioconductor-skeleton,clean-cran-skeleton,autobump,handle-merged-pr,annotate-build-failures,list-build-failures,bulk-trigger-ci}
                      ...
bioconda-utils: error: unrecognized arguments: -v
@martin-g
Copy link
Contributor

if '--version' in sys.argv:
print("This is bioconda-utils version", VERSION)
sys.exit(0)

@corneliusroemer
Copy link
Member Author

Thanks @martin-g - so there's is a version command it just isn't surfaced in help -h output 😀

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

2 participants