aCLImatise / CliHelpParser

Reads the output from CLI help commands, and generates machine readable schemas (CWL etc)
https://aclimatise.github.io/CliHelpParser/
GNU General Public License v3.0
14 stars 5 forks source link

bedtools misdetections #36

Closed bernt-matthias closed 4 years ago

bernt-matthias commented 4 years ago
Tool:    bedtools random (aka randomBed)
Version: v2.26.0
Summary: Generate random intervals among a genome.

Usage:   bedtools random [OPTIONS] -g <genome>

Options: 
    -l  The length of the intervals to generate.
        - Default = 100.
        - (INTEGER)

    -n  The number of intervals to generate.
        - Default = 1,000,000.
        - (INTEGER)

these two options are currently detected as CliBoolean Flag.

multimeric commented 4 years ago

Great, thanks! I'll update the parser to deal with this.

bernt-matthias commented 4 years ago

Also the -g flag is undetected... but I guess this is difficult and it might be better to file a complaint at the bedtools repo

multimeric commented 4 years ago

Hmm, no actually it should be detected. I have a usage parser as well as a flag parser. So it is a bug.

multimeric commented 4 years ago

Feel free to PR this as a new test case. For example: https://github.com/aCLImatise/CliHelpParser/blob/017bfe01dab6eb133deaf6f64060277233dfa200/test/util.py#L42-L49

bernt-matthias commented 4 years ago

Actually I was wrong that -g is undetected. Sorry. It is detected as text parameter which is probably the best the parser can achieve.

multimeric commented 4 years ago

Unfortunately yes.

multimeric commented 4 years ago

This is fixed in #52: https://github.com/aCLImatise/CliHelpParser/blob/8f7ea4099b304605817a8400411e53e367e2589c/test/util.py#L320-L329.