openworm / owmeta-core

Core library for owmeta
MIT License
3 stars 2 forks source link

Add AccessorConifgs "direction" attribute #39

Open mwatts15 opened 2 years ago

mwatts15 commented 2 years ago

Add an attribute, "direction", to all accessor configs that indicates whether it's for upload, download, or both. Without that, URLConfigs don't really provide enough info for Loaders and Uploaders to determine that they can't upload to or download from a remote based on its AC short of querying the server, which is wasteful if the AC is only ever for one thing or the other. Although other ACs may have such information implicitly based on what type of remote they describe, having the attribute means we can pre-filter generically and avoid different loaders/uploaders all implementing similar logic and ACs adding similar attributes.