I think a nice practical function for getting local paths for data resources would be to change data_path from an attribute to a method.
The method would work as follows:
- If you call
p.data_path(), it returns /full/path/to/project/data
- If you call it with an argument of a name or URI, it will return the path to that file. For example,
p.data_path("syn:syn18670920") would return full/path/to/project/data/file_associated_with_syn18670920.ext