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

Uploaded Source

Built Distributions

galaxygetopt-0.9.4.linux-x86_64.tar.gz (37.5 kB view details)

Uploaded Source

galaxygetopt-0.9.4-py2.7.egg (59.8 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for galaxygetopt-0.9.4.tar.gz
Algorithm Hash digest
SHA256 21e9c1b5f820ef7003733f6cd94cc1489ad7bb3154c40fa4c19f5a29f8a0a840
MD5 cd412e974a6d27fef0823dfda969511e
BLAKE2b-256 35077d9e67c71f5da39f4765ef1c6052ebb2f620dc6cf0a25ab201075ea189a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for galaxygetopt-0.9.4.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 84eb9f84351a5332d94b8581d4ec78af135722bd14cd24737ce640c0e74f5059
MD5 7d0c00635782288d52308c33a235db4a
BLAKE2b-256 5402d89a95b183b8b6f2f2a5a7714445a185aab6c5bdd9e06842fb38ef5bfdf1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for galaxygetopt-0.9.4-py2.7.egg
Algorithm Hash digest
SHA256 216b59f1ad267b07ef090e68dc2ccbef2b2a47a84e0bf54445652503553d4336
MD5 cf8ac14bd93869fb08eae3f28285b006
BLAKE2b-256 fb69a2978c28739888f3ee64d2d4b035b3755d13fd6935e0fed11a5c0522ac88

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