Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AccessorConifgs "direction" attribute #39

Open
5 tasks
mwatts15 opened this issue Dec 26, 2021 · 0 comments
Open
5 tasks

Add AccessorConifgs "direction" attribute #39

mwatts15 opened this issue Dec 26, 2021 · 0 comments

Comments

@mwatts15
Copy link
Contributor

mwatts15 commented Dec 26, 2021

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.

  • Add direction attribute to AccessorConfig
  • Define a AccessorDirection enum with the values UPLOAD, DOWNLOAD, BOTH
  • Add direction constructor parameter to AccessorConfig with a default value of AccessorDirection.BOTH
  • Ensure direction is defined in AccessorConfig.__setstate__
  • Add a parameter to owmeta_core.commands.bundle.OWMBundleRemoteAdd.__call__ for the direction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant