-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add lots of methods to OpenHexaClient #281
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
Changes from 3 commits
6016181
bb9c29b
debeb48
2bdabd8
07695ae
784939b
23bcc0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -596,16 +596,14 @@ def pipelines_list(): | |
| if settings.current_workspace is None: | ||
| _terminate("No workspace activated", err=True) | ||
|
|
||
| workspace_pipelines = ( | ||
| OpenHexaClient().get_workspace_pipelines(workspace_slug=settings.current_workspace).pipelines.items | ||
| ) | ||
| workspace_pipelines = OpenHexaClient().pipelines(workspace_slug=settings.current_workspace).pipelines.items | ||
| if len(workspace_pipelines) == 0: | ||
| click.echo(f"No pipelines in workspace {settings.current_workspace}") | ||
| return | ||
| click.echo("Pipelines:") | ||
| for pipeline in workspace_pipelines: | ||
| if pipeline.type == "zipFile": | ||
| current_version = f"v{pipeline.current_version.version_number}" if pipeline.current_version else "N/A" | ||
| current_version = "N/A" if not pipeline.current_version else f"v{pipeline.current_version.version_number}" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This helps with warning in IDE because current version can be None
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this change identical to what it was before? In general I think
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, not a big deal, PyCharm prefers it inverted (I think it does not handle perfectly Optional typing). VS Code seems fine with it so I am reverting this change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Interesting! And weird :p But not a big deal indeed, you can do as you prefer |
||
| else: | ||
| current_version = "Jupyter notebook" | ||
| click.echo(f"* {pipeline.code} - {pipeline.name} ({current_version})") | ||
|
|
||
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.
Maybe a nitpick, and it slightly annoys me that I have to do a superfluous
.pipelineson this method before getting to the.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.
I agree with you and wanted to fix this but didn't look far enough to change this.
Thanks for pushing me a bit further, I have found a plugin that does exactly that