Skip to content
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

sphinx/sphinx-argparse can not interpret hyphen as underscore or vice-versa #124

Open
hanxiao opened this issue May 9, 2020 · 1 comment

Comments

@hanxiao
Copy link

hanxiao commented May 9, 2020

Argument is defined with hyphen in argparse, e.g. --timeout-ready. In Python, this argument is auto converted to timeout_ready. So the user often expects to find the result by searching either: with hyphen or with underscore.

However, right now only the timeout-ready query gives the full result.

Result on timeout_ready:
https://docs.jina.ai/search.html?q=timeout_ready&check_keywords=yes&area=default#

Result on timeout-ready:
https://docs.jina.ai/search.html?q=timeout-ready&check_keywords=yes&area=default#

I guess some kind of alias needs to be added for hyphen and underscore, but at where? Should it be implemented in argparse, or sphinx-argparse, or sphinx, or doc theme level?

Original issue link: jina-ai/jina#402 (comment)

@eric-wieser
Copy link

As mentioned in sphinx-doc/sphinx#7648 (comment), I think the actual report here is that the value of action.dest (which just happens to default to swapping - for _) is not present anywhere in the generated docs.

Perhaps that's deliberate though, since dest is an implementation detail, not a property of the interface being documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants