Skip to main content

Argparse Wrapper for Galaxy

Project description

You write stuff that looks like this, containing all of the information you would ever need about a tool; options, test cases, metadata

from galaxygetopt.ggo import GalaxyGetOpt as GGO
c = GGO(
    options=[
        ['int', 'An integer parameter', {'required': True, 'validate':
                                         'Int', 'default': 10}],
        ['float', 'A float', {'required': True, 'validate': 'Float',
                              'default': 1e-4}],
        ['string', 'A string value', {'required': True, 'multiple': True,
                                      'default': ['Hello', 'World'],
                                      'validate': 'String'}],

And you get data back in a nice dict

{'int': 40, 'float': '1e-4', 'string': ['Hello', 'World'] }

Known Bugs

Currently there is a known bug in the galaxy XML, under highly specific circumstances. If you define a parameter that is

  • required

  • hidden

  • validate String (probably not a hard req)

  • _galaxy_specific

and expect it to properly generate the value, it will not. See lines 206/207 of galaxygetopt/ggo.py for the current hack I use to get around this.

Other

This library features a number of subclasses of galaxygetopt.parameter.parameter, all of which have myriad numbers of options. In order to brutally test these, I have added a class galaxygetopt/tests/parameter_generator.py which can generate every single possible combination of functional calls, given rules you specify. You can then generate hundreds of objects with different sets of options, which you can filter a subset out and test at will. See that classes’s documentation for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaxygetopt-0.9.2.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file galaxygetopt-0.9.2.tar.gz.

File metadata

File hashes

Hashes for galaxygetopt-0.9.2.tar.gz
Algorithm Hash digest
SHA256 d474d4f91c2ea0734443585a4cb178280bb6824e9805dd89ba3fd21e29a74149
MD5 97a417fd720533bec91447c0a9877db8
BLAKE2b-256 107cd32854243f3a47540f429310bc6ab4d49457fe0661d6e435998c6a621ff9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page