GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add versions, environments and improve test coverage by zeryx · Pull Request #125 · algorithmiaio/algorithmia-python

Conversation

@zeryx

@zeryx zeryx commented May 12, 2022

Copy link
Copy Markdown
Contributor

This PR does a bunch (sorry!)
It strips out most of the openapi spec generated client logic; and instead hardcodes API paths.
It also replaces the autogenerated class objects with json response objects, but keeps error handling the same.

This unbreaks the following paths with gitlab / bitbucket based SCMs:
algo.versions()
algo.info()
algo.builds()

We also added the following endpoints:
algo.versions()
algo.exists()

more test coverage may be required.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
zeryx added 10 commits May 11, 2022 15:26
@zeryx
major updates to all paths, removal of class creation from API requests
468ff1a
@zeryx
added more test coverage for versions and info functions
62fa78c
@zeryx
removed unnecessary class conversion function
12a3aaf
@zeryx
forgot to remove a dependency, and self signed cert branch wasn't upd…
bb6a335
…ated
@zeryx
replaced all create/publish/update endpoints to use fixed urls and bu…
7140667
…ilt-in requests package
@zeryx
simplified builds to follow the normal getJsonHelper pattern
786502f
@zeryx
renamed builds to get_builds
7271f34
@zeryx
added an update endpoint test
0f91135
@zeryx
fixed the put operation; follows the other helper endpoint systems
1f668f6
@zeryx
removed mutating and cluster specific test cases from client tests (p…
137db11
…ython 2)
@zeryx zeryx self-assigned this May 12, 2022
@zeryx
zeryx requested review from abuslovskyi and kennydaniel May 12, 2022 16:15
kennydaniel
kennydaniel reviewed May 13, 2022
View reviewed changes
Comment thread Algorithmia/CLI.py
def getBuildLogs(self, user, algo, client):
api_response = client.algo(user + '/' + algo).build_logs()

if "error" in api_response:

@kennydaniel kennydaniel May 13, 2022

Copy link
Copy Markdown
Contributor

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.

what will happen here if there is an error, now that you remove error handling?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@zeryx zeryx May 13, 2022

Copy link
Copy Markdown
Contributor Author

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.

it will just raise the error as per the build_logs() endpoint, previously there was no error handling in the internal build_logs() endpoint, if it was a 500 we needed that to be handled here

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kennydaniel
kennydaniel approved these changes May 13, 2022
View reviewed changes

@kennydaniel kennydaniel left a comment

Copy link
Copy Markdown
Contributor

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.

Overall looks good. Nice refactoring on the getJsonHelper.

Note that this is a breaking python api change so will need major version. I support the changes though.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zeryx reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@zeryx
zeryx merged commit d295aea into develop May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@abuslovskyi abuslovskyi Awaiting requested review from abuslovskyi
1 more reviewer
@kennydaniel kennydaniel kennydaniel approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@zeryx zeryx

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@zeryx @kennydaniel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.