-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
pipeable spaces setup #147
Comments
I don't think we've talked about this. I like the idea generally, but worry about it due to some of the functions having side effects (that sometimes cost money). That said, I tend to like functions whose arg order naturally supports pipes anyway as they feel more consistent. The arg order I copied from e.g. from aws.3s:
I think a pipeable API like this would be nice: space_create() %>%
spaces_object_put("some-file.txt") %>%
spaces_object_copy("another-space") I'm totally down to swap things over in the code I've already written. |
Okay, I'm not wedded to the idea of pipeable functions, but it does seem good to do it since many of the droplet functions are that way. we have some waiting internal utilities that you may need, as I imagine there's a bit of a wait time for the space to be created |
Consistency sounds good. I generally like the argument order that comes out of making a function work better in a pipeline. I'm curious: If the droplet/space comes first, would that be considered least-significant-first or most-significant-first order? I feel like there's gotta me some CS terminology here.
I'm not sure I fully understand what you mean here. Could you elaborate? |
Hmm, not sure of the CS terminology, no idea. The waiting stuff .e.g, https://github.com/sckott/analogsea/blob/a2cc5c86e00e87106dd5066241fee9b650846e85/R/actions.R#L64-L95 is to be able to pipe together operations that depend on the previous operating finishing. spinning up a droplet takes a little while, so helper functions help make sure the operation has finished before the next thing happening in the pipe line |
Ah, that's very useful. |
the |
@amoeba should we bump this to the next milestone? |
Also commented over on #140: I can do this this month. Is that fast enough? |
Did we talk yet about making spaces functions follow droplet functions pattern of facilitating piping them together?
do we not want to do that? or do we?
The text was updated successfully, but these errors were encountered: