Comments (13)
I'd still like to see a docopt_ng
package also. I have so many scripts/tools using docopt
right now and a package of my own that hooks into docopt, that if I installed this package as-is I would spend hours fixing everything. With a new name, I could install it side-by-side with docopt and slowly start adapting to the new way of doing things. Eventually I could drop the old docopt altogether.
I don't like asking people to rename their projects, but it would help me out a lot if this was imported as anything except docopt
.
from docopt-ng.
I'm gonna test it out on my projects this weekend. I use docopt heavily, and even modify it's behavior a little in my Colr library (optionally, to colorize docopt usage strings). I do this by importing docopt from Colr, where a couple functions/error-classes have been overridden. I'll have to modify Colr a little, to use docopt-ng when available. Not that any of this is your problem, just letting you know that I plan on putting docopt-ng to the test. I doubt there will be any bugs on your end, but if there are then I'll file an issue.
from docopt-ng.
Any updates on this? I'm using docopt a lot, but it has tons of issues, and has been seemingly abandoned, so this fork seems like the solution moving forwards. Except that a seemingly ready release hasn't gone through which makes me doubt about the future of docopt-ng :/
from docopt-ng.
I ended up having to upgrade my OS this weekend and ran into trouble. I haven't been able to do any real testing so far. Only thing I've noticed is that the variable type annotations kill support for anything less than Python 3.6. A 1.0 release may be mandatory since breaking changes were introduced. The only other option I can think of involves losing all of the type-checked goodness. I'm still going to test this out on my projects ASAP.
from docopt-ng.
@cjwelborn that sounds wonderful, thanks for taking the initiative! Looking forward to hearing how the tests go.
Looking at Colr: assuming you don't intend to support the more_magic
functionality of docopt-ng, no changes should be required. If you want more magic, ie
- long-argument spellcheck (
--hel
->--help
,--verBOse
->--verbose
) - the
arguments
variable to be populated in the globals namespace ifdocopt()
isn't assigned __doc__
from the calling namespace to be used ifdocstring
isn't passed todocopt()
, andmore_magic
to be set toTrue
ifdocopt()
is aliased to a function name containingmagic
(from docopt import magic_docopt
)
then a few changes will be required, but not many.
Cheers!
from docopt-ng.
@itdaniher, cool. Thanks for the extra info. I'll get back to you.
from docopt-ng.
Okay, so I've been testing this out with my stuff and it looks like it introduces major breaking changes. It's not a "drop-in" replacement for the old docopt. Parameter names have changed, so any program calling docopt like: docopt(usagestr, help=False)
is going to fail. I would think a major version change is needed at the very least. Also, since both projects install as docopt
(import docopt
), you can't have both installed at the same time. I don't know how you would feel about renaming the module to docopt_ng
or something simlar, but I'd at least do a 1.0
to mark these breaking changes.
from docopt-ng.
Renaming to docopt_ng is probably reasonable. I'll also go through and make sure the parameter names for the keyword arguments match docopt, feel free to open a bug. Anything else blocking drop-in use?
from docopt-ng.
@cjwelborn @0x5c - I've been pretty offline this summer (personal growth, moving my household) - but I'm interested in picking up some of the open TODOs here. I'll review the PR from @0x5c and plan my attack to address the compatibility issues @cjwelborn called out. Regards!
from docopt-ng.
I don't like asking people to rename their projects, but it would help me out a lot if this was imported as anything except
docopt
.
Happy to change this :)
from docopt-ng.
Except that a seemingly ready release hasn't gone through which makes me doubt about the future of docopt-ng :/
Total test coverage, type hinting were my original objectives - and I'm pretty sure the code's on PyPi. I was pretty happy with where things were, but @cjwelborn found a few compatibility issues I was meaning to address before my life got unusually crazy for awhile. Skepticism is always reasonable, but given my return to "extremely online" - doubts are probably a little excessive. Thanks again for your PR, will review shortly!
from docopt-ng.
That is good news! I'll keep docopt-ng in my toolbox then.
However, I am not comfortable with receiving undue credits, and especially for making PRs, so let's redirect that in the right direction:
Thank you to the person who actually submitted a PR :D
I may have a look at contributing though.
from docopt-ng.
I'd love to see it as {docopt_ng, docoptng, docopt2, etc} as well, exactly for the reasons above. I have a ton of existing docopt code I'd love to port over if they were API compatible but if not, having side-by-side installs would be almost as good.
Any thoughts on what it would take to get to a new package name?
from docopt-ng.
Related Issues (20)
- fork HOT 4
- Performance penalty: combinatorial explosion in `transform` HOT 3
- Make PEP561 compatible (allow mypy to actually find type hints) HOT 8
- When docopt and docopt-ng are in the same venv, docopt takes precedence HOT 6
- Add @NickCrews to test.pypi.org HOT 1
- docopt-ng fails to parse usage string that worked with docopt HOT 4
- Question: auto formatting & sorting imports HOT 5
- Is it possible to separate options in subsections? HOT 2
- Failing to put two spaces in description sometimes results in very obscure error. HOT 1
- Integrate docopt-dispatch in this project HOT 5
- Spaces in default value HOT 3
- Claim `docopt` name on pypi (PEP-541) HOT 10
- assert instr.opname.startswith("CALL_") throws on Python 3.11 HOT 5
- TODO: port spellchecker to suggest, rather than fix
- DISCUSS: future of docopt-ng HOT 17
- docopt.DocoptLanguageError: unmatched '[' HOT 1
- If there is unused data in the command line, the thrown exception doesn't include the collected and left items HOT 1
- command line parsing is storing some options multiple times HOT 2
- Allow dumping of parse tree, to make it easier to check what docopt will actually parse
- Support envvar token
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docopt-ng.