-
Notifications
You must be signed in to change notification settings - Fork 15
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
Enable API reference docs to show accessor methods #44
Conversation
The cupy-core package from conda-forge does not bring in CUDA dependencies and thus can be installed on CPU-only CI services. Xref conda-forge/cupy-feedstock#229
Also fixed some typos around doc/docs.
See usage instructions in https://sphinx-autosummary-accessors.readthedocs.io/en/stable/usage.html. Also need to `import cupy_xarray` to fix `exception: no module named xarray.DataArray.cupy` error following xarray-contrib/sphinx-autosummary-accessors#107.
Fixes `AttributeError: type object 'CupyDatasetAccessor' has no attribute 'get'`
for more information, see https://pre-commit.ci
I think that's because those don't have docstrings ( Edit: looks like all of them are centered, just that some of them have longer strings |
Ok, removed
Ah yes, I was trying with one dot
Hmm you're correct, they are all center-aligned. Let me try to play around with the docstrings and/or the sphinx template. |
Adding some docstrings to the is_cupy, as_cupy and as_numpy methods, so that the API docs page looks like center-aligned.
Ok, couldn't figure out how to remove the center-alignment 😅, I had a look at other xarray-contrib repos using the Furo theme, and it seems like xwrf has the same issue, but cf-xarray doesn't. So... I just added in the some docstrings to make it look less empty. Maybe @dcherian or someone else can look at cf-xarray's css file and figure out how to remove the centre-alignment issue. |
Ah ok, maybe best to report this upstream then at https://github.com/pradyunsg/furo? I'm not sure whether the API docs in
Thanks! You must have read my mind. Secretly, I've been hoping to get maintainer access after this PR because I have some free time next week, so maybe (just maybe) I'll put in some time to update #10 😈 Will leave this open a bit longer in case anyone has other suggestions, otherwise I'll go ahead and merge this sometime tomorrow. |
Previously, the API docs section of
cupy-xarray
has been disabled on becauseimport cupy
doesn't work on Readthedocs CI without CUDA. Luckily, there is now acupy-core
package onconda-forge
(see conda-forge/cupy-feedstock#241) that makes CUDA optional, so we can use that to build the API docs!Preview at https://cupy-xarray--44.org.readthedocs.build/api.html
(Yeah, not sure why some of those API methods are centre-aligned 😅)
I've also updated the 'Contributing documentation' section in the contributing guide which had some typos. Full steps to reproduce the docs build are:
conda env create --file ci/doc.yml conda activate cupy-xarray-doc cd docs make html
References:
Fixes #5