Using Cleo instead of Argparse
See original GitHub issueCurrently, Manim uses Argparse for handling CLI arguments. It has been good but hard to maintain it, the currently introduced subcommands make it worse. Using something which was built for CLI management would help a lot of something like Cleo.
Cleo allows us to create beautiful and testable command-line commands. (Picked from docs) Where it uses docstrings
to generate a command argument. (Bonus it allow autocompletion https://cleo.readthedocs.io/en/latest/introduction.html#autocompletion).
Many projects use this for CLI for example poetry.
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (21 by maintainers)
Top Results From Across the Web
Cleo: create beautiful and testable command-line interfaces
Instead of parsing the whole thing at once (as argparse does), it parses only the relevant part for the current context which makes...
Read more >Comparing Python Command-Line Parsing Libraries
Here we'll compare three command-line parsing libraries - argparse, docopt, and click.
Read more >Accept unknown options (for poetry plugin) · Issue #126 - GitHub
I require a way to make a cleo Command accept unknown options and arguments, and not inherit the application options. The equivalent in...
Read more >Python CLI libraries analysis - The CZ.NIC Staff Blog
We want to design a command with following usage based on ... argparse is part of standard library, so no external dependecies are...
Read more >Please don't use Click - Karol Kuczmarski
If you care about your command line interface, consider just using the argparse module. Yes, it will force you to create parser objects, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are very convincing. I vote we go with the one that is the most supported, but let’s do this after #620 is merged and stabilizes a bit.
Cc @ManimCommunity/core to hear from others.
From the cleo documentation:
I am strongly against introducing functionality in the docstrings, so I would vote against using cleo. Also, click seems to have a wider audience (and thus, possibly, better support).
However, the person who works on this should have final say, so let’s discuss once there’s a PR 🙂