jina-ai / jina

☁️ Build multimodal AI applications with cloud-native stack
https://docs.jina.ai
Apache License 2.0
20.98k stars 2.22k forks source link

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

Closed hanxiao closed 4 years ago

hanxiao commented 4 years ago

Describe your problem

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#

What is your guess?

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 post: https://github.com/jina-ai/jina/issues/395#issuecomment-625773716 sphinx-argparse: https://github.com/alex-rudakov/sphinx-argparse/issues/124 sphinx: https://github.com/sphinx-doc/sphinx/issues/7648#issue-615227543

Environment

Screenshots

jina-bot commented 4 years ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 4 days