-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix intersphinx
for the cosmology
package
#350
Comments
|
Given the files have a "non-conditional" import of Should we should stick to one thing? Either import Originally posted by @Saransh-cpp in #347 (comment) |
Closes #346. Working towards #188. The main changes here have been: - Remove all types in the docstrings in favour of proper static typing (being added in #308) - Switch from `numpydoc` to `sphinx.ext.napolean` due to numpy/numpydoc#196 Have had to change the references to `[1]` rather than `[1]_` due to this bug, sphinx-doc/sphinx#9689. Hopefully this can be fixed in the future. Example: `glass.lensing.from_convergence` <img width="781" alt="image" src="https://github.com/user-attachments/assets/9b6fd087-686a-4a5c-a77a-f8a3ec9fc3e2"> Raised #350, #351.
Fixes #355, simplifying #308, xref #350. Change all import of `typing`/`collections.abc` to `import <x>` rather than `from <x> import` syntax. This is useful because it is straightforward to see at a glance where the `import` is coming from. Further, we have both `numpy.random.Generator` and `collections.abc.Generator` in use - so it separates them. I've also moved everything out of the `TYPE_CHECKING` block, except from where `ruff` says we should.
So looking into this, it has nothing to do with |
cosmology
package
cosmology
packageintersphinx
for the cosmology
package
So looks like everything is working except https://cosmology.readthedocs.io/en/stable. I tried both intersphinx_mapping = {
"cosmology": ("https://cosmology.readthedocs.io/en/stable", None),
"numpy": ("https://numpy.org/doc/stable", None),
"python": ("https://docs.python.org/3", None),
} and intersphinx_mapping = {
"cosmology": (
"https://cosmology.readthedocs.io/en/stable",
"https://cosmology.readthedocs.io/en/stable/objects.inv",
),
"numpy": ("https://numpy.org/doc/stable", None),
"python": ("https://docs.python.org/3", None),
} any ideas? Neither worked. Won't matter if #124 is tackled first. |
I am tempted to move away from |
I'm going to close this. We can come back to it if we have issues with #124. |
What is the Topic of Your Question
Documentation
Add Your Question Below
Following #347 we now have static types rendering in the documentation. However, as can be seen in the screenshot,
npt.NDArray
isn't highlighted. Anyone know if it's possible?The text was updated successfully, but these errors were encountered: