-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
opendap / dap4 support for pydap backend #10182
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
Conversation
Apologies for all the added labels / contributors. Didn't have much time to work on this pr this week, and so I had to rebase and merge the main branch to this one. Changed files are correct though. |
Ready for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Mikejmnez
The test_cmp_local_file
failure is real.
@@ -49,36 +51,37 @@ def __getitem__(self, key): | |||
) | |||
|
|||
def _getitem(self, key): | |||
# pull the data from the array attribute if possible, to avoid | |||
# downloading coordinate data twice | |||
array = getattr(self.array, "array", self.array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need this any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set the output_grid=False
by default on pydap, so that should not be necessary. But I'll double check (All the tests passed on the xarray-tests environment)
pytest -v xarray/tests/test_backends.py --run-network-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated/upgraded to a newer pydap version on min_all_dep.yml
. The failing test test_cmp_local_file
is gone as expected. Meaning this is correct. I am also removing output_grid
as an argument. It is not really used. So I added a deprecation warning.
for more information, see https://pre-commit.ci
It looks like the failing for ubuntu-latest py3.10 min-all-deps has pydap pinned to |
We like to keep compatibility for ~ a year. I could see relaxing this in special cases. Can we do |
Cool. I think it is totally doable. There might be one or two features that may be newer than that, I might just have to add a |
I set the min version to |
Thanks! I think we can merge. Can you add a note to |
Awesome! Will do shortly |
…aking Changes` and documentation for backend engine
Sorry one last test failure on the flaky env (which I think is the only one where pydap tests are run)
|
Hmmm - there might be an issue with that test dataset. I'll look into this |
I don't really know what is going on... I am having a hard time replicating the error. I installed the environment pytest xarray/tests/test_backends_datatree.py -v --run-flaky --run-network-tests -W default And the test highlighted here passes. There was, however, another test that failed but only once: ____________________________ TestPyDAPDatatreeIO.test_inherited_coords _________
with xr.open_dataset(url, engine=self.engine, group="/SimpleGroup") as expected:
/Users/jimenezm/xarray/xarray/tests/test_backends_datatree.py:505: AssertionError When I run the same testing command, without making any change, all tests pass no matter how many times I try. I repeatedly try to replicate these errors and cannot. I have For example according to the failed test, the following should fail (python 3.13.3 pydap=3.5.5): I am kind of confused... Any suggestion @dcherian ? |
Ok! I think likely there was something off with the remote dataset, and it got updated. flaky passes all tests. I see Minimum Version Policy fails because of I looked at the RuntimeError for the docs/readthedocs build which failed, and I see: RuntimeError: Unexpected warning in `/home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/10182/doc/user-guide/computation.rst` line 644
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/xray/conda/10182/lib/python3.12/site-packages/IPython/sphinxext/ipython_directive.py", line 603, in process_input
raise RuntimeError(
RuntimeError: Unexpected warning in `/home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/10182/doc/user-guide/computation.rst` line 644 However, that environment does not even use @dcherian let me know if there is any other thing needed. Have a good weekend! |
Nice, thanks for your work here. Sorry it was a bit annoying at the end. |
There have been some (revitalizing) upgrades over the last year to pydap (with some more to come), including authentication, pydap data model (dap2 vs dap4). This
DraftPR aims toDataTree
.output_grid
option. It is now set toFalse
as default inpydap
.output_grid
as an input parameter. It will always beFalse
as default (and there is no need for it to beTrue
, as it only adds unnecessary logic).This PR enables, for example (check test opendap dap4 url)