esgf-pyclient
esgf-pyclient copied to clipboard
add "facets" keyword argument to DatasetResult.file_context
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.