-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Right now, we have three methods:
readable()- Guarantees the resource is readableas_path()- Context manager that guarantees the resource is an existing Pathcached()- Guarantees the resource is an existing Path throughout the program life
This reflects that we're really just wrapping the importlib.resources API along with an interpreter-lifetime cache, but if part of the reason to use this is to file the edges off of IR, maybe we should think a little more abstractly. We could instead write these as:
ephemeral()- The data is accessible with a limited interfacetemporary()- The data is temporarily accessible with a full interfacepermanent()- The data is permanently accessible with a full interface
Perhaps this would be clearer to somebody who isn't already in the weeds of IR and just wants to understand the semantics of our loader?
Also, do we think it's worth keeping the __call__() behavior as the safe-but-potentially-wasteful cached()/permanent(), or remove it and always be explicit?
Metadata
Metadata
Assignees
Labels
No labels