Use sphinx-astropy xref aliases#11684
Conversation
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
My instigation, because I asked about https://github.com/astropy/sphinx-astropy/pull/40/files#r624715168
😄 |
0ecd9f2 to
6119cf6
Compare
|
Hmm. This step appears to be a bit trickier. There's some intersphinx subtleties since the intersphinx_mapping in sphinx_astropy.sphinx refers to astropy, but this is astropy stable, and we want the intersphinx to refer to the version being built. @pllim @embray , git blame says y'all last modified the line Any suggestions how to intersphinx to the version being built? Is that even possible? Larger question, is this even a good idea, or should we just keep the physical type xref explicitly in Astropy/docs/conf.py (in addition to in sphinx_astropy v1 for affiliate packages)? Edit : astropy/sphinx-astropy#15 is relevant. |
Maybe #11622 is what you need? p.s. We don't really have enough resources for big changes to |
Looks like it. It helped me figure out the solution. Thanks!
Understood. I'm working with @adrn to enable some of the numpydoc xref to be easily used by affiliate packages. I'm trying to avoid messing with any intersphinx magic, just moving some dictionaries around. Probably nothing big. |
|
@adrn @mhvk. This works! We can move much of the numpydoc xref stuff from Astropy to sphinx-astropy, thereby allowing affiliate packages to use the xref. I've set it up so that sphinx-astropy creates affiliate links, so here in astropy we just strip the intersphinx parts from the links with two quick There are two things before I undraft:
|
|
I think #11690 can be lightly modified (once merged) to skip the need for the intersphinx stripping happening in this PR. That would make astropy_sphinx "just" work for both affiliate and astropy. |
|
@nstarman - this looks nice, but obviously still needs the astropy-sphinx PR to be merged first... |
48769d2 to
a5dd1f0
Compare
a5dd1f0 to
0832b9d
Compare
Unfortunately, a new release... No chance that sphinx-astropy could release in lock-step with Astropy (if there's a change in sphinx-astropy) ? |
Right now, release is done as needed and when people have time. I won't have time this week. |
82c9f66 to
7aa5d56
Compare
|
32-bit/parallel failure is due to #11878 . I am not sure if I can review this PR. I have not been following the doc stuff closely. |
Thanks! I was worried there.
NP. I tagged because of astropy/sphinx-astropy#40. |
|
I think this is just ready to go in, as it was a logical follow-up of the sphinx astropy update. But maybe leave open for a day in case others want to have a look. |
|
reminder to self: really need to do #11584 to also document which x-refs are in sphinx-astropy, how an affiliate package should use all this (also add documentation in sphinx-astropy), and how to add a term to sphinx-astropy and remove in astropy (if present). |
saimn
left a comment
There was a problem hiding this comment.
Sounds good. I put the milestone to 5.0 but maybe we could backport to avoid conflicts in case we need to update the conf.py file in the future.
| @@ -0,0 +1 @@ | |||
| Use ``sphinx-astropy`` for ``numpydoc`` xref settings. | |||
There was a problem hiding this comment.
I don't think this deserves a changelog entry, it's an internal change not visible by users.
7aa5d56 to
ca39402
Compare
|
Thanks @nstarman ! |
"Upstream" much of the numpydoc xref to sphinx-astropy for use by affiliate packages.
Blocked by: astropy/sphinx-astropy#40
@adrn @mhvk
Tests:
conf.pyto use the sphinx_astropy v1 duplicate definitions. Does this use the tested astropy version ?