-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add docstring automation to get help message to typer objects #436
base: master
Are you sure you want to change the base?
Conversation
I have updated the tests, to remove a bit of duplication. But I noticed a problem: if a parameter documentation takes more then one line, only the first line is parsed. I did not had an idea to fix this yet 😬 |
📝 Docs preview for commit 768644c at: https://639cea219c18df08fdc8417d--typertiangolo.netlify.app |
@tiangolo is this something you'd consider adding? It would be exceedingly useful to incorporate this functionality directly into |
I am also waiting for this feature. It's a surprise to me that this is not already part of the library |
May be worth looking at https://cyclopts.readthedocs.io/en/latest/ as an alternative, switching isn't too onerous. |
Hi, thanks for the PR and apologies for the delay in reviewing this! I'll put this in draft, update with the latest from |
Note: pausing this for a bit longer to first review PRs #815 and #964. From a first quick review though, I think we could consider using https://github.com/rr-/docstring_parser to implement the functionality proposed in this PR. I'll get back to this once the other PRs are done. |
Hi everyone,
Thanks for this awesome library, hope I can help :)
I hope this PR closes #227 and #336
My idea was to let typer get help messages to commands/arguments automatically from the objects docstrings.
I considered 3 docstrings formats: Numpy, Google and reST (Sphinx) (I believe they are the most common, right?).
I heve written some tests, but they can be improved (I felt that were a lot of duplications), and more can be written (units tests and more test cases, like callbacks).