Consolidate docs substitutions#11599
Conversation
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
|
@pllim. Purely cosmetic, so push to next milestone? |
|
Alternatively, I can definitely do this for Friday. |
|
This looks uncontroversial enough that it might still make it into 4.3. Though, we might want to document that this is how we want the refs to be done in the dev doc for... doc. |
|
I'll add a note to that effect. |
looks like pytest sub is flaky Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
|
Darn. Pytest doc sub is flaky. Will try to fix. |
mhvk
left a comment
There was a problem hiding this comment.
Another really nice clean-up action! I have only one request, which is not to include OrderedDict in the list - maybe the best argument is just to stick to astropy classes only...
|
@taldcroft, @adrn - as two "randomly" chosen others to have a look at this: do you agree with the concept of centralizing aliases used in the docs? I've reviewed this and the implementation is all OK with me (modulo a small change easily fixed), so if you agree that the idea is sound, I'll merge. |
|
I agree with the concept! Unfortunately don't have time to review this in detail today, maybe tomorrow... |
|
I agree with the concept. |
|
@adrn, @taldcroft - no need to review, as I think I was thorough enough; the agreement with the concept was what I was looking for! @nstarman - ping me when you removed the |
|
@mhvk. Ok. I finally managed to resolve the RTD issues with pytest. Turns out it was very similar to https://thomas-cokelaer.info/blog/2020/04/sphinx-raise-a-warning-duplicate-explicit-target-name/. I'm going to be pushing my changes a few pieces at a time to make sure I resolved the behavior and didn't break any docs links. I'll ping you when it's all done! |
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
Need to anonymize astropy#11118 link Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
|
Hunting down that problem was a fair bit of work because adding subs to |
ba13eec to
6d07434
Compare
|
Ok, @mhvk, except for a possible note in the dev docs, this is G2G! |
|
I see a lot of potential for followup:
|
|
@nstarman - OK, let's get this in! Probably good to have separate issue(s) for the follow-up. My overall sense is to keep it relatively limited, as you have it here, and otherwise err on the side of having references close to where they are needed. |
|
Thank you for doing this. I wonder if we could move all of these into a separate file from I propose moving it out to something like |
|
Separating it out sounds good. |
|
@embray . I like the idea. I had kept the substitutions grouped by subpackages, but still all squashed together. This will allow them to be a little more separate. |
Description
The docs repeatedly define ReST substitutions for Astropy classes like |Quantity| or |Table|. This PR consolidates them into the
docs/conf.py::rst_epilogso substitutions need only be defined once, and can also be used in code docstrings.Fixes #11063