Code Monkey home page Code Monkey logo

cliche's People

Contributors

bambalaam avatar kianmeng avatar kootenpv avatar whinee 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

cliche's Issues

Grouping

  1. auto class-based groups (only if more than 1 fn in a class)
  2. auto module-based groups (only if more than 1 fn in a module)
  3. based on decorator (let user decide), e.g. @cli(group="mygroup")

I really don't like 3 because I prefer the decorator to have no options (if I'd ever add options, it would mostly likely be at the install stage). With 3 there is also no chance to speed up load times.

I really think 1 and 2 should be implemented.

Pandas 1.4.2 throws a FutureWarning which is triggered by cliche

Original error:

/usr/local/Caskroom/mambaforge/base/envs/mgnr/lib/python3.10/site-packages/cliche/__init__.py:169: FutureWarning: pandas.UInt64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
  fn.lookup[(x, y)] = getattr(sub_module, y)

fixed it with:

 # Ignore the warning from pandas
 # FutureWarning: pandas.UInt64Index is deprecated and will be removed from pandas in a future version.
 # Use pandas.Index with the appropriate dtype instead.
 import warnings
 warnings.simplefilter(action='ignore', category=FutureWarning)
`

Ensure lists of items work

Determine the right format, probably space separated instead of comma separated though:

--some-list 1,2,3,4

Py 3.10 compatibility

From 3.10 Changelogs:

argparse
Misleading phrase “optional arguments” was replaced with “options” in argparse help. Some tests might require adaptation if they rely on exact output match. (Contributed by Raymond Hettinger in bpo-9694.)

Enum argument option in alphabetical order

Would it be possible / make sense to show enum argument options in alphabetical order?

When there's many options, I end up spending a few seconds to find what I'm looking for

image

we could keep the default the same (ordered by enum value), but add an argument to the decorator for this proposed option

Compare with clize

Hi,

Thanks for cliché. The name and the design are great. Also, the comparison section is insightful.

Would you mind to compare with clize ? And add it to the comparison list ?

Regards,

Readme claiming deprecated/non-existent functionality in CLI tool

Readme file has a section showing that Cliche's CLI tool is able to run scripts that contain cliche.cli decorator usage, without running cliche install beforehand.

However, if one creates calculator.py and tries to run it as the screenshot does, then error message will appear instead of running the built CLI:

Usage: cliche [-h] [--cli] [--pdb] [--timing] {install,uninstall} ...

COMMANDS:
    install            Create CLI from current folder
    uninstall          Delete CLI

OPTIONS::
  -h, --help            show this help message and exit
  --cli                Outputs CLI and Python version info and exits.
  --pdb                Drop into pdb on error
  --timing             Add timings of cliche and function call
Argument command: invalid choice: 'calculator.py' (choose from 'install', 'uninstall')

From CLI's help document it seems that usage like cliche [script_file] [args] is not supported at this moment.

Compare with typer and docopt

Hi,

Thanks for cliché. The name and the design are great. Also, the comparison section is insightful.

Would you mind to compare with typer ? And add it to the comparison list ? and even docopt

Regards,

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.