-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Silence sphinx warnings #3516
Silence sphinx warnings #3516
Conversation
Awesome, thanks @keewis !! I think the changes in 5d9d263 are good (and having one standard is good for long-term readability) For old whatsnew entries, I think it's fine that the references have decayed if we can silence the warnings (maybe easiest way is your suggestion to just remove the links, though) Should we put an issue in for the numpy docstrings? As a follow-up, is there a way to add a check in CI so these don't stack up again as people make changes? Or maybe difficult without stamping them all out? |
CI: I think it's possible using I also noticed the CI uses numpy: sure, but updating upstream is only a long term fix, we will still have to somehow ignore these warnings if we want to check for new warnings using CI. Edit: the warning about files not included by any toctree can be silenced by adding |
I took a shot at using Also, while trying to fix the nit-picky warnings, I found this: >>> import xarray as xr
>>> ds = xr.Dataset(data_vars={"a": ("x", list("abcd"))}, coords={"x": range(4)})
>>> ds.a.groupby(ds.x % 2 == 0).quantile
<bound method DataArrayGroupBy.quantile of DataArrayGroupBy, grouped over 'x'
2 groups with labels False, True.>
>>> ds.groupby(ds.x % 2 == 0).quantile
AttributeError: 'DatasetGroupBy' object has no attribute 'quantile' despite the documentation claiming otherwise (and indeed, Implementing |
Is
Definitely, good spot |
does anyone have an idea about what to do about broken links in |
I think it'd be good to do a find/replace on those, if that solves our issues? Or are there lots that remain despite that? |
unfortunately, those are not the majority of warnings and this would also cause warnings for deprecated methods (like I also created a preview page, but that currently fails. Can someone help me with the build errors (excessive memory consumption)? |
the CI will probably work when pushing new commits (or one might try to remove No, I was trying to set up readthedocs for this branch which I thought could make discussing the changes a bit easier. However, the current build fails because conda ends up consuming too much memory. My impression was that this is a common problem that was somehow fixed for master. |
f7154f1
to
939c60d
Compare
for author names in |
For sure. How's your regex-fu for find-replacing? I can try and have a go otherwise |
there were not enough entries to actually require regex-replace, so I did it by hand. How would you handle links to |
Sounds good! |
af2c4ab
to
fddc261
Compare
fddc261
to
935f68c
Compare
there are three warnings (locally for me five) of the same kind left before we could switch on |
🤷♂️ I think it's fine to merge right now. This is great work! |
It would be awesome to be able to enable that @keewis, so we don't regress in future. We can merge this for now and come back to that? I may have some time later this week to look more directly. Great work, again! |
Enabling is blocked by these warnings, so we can only do that once we silenced them. After that, I would be fine with a merge. |
I'm going to merge so we can get the docstring improvements out. Let's have a follow-up PR to fix the remaining warnings. Thanks for the great work @keewis 🍻 |
okay, go ahead |
no, sorry, I don't have a twitter account. Can you use the github handle? |
Done! https://twitter.com/xarray_dev/status/1196963951340392448?s=20 (And in case others see this: we're going to be calling out a few others who have made big contributions recently too; we're really excited and appreciative of those who've recently made such prolific contributions) |
* master: (24 commits) Tweaks to release instructions (pydata#3555) Clarify conda environments for new contributors (pydata#3551) Revert to dev version 0.14.1 whatsnew (pydata#3547) sparse option to reindex and unstack (pydata#3542) Silence sphinx warnings (pydata#3516) Numpy 1.18 support (pydata#3537) tweak whats-new. (pydata#3540) small simplification of rename from pydata#3532 (pydata#3539) Added fill_value for unstack (pydata#3541) Add DatasetGroupBy.quantile (pydata#3527) ensure rename does not change index type (pydata#3532) Leave empty slot when not using accessors interpolate_na: Add max_gap support. (pydata#3302) units & deprecation merge (pydata#3530) Fix set_index when an existing dimension becomes a level (pydata#3520) add Variable._replace (pydata#3528) Tests for module-level functions with units (pydata#3493) Harmonize `FillValue` and `missing_value` during encoding and decoding steps (pydata#3502) FUNDING.yml (pydata#3523) ...
* upstream/master: (22 commits) Resolve the version issues on RTD (pydata#3589) Add bottleneck & rasterio git tip to upstream-dev CI (pydata#3585) update whats-new.rst (pydata#3581) Examples for quantile (pydata#3576) add cftime intersphinx entries (pydata#3577) Add pyXpcm to Related Projects doc page (pydata#3578) Reimplement quantile with apply_ufunc (pydata#3559) add environment file for binderized examples (pydata#3568) Add drop to api.rst under pending deprecations (pydata#3561) replace duplicate method _from_vars_and_coord_names (pydata#3565) propagate indexes in to_dataset, from_dataset (pydata#3519) Switch examples to notebooks + scipy19 docs improvements (pydata#3557) fix whats-new.rst (pydata#3554) Tweaks to release instructions (pydata#3555) Clarify conda environments for new contributors (pydata#3551) Revert to dev version 0.14.1 whatsnew (pydata#3547) sparse option to reindex and unstack (pydata#3542) Silence sphinx warnings (pydata#3516) Numpy 1.18 support (pydata#3537) ...
This PR tries to silence most sphinx warnings. 5d9d263 is a collection of changes that silence warnings, but they also reduce the readability of the plain text docstrings, so I'd especially appreciate feedback on these.
There are still some warnings left, due to various reasons:
whats-new.rst
(e.g.CF Conventions
but also developer names).README.rst
andapi-hidden.rst
)whats-new.rst
to labels that were either renamed or removedTo fix these, I would
but I have no idea how to deal with the duplicate target names, duplicate definitions of properties, where to put the references to both files or if it would be better to leave the broken references broken. I did not look at the long list of broken references the CI shows since I can't reproduce it.
black . && mypy . && flake8
whats-new.rst
for all changes andapi.rst
for new API