fmoo/sparts — pull request #55 by joeldodge79 (2014-04-04 23:28:03+00:00)
Title: argparse option changes

- allow a service to do custom ArgumentParser instantiation:
-- e.g. to use fromfile_prefix_chars or any other __init__ arg
- be consistent in VService as in VTask
- allow multiple cli names/aliases (to support legacy --tasks)
- expose method to get pre-parse_args arguments from VService or VTask
-- this can be used to add a service's cli args to pytest's
request.config object using the pytest_addoption plugin:

conftest.py:
```
import sparts

def pytest_addoption(parser):
group = parser.getgroup('MY-SERVICE')
service_opts = sparts.get_options(service_service.MyService)
for sopt in service_opts:
group.addoption(*sopt.opt.opts, **sopt.opt.kwargs)
```

- tests for these changes you may ask? I don't have any yet. I didn't
see any test code for the sparts.py module. I just want you to take a
look at these changes to see if they'll be generally acceptable before
writing tests.