Skip to content

change double backtick to single backtick do take advantage of default role? #12535

Closed

Description

@amueller

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?

Activity

  1. added
    Easy
    on Dec 28, 2018
  2. NicolasHug commented on Dec 30, 2018

    @NicolasHug
    Member

    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.

  3. jnothman commented on Jan 1, 2019

    @jnothman
    Member

    Maybe we can just find a way to disable those warnings.

  4. adrinjalali commented on Jan 2, 2019

    @adrinjalali
    Member

    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.

  5. jorisvandenbossche commented on Jan 4, 2019

    @jorisvandenbossche
    Member

    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.

    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?

    Perhaps http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-suppress_warnings or maybe it's too general

    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.

  6. thomasjpfan commented on May 5, 2019

    @thomasjpfan
    Member

    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:

    1. Make single backticks not reference anything and always go to code. Add :term: and :py: everywhere.

    2. 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:

    1. Use single backticks everywhere, and live with the occasional typo.

    Currently, I prefer 3.

  7. NicolasHug commented on May 5, 2019

    @NicolasHug
    Member

    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.

  8. jnothman commented on May 5, 2019

    @jnothman
    Member
  9. thomasjpfan commented on May 6, 2019

    @thomasjpfan
    Member

    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)

  10. added
    Easy
    and removed
    Easy
    on Jul 12, 2019
  11. amueller commented on Jul 12, 2019

    @amueller
    MemberAuthor

    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?

  12. adrinjalali commented on Jul 12, 2019

    @adrinjalali
    Member

    I'd be in favor, there isn't much to loose and it can be just a sed!

  13. thomasjpfan commented on Jul 14, 2019

    @thomasjpfan
    Member

    Since this is removing two characters, there should not be any issues with doing a double backtick to single backtick change.

  14. amueller commented on Jul 14, 2019

    @amueller
    MemberAuthor

    apart from breaking all PRs ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationEasy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions