kootenpv / cliche Goto Github PK
View Code? Open in Web Editor NEWBuild a simple command-line interface from your functions :computer:
License: MIT License
Build a simple command-line interface from your functions :computer:
License: MIT License
@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.
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)
`
Determine the right format, probably space separated instead of comma separated though:
--some-list 1,2,3,4
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.)
I think we should add a flexible path flag for different purposes.
Example:
cliche install --dir <path> <CommandName>
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 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.