Coder Social home page Coder Social logo

commandr's People

Contributors

chuegle avatar ganjianwei avatar kevinballard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commandr's Issues

Converting options with underscore symbols to the hyphen/dash symbol

This is a feature request folks, for the very nice commander!

It would be great to have option names like 'test_option' parsed as '--test-option' instead of '--test_option'. The reason is, perhaps, that there's a long tradition of options being parsed that way.

Since you may want to keep backwards compatibility, perhaps accepting both would be great and maybe display the built-in command help with the more common hyphen symbol instead of the underscore.

That is:

@command('run')
def run(test_option = 'foo'):
    pass

Would accept both --test-option and --test_option but the built-in help for the command would display --test-option.

Thanks!

[feature request] allow some kind of type annotations besides relying on the default argument type

currently, marking a parameter as list requires adding a default list value for it - but this is problematic when the function is also used from regular code (the list may change over time).

additionally, sometimes it's desirable to set a type for a parameter, but keep it mandatory

having something like:

@command('function_name', types={'p1':list})
def function_name(p1,p2):
    pass

can solve this

No module named functools_util

I'm getting the following error when I try to use commandr:

ImportError: No module named functools_util

It would appear that functools_util.py isn't being packaged with the module. As a test, I simply pasted it into my site-packages/commandr directory and the error goes away.

I'm a bit of a python newb, but I assume that commandr/functools_util.py needs to be added to commandr/MANIFEST

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.