-
Notifications
You must be signed in to change notification settings - Fork 55
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
Proof-of-concept for "snow ws" command generation #1540
Conversation
return | ||
|
||
root = dm.unrendered_project_definition | ||
for (target_id, model) in root.entities.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider model.get_command_group(target_id)
that would encapsulate L100-102? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I quite understand the suggestion. Can you give a bit more detail?
e8bc42d
to
5c2d51a
Compare
5c2d51a
to
487ff20
Compare
487ff20
to
16a4f7b
Compare
pass_through_options = { | ||
k: v for (k, v) in options.items() if k in known_params | ||
} | ||
ws.perform_action(self.target_id, action, **pass_through_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we handle return values? for example, we currently have some command that wrap the return value of the entity action in MessageResult
, others use QueryResult
, etc
return MessageResult( | ||
f"Successfully performed {action.verb} on {self.target_id}." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not all actions want to show a success message (especially those that retrieve data, like version-list
)
Closing this for now due to uncertainty regarding the |
Pre-review checklist
Changes description
Generates
snow ws @<entity_id>
command groups based on the current directory'ssnowflake.yml
.What's done:
HelpText
,ParameterDeclarations
) that ensures individual commands don't actually rely on click / typerThings that need addressing:
snow @pkg version create v1
needs to be passed in instead as--version v1
)