Uh oh!
There was an error while loading. Please reload this page.
Add sphinx-autocodelink & intersphinx_mapping - #85
Conversation
Just curious about this. Like Update: I tried it out and both of those syntaxes work for me so I assume it is the codeautolink that you were referring to |
After a bit of investigation, seems like xarray isn't working because it doesn't have an xarray module doc reference? e.g. for NumPy Consistent with this, So, perhaps adding Sphinx module directive for the xarray module in the xarray docs would fix it. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
scottyhq
commented
Jun 27, 2022
this is awesome. @dcherian you'll have to re-render the lockfile with the new pip package b/c that is what gets used in CI https://github.com/xarray-contrib/xarray-tutorial/tree/main/conda#createupdate-multiplatform-lockfile |
dcherian
commented
Jun 27, 2022
Thanks for the conda lock tip. I'm 50/50 on this PR. When it works, it's great. But I find myself hovering over things that just don't work. Like will not link Dataset! ^ This supposedly will link though |
scottyhq
commented
Jun 27, 2022
gotcha. I'm fine leaving this in draft form and revisiting at some later date, or separate out just the intersphinx piece (maybe just for xarray?) and revisit the code block autolinking later? |
zmoon
commented
Jun 27, 2022
When I was trying it I found that it only seemed to work for full build from clean, not partial builds, which is kind of annoying. |
felix-hilden
commented
Aug 16, 2022
Yooo thanks for trying autolink out, author here 👋 Did you encounter other bugs besides the one mentioned? ds=xr.DataSet(...)should be linked in terms of the |
dcherian
commented
Jan 17, 2023
The following seems like it should be supported or is it felix-hilden/sphinx-codeautolink#65? Here So i'd expect
https://sphinx-codeautolink.readthedocs.io/en/latest/examples.html#concatenating-examples and https://sphinx-codeautolink.readthedocs.io/en/latest/examples.html#concatenating-examples shows the behaviour I want. |
felix-hilden
commented
Jan 18, 2023
Yep, it should work as long as the type hints are available 👌 Getting |
dcherian
commented
Jan 18, 2023
felix-hilden
commented
Jan 18, 2023
Right, but the reference documentation or type hinted importable location of "air" I meant! |
dcherian
commented
Jan 18, 2023
Oh I see the problem now. It comes from this mixin class but the return value is I can change the code to use |
felix-hilden
commented
Jan 18, 2023
Yep most likely. Fair warning though, I don't think we provide any special support for |
dcherian
commented
Jan 18, 2023
Oh, that's unfortunate indeed. |
felix-hilden
commented
Jan 26, 2023
I found the culprit! The inventory and documentation entry for So linking |
dcherian
commented
Jan 26, 2023
Oh interesting. Thanks for tracking that down. Would it be feasible to do this as a variable in codeautolink_module_overrides= {
"DataArray": "xarray",
"Dataset": "xarray",
} |
felix-hilden
commented
Jan 26, 2023
I like the idea! Let's continue the discussion on the linked issue. |
♻️ PR Preview8df1193 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
scottyhq
commented
Jun 26, 2024
@dcherian I wanted to revive this one now that I have a previews working again and bumped all the package versions. To get methods like da.resample() and others to link correctly (e.g. https://xarray-contrib-xarray-tutorial-preview-pr-85.surge.sh/intermediate/01-high-level-computation-patterns.html). It sounds like we'd need to add a custom map file to this repository based on felix-hilden/sphinx-codeautolink#131 (comment) So,,, options are 1: merge as-is with limited functionality (I'm happy with this), 2: add a custom map file, or 3: abandon adding this feature |
dcherian
commented
Jun 26, 2024
Merge away! |



xref #82
This somewhat works.