Skip to content
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

Speed up ESGF search #1512

Merged
merged 5 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions esmvalcore/esgf/_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def esgf_search_files(facets):

results = context.search(
batch_size=500,
# enable ignore_facet_check once the following issue has been fixed:
# https://github.com/ESGF/esgf-pyclient/issues/75
# ignore_facet_check=True,
ignore_facet_check=True,
)

files = ESGFFile._from_results(results, facets)
Expand Down
3 changes: 0 additions & 3 deletions package/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ requirements:
- cftime
- cf-units>=3.0.0
- cython # required by cf-units but not automatically installed
- defusedxml # required by esgf-pyclient
- esgf-pyclient
- esmpy!=8.1.0 # see github.com/ESMValGroup/ESMValCore/issues/1208
- fiona
Expand All @@ -53,7 +52,6 @@ requirements:
- isodate
- jinja2
- mpich<3.4 # prevent external build
- myproxyclient # required by esgf-pyclient
- nc-time-axis
- nested-lookup
- netCDF4
Expand All @@ -64,7 +62,6 @@ requirements:
- pydot
- pyyaml
- requests
- requests_cache<0.6 # https://github.com/ESGF/esgf-pyclient/issues/71
- shapely
- yamale

Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
'install': [
'cf-units>=3.0.0',
'dask[array]',
'esgf-pyclient',
# pin requests_cache: https://github.com/ESGF/esgf-pyclient/issues/71
'requests_cache<0.6',
'esgf-pyclient>=0.3.1',
'esmpy!=8.1.0', # see github.com/ESMValGroup/ESMValCore/issues/1208
'fiona',
'fire',
Expand Down
6 changes: 2 additions & 4 deletions tests/unit/esgf/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ def get_mock_connection(facets, results):
class MockFileSearchContext:
def search(self, **kwargs):
assert kwargs['batch_size'] == 500
# enable ignore_facet_check once the following issue has been
# fixed: https://github.com/ESGF/esgf-pyclient/issues/75
# assert kwargs['ignore_facet_check']
assert len(kwargs) == 1
assert kwargs['ignore_facet_check']
assert len(kwargs) == 2
return results

class MockConnection:
Expand Down