-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: just new labels #29508
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
base: main
Are you sure you want to change the base?
DOC: just new labels #29508
Conversation
Context: There are two ways in which we can reference examples:
We currently have 150 :doc: links and 7 :ref: links mapping to examples. I give my perspective on the advantages / disavantages of Advantage:
Disadvantage:
IMHO :ref: links for examples only have the advantage that we can change the filenames / directory structure without the need to update the links. But we rarely do that (i) because it's rarely needed and (ii) such a change requires putting up a redirect, which is some effort in itself. I don't see an additional search/replace for the corresponding On the background that the examples references are much more read than changed I find that the disadvantages for reading/using outweigh the possibility of a slightly simpler filename/directory change. Therefore, I'm 0.5 on this. |
First, the references to examples comparison is a bit chicken and egg - the example gallery was made without references, so no one refers to them. However I think there are pros and cons to both referencing systems that depend a little on how you work - referencing by the webpage path is fragile and doesn't match the code tree path so its not very straightforward, and if you reference the stable docs, you need to remember what part of the path to refer to in the Regardless, this PR isn't prescriptive is how anyone uses the references or not - it just adds the references. |
That's also apples to oranges. In written .rst docs, you often have multiple sections in a document and want to link to a specific section inside the document, not the document as a whole. It's reasonable (and for non-top-level sections a necessity) to use :ref: there. In contrast we want to reference examples as a whole, not the title of the example.
We shouldn't "just add" stuff. I value consistency very high and want an agreed upon and documented policy how we want to reference docs. That may seem pedantic but IMHO it would be the worst outcome if half of the examples are referenced by :doc: and the other half by :ref:. Currently we predominantly use :doc: for example references and also explicitly use a gallery example for a :doc: example it in our documentation guide. If you want to change this, I want to have this conversation. I'm fine if others vote in favor of always using :ref:, but please let's do this systematically and not create a mess. |
That link takes me to a page that describes using both Also note that the document you link does explicitly advise against names like
I don't think I am proposing to change anything. I am pretty sure I chose the original examples to reference with |
Ok, maybe I'm overinterpreting and we don't have a standardized approach for referencing examples. But then I'd like to clarify our policy here. We have three options for example references:
My priority would be (1) > (2) > (3) for the reasons already given above. What do you propose? |
I think we should have lots of cross references. I don't really care what form they take, but given that ref works whether I am referencing page or a section, I have a mild preference for it. So I guess my ranking is 3>2>1. |
Ok, now we have pinned the conflict 1>2>3 vs. 3>2>1. Should we move this to one of the next dev calls? I suspect it might be easier to find an agreement there rather than through a written discussion. |
PR summary
This just adds label references to some prominent examples so they can be referenced by
:ref:
elsewhere in the docs.These get used in #29124.