Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Try to fix code links in docs #183

Merged
merged 6 commits into from
Jan 6, 2023

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented Jan 5, 2023

Attempt to fix broken code links in docs, specified by :py:class:`DataTree`

Doesn't work yet though, and I don't know why 😕

  • Closes part of Joe's comment Documentation plans #61 (comment)
  • Tests added
  • Passes pre-commit run --all-files
  • New functions/methods are listed in api.rst
  • Changes are summarized in docs/source/whats-new.rst

@TomNicholas TomNicholas added bug Something isn't working documentation Improvements or additions to documentation labels Jan 5, 2023
@TomNicholas TomNicholas changed the title Tty to fix code links in docs Try to fix code links in docs Jan 5, 2023
@TomNicholas TomNicholas mentioned this pull request Jan 5, 2023
14 tasks
@TomNicholas
Copy link
Member Author

@andersy005 sorry to bother you - do you know why the intersphinx links to the code API in the docs aren't working?

@andersy005
Copy link
Member

@andersy005 sorry to bother you - do you know why the intersphinx links to the code API in the docs aren't working?

i think the reason why this syntax is not working

:py:class:`DataTree`

is that we are missing the following entry in the rst files (e.g. quick-overview.rst)

.. currentmodule:: datatree

the following seems to be working

diff --git a/docs/source/quick-overview.rst b/docs/source/quick-overview.rst
index 5ec2194..fff83b3 100644
--- a/docs/source/quick-overview.rst
+++ b/docs/source/quick-overview.rst
@@ -2,6 +2,9 @@
 Quick overview
 ##############
 
+
+.. currentmodule:: datatree
+    
 DataTrees
 ---------

@TomNicholas
Copy link
Member Author

Thank you @andersy005 !!

@TomNicholas TomNicholas enabled auto-merge (squash) January 6, 2023 16:57
@TomNicholas TomNicholas disabled auto-merge January 6, 2023 16:57
@TomNicholas TomNicholas merged commit b9d448c into xarray-contrib:main Jan 6, 2023
@TomNicholas TomNicholas deleted the fix_code_links branch January 6, 2023 17:02
flamingbear pushed a commit to flamingbear/rewritten-datatree that referenced this pull request Jan 19, 2024
* try to fix code links in docs

* add currentmodule datatree command to get links to api docs working

* add some intersphinx links to xarray API

* whatsnew
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants