Question: what is the expected type for `direct_access` ?
lukecampbell opened this issue · comments
When looking at the occurrences of direct_access
the expected types don't align which leads me to wonder what the expected type should be?
https://github.com/intake/intake/search?q=direct_access
When loading a catalog from a YAML file, the expected type based here is expected to be a string. However, the default value assumed by a LocalCatalogEntry
appears to be a boolean.
If I ignore the type specified by type hints and the docstrings, I can properly serialize the catalog and read from a YAML file to instantiate the entries.
direct_access is only of concern when communicating with a server: should the client read the data direct from source, only via the server's endpoint, or can it decide - the three states have string values. "client decides" normally means direct access, if the necessary driver is available. So, once a catalog entry is made in the client from a server response, it evaluates to either true or false: whether direct access will be used or not. This probably accounts for the discrepancy, although I am speaking from hazy memory.
Probably it should always be a string, even if, when used only locally, the value makes no difference.