planet-client-python icon indicating copy to clipboard operation
planet-client-python copied to clipboard

Add helper method to create tools.json for orders and subscriptions

Open cholmes opened this issue 3 years ago • 10 comments

We can help users a lot by letting them use the command-line to specify what 'tools' options they want.

I think it makes sense to create a top level 'tools', with target outputs for subscriptions and orders. They have slightly different syntaxes, and the list of tools isn't exactly the same, so the output for each will be different. But from a user perspective there is a lot of overlap, so we should let users specify common operations in the same way.

First step is probably to agree on the 'spec', probably as a pull request to one of the design docs, and after we agree on that we can code it up.

cholmes avatar Jun 22 '22 03:06 cholmes

Got positive feedback on prioritizing this from early CLI testers.

cholmes avatar Jul 14 '22 17:07 cholmes

The toolchain requirements and formats are different for subscriptions and for orders. It seems easier to just treat them separately until they come into alignment. I'd suggest something like planet subscriptions request-tools [OPTIONS] and planet orders request-tools [OPTIONS].

jreiberkyle avatar Feb 09 '23 00:02 jreiberkyle

I'd be ok with starting them separately and later aligning. If we go that route I think the one thing that would be nice is a 'conversion' utility - like instead of 'options' you could point at a file of the other tools format and have it convert. Like `planet orders request-tools --file "/file/a-subscription-tools.json" ' So when users create a file in one format they can transform it to the other. Going from orders to subscriptions would have to raise errors if it tried to do an operation that isn't supported by subscriptions.

cholmes avatar Mar 07 '23 05:03 cholmes

Yeah that would be really helpful and shouldn't be too complex to implement

jreiberkyle avatar Mar 09 '23 19:03 jreiberkyle

Cool, sounds great.

cholmes avatar Mar 09 '23 20:03 cholmes

@jreiberkyle - are you going to split this out into two tickets - one for orders and one for subscriptions?

cholmes avatar Mar 21 '23 02:03 cholmes

(Or I'm happy to if you'd like)

cholmes avatar Mar 21 '23 02:03 cholmes

I'm ambivalent about separating them or leaving them together. I've found that sometimes making tickets that are too small ends up with a lot of overhead and just breaking the tickets up at sprint planning time can be more beneficial. but I'm ok with them being split up if you'd like to do that now

jreiberkyle avatar Mar 21 '23 17:03 jreiberkyle

I don't need to if you're ambivalent. If you'll tackle them at the same time then it probably makes less sense.

cholmes avatar Mar 21 '23 17:03 cholmes

+1 for maintaining separate tools lists in the SDK until the APIs themselves are better aligned.

asonnenschein avatar Aug 08 '24 18:08 asonnenschein