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.7.tar.gz (16.2 kB view details)

Uploaded Source

Built Distributions

galaxygetopt-0.9.7.linux-x86_64.tar.gz (38.0 kB view details)

Uploaded Source

galaxygetopt-0.9.7-py2.7.egg (61.2 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for galaxygetopt-0.9.7.tar.gz
Algorithm Hash digest
SHA256 0fb58b6ceca422ccfc0227ea935227ba758a08d7cd0913c2cd82722912a0ccd3
MD5 5af44fd19a123bf950fd1d6142a02ef9
BLAKE2b-256 cc8bc51020a6a215feca113c4f2dde5eb3c7c221164521873c0afc027791b9ae

See more details on using hashes here.

File details

Details for the file galaxygetopt-0.9.7.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for galaxygetopt-0.9.7.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 89186550e67001f8d38fc7fa94ebcbb97afbf8a79056c44dcdc3a497e8c61522
MD5 1d79674229a9c0a0b1f55157ae2f9da7
BLAKE2b-256 770bc837f3de2c6e6015d89b5b93f1ea06b0ffab31b84fab9d1adb00c35159fe

See more details on using hashes here.

File details

Details for the file galaxygetopt-0.9.7-py2.7.egg.

File metadata

File hashes

Hashes for galaxygetopt-0.9.7-py2.7.egg
Algorithm Hash digest
SHA256 19d9462e91aa43754222248a0d4409a9fccdc6182fb757ad0297fd93421f0be1
MD5 3ccf2206cfe4ca87d59a5c583b5e8723
BLAKE2b-256 331eb2e31f67e8cd97ed4e25be49dcb53e92c4d126432e6e86a695fec816bf74

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