You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include a detailed description of the bug or suggestion
Output of intake_esm.show_versions()
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted.
Description
When searching a catalog with a query that includes columns storing iterables and specifying require_all_on (on another column than the one with the iterables), the output is empty.
importastimportintakecat=intake.open_esm_datastore('test.json', read_csv_kwargs={'converters': {'variable_id': ast.literal_eval}})
cat.search(variable_id=['tasmax', 'prsn'], require_all_on=['simulation_id'])
# got: < catalog with 0 dataset(s) from 0 asset(s)># expected : < catalog with 2 dataset(s) from 3 asset(s)>
The culprit is intake_esm._search.search_apply_require_all_on which doesn't know about columns with iterables. When it regroups the columns of each group and creates the set to be compared with the expected one, elements in iterable columns are still iterables, whereas the expected condition has elements from these iterables.
PR coming sooner than not.
Version information: output of intake_esm.show_versions()
Here's a quick checklist in what to include:
intake_esm.show_versions()
Description
When searching a catalog with a query that includes columns storing iterables and specifying
require_all_on
(on another column than the one with the iterables), the output is empty.csv file:
json file:
What I Did
The culprit is
intake_esm._search.search_apply_require_all_on
which doesn't know about columns with iterables. When it regroups the columns of each group and creates the set to be compared with the expected one, elements in iterable columns are still iterables, whereas the expectedcondition
has elements from these iterables.PR coming sooner than not.
Version information: output of
intake_esm.show_versions()
INSTALLED VERSIONS
cftime: 1.5.1.1
dask: 2021.12.0
fastprogress: 0.2.7
fsspec: 2021.11.1
gcsfs: 2021.11.1
intake: 0.6.4
intake_esm: 2021.8.17.post43+dirty
netCDF4: 1.5.8
pandas: 1.3.5
requests: 2.26.0
s3fs: 2021.11.1
xarray: 0.20.2
zarr: 2.10.3
The text was updated successfully, but these errors were encountered: