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

ideas for improving regular expression for determining parameter types #19

Open
bernt-matthias opened this issue Jul 22, 2020 · 2 comments

Comments

@bernt-matthias
Copy link
Contributor

Currently key words min|max indicate an integer parameter, but this could be a float as well.

So one should check if these keyword are followed by an integer/float value (the latter maybe also in scientific notation). Or simply check if there is a float or integer on the line at all.

Choices are often represented (e.g. in argparse) by {A,B,C}, I often see ranges represented by [min,max], (min,max), [min:max], (min:max), where min and max ar integers / floats.

@multimeric
Copy link
Collaborator

If you could find a concrete help example (preferably something on bioconda), this could be added to the parser.

@multimeric
Copy link
Collaborator

multimeric commented Jul 22, 2020

Notably, this should be a new field on the CliInteger:

class CliInteger(CliType):
"""
Takes an integer value
"""
_representable = {CliFloat}

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