You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
change double backtick to single backtick do take advantage of default role? #12535
Should we change the double backticks to single backticks in the docs to make use of the new default role (#11186). That way we get more links to the glossary. Do we want to link to the glossary at every mention of fit?
I don't know if this was known when #11186 was merged, but using single ticks for non-references will always add a warning when compiling the docs, like
WARNING: 'any' reference target not found: something_with_single_ticks
I think it's good that single backticks work as the double ones, but we should probably still recommend the use of double backticks to avoid unnecessary warnings.
I didn't try, but it seems to general. Because we would only want to suppress warnings if it came from this default :any: role, we still want to see warnings if we made a type in an explicit :ref:.. or :term:.. ?
Personally, I would only use single backticks if we explicitly want it to link to something (and using single backticks instead of the actual :role:`..` to make it shorter, more readable in plain text, ..), and still use double backticks if we know that the content won't references anything and simply want to render it as code.
The amount of "please use double backticks" in code review adds a bunch of noise. When viewing the docstring from jupyter, the extra two characters from using double backticks adds visual noise.
There are two extremes to "fix" this issue:
Make single backticks not reference anything and always go to code. Add :term: and :py: everywhere.
Keep the current behavior, change all single backticks that do not reference anything to double backticks.
In both of these cases, we should force our circleci doc building to error when there is any role references to nothing, so that we maintain our double backtick policy.
The not so clean solution is:
Use single backticks everywhere, and live with the occasional typo.
Whatever we do, we should document clearly in the contributing guidelines. I agree this back and forth between single and double backticks is getting annoying.
If we want to fully embrace option 3, we should remove the warnings we have now for unresolved any references. (This is easily done by commenting out one line of code in our custom processing of any)
I think we fixed the warnings. What I was thinking about in the original issue was to use single backticks more pervasively so we get more links. Do you think that's worthwhile or should we close the issue?
Activity
NicolasHug commentedon Dec 30, 2018
I don't know if this was known when #11186 was merged, but using single ticks for non-references will always add a warning when compiling the docs, like
I think it's good that single backticks work as the double ones, but we should probably still recommend the use of double backticks to avoid unnecessary warnings.
jnothman commentedon Jan 1, 2019
Maybe we can just find a way to disable those warnings.
jnothman commentedon Jan 1, 2019
adrinjalali commentedon Jan 2, 2019
I think we should be able to suppress those warnings in
doc/conf.py, at least that's what I'm doing in #12654 for some matplotlib warnings.jorisvandenbossche commentedon Jan 4, 2019
That's an actual matplotlib 'python' warning, while here we are speaking about sphinx 'log' warnings. So I don't think it can be done in the same way?
I didn't try, but it seems to general. Because we would only want to suppress warnings if it came from this default
:any:role, we still want to see warnings if we made a type in an explicit:ref:..or:term:..?Personally, I would only use single backticks if we explicitly want it to link to something (and using single backticks instead of the actual
:role:`..`to make it shorter, more readable in plain text, ..), and still use double backticks if we know that the content won't references anything and simply want to render it as code.thomasjpfan commentedon May 5, 2019
The amount of "please use double backticks" in code review adds a bunch of noise. When viewing the docstring from jupyter, the extra two characters from using double backticks adds visual noise.
There are two extremes to "fix" this issue:
Make single backticks not reference anything and always go to code. Add
:term:and:py:everywhere.Keep the current behavior, change all single backticks that do not reference anything to double backticks.
In both of these cases, we should force our circleci doc building to error when there is any role references to nothing, so that we maintain our double backtick policy.
The not so clean solution is:
Currently, I prefer 3.
NicolasHug commentedon May 5, 2019
Whatever we do, we should document clearly in the contributing guidelines. I agree this back and forth between single and double backticks is getting annoying.
jnothman commentedon May 5, 2019
thomasjpfan commentedon May 6, 2019
If we want to fully embrace option 3, we should remove the warnings we have now for unresolved
anyreferences. (This is easily done by commenting out one line of code in our custom processing ofany)amueller commentedon Jul 12, 2019
I think we fixed the warnings. What I was thinking about in the original issue was to use single backticks more pervasively so we get more links. Do you think that's worthwhile or should we close the issue?
adrinjalali commentedon Jul 12, 2019
I'd be in favor, there isn't much to loose and it can be just a
sed!thomasjpfan commentedon Jul 14, 2019
Since this is removing two characters, there should not be any issues with doing a double backtick to single backtick change.
amueller commentedon Jul 14, 2019
apart from breaking all PRs ;)