-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add API V2 support #97
base: master
Are you sure you want to change the base?
Conversation
413a757
to
cbdcba5
Compare
@@ -17,11 +17,11 @@ jobs: | |||
- run: | |||
name: Black Formatting Check # Only validation, without re-formatting | |||
command: | | |||
black --check -t py36 . | |||
black --check --exclude 'scaleapi/api_client/*' -t py38 . |
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.
is there a way to run it through black after we generate. We run the typescript one through prettier
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 a big deal if it's not easy
$ openapi-generator-cli generate --auth "Authorization:$SCALE_API_AUTH_HEADER" --config v2_generator.json | ||
``` | ||
|
||
Additionally, update the Annotation model type discrimination if there are changes |
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.
can you add a link to where the line that needs to be updated as an example?
@@ -318,6 +330,83 @@ def tasks(self, **kwargs) -> Tasklist: | |||
response.get("next_token"), | |||
) | |||
|
|||
def v2_get_tasks( |
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.
so you can do like:
client = ScaleClient()
client.v2_get_tasks(...)
client.v2.get_tasks(...)
right?
Pull Request Summary
Description
Please include a summary of the changes. Please also include the relevant context and motivation. List any dependencies and assumptions that are required for this change.
Added client for V2 endpoints and utility function
v2_get_tasks
. Updated requirements and python version to >=3.8 to support the new client.How did you test your code?
Which of the following have you done to test your changes? Please describe the tests that you ran to verify your changes.
tests/
for the newly implemented methodstests/
to cover changes made to existing methodsAdded tests for
v2_get_tasks
andv2.get_task
- leaving commented until they can pass for other users.Checklist
Please make sure all items in this checklist have been fulfilled before sending your PR out for review!
_version.py
(unless this PR only updates the documentation).