Skip to content

Commit

Permalink
Speed up ESGF search (#1512)
Browse files Browse the repository at this point in the history
* Speed up ESGF search

* Update test

* fix indent and add feature branch for GA test

* remove current feature branch for GA test

Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Manuel Schlund <manuel.schlund@dlr.de>
  • Loading branch information
3 people authored Mar 2, 2022
1 parent 76c6dee commit 6c92433
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
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

0 comments on commit 6c92433

Please sign in to comment.