esgf-pyclient icon indicating copy to clipboard operation
esgf-pyclient copied to clipboard

add "facets" keyword argument to DatasetResult.file_context

Open alaniwi opened this issue 2 years ago • 0 comments

The DatasetResult.file_context function (see results.py) doesn't allow a facets keyword argument, but we might want to set the facets property of the FileSearchContext object that is returned (especially in order to avoid the default facets='*').

Currently we have to monkey-patch it:

fc = result.file_context()
fc.facets = 'project'

but it would be nice to be able to do:

fc = result.file_context(facets='project')

Should be a simple fix to just add the argument and pass it through.

alaniwi avatar Dec 02 '21 14:12 alaniwi