-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: update python api client #193
base: main
Are you sure you want to change the base?
Conversation
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 think it would make sense to release a major update to this client after the v4 core release given the changes we made to revised /version and /protocol endpoints.
We could potentially remove the deprecated functions that are marked iwth removed_in='3.0.0'
as part of the major update, but ones that haven't yet had a deprecated warning should get a new one before being removed entirely, just to try to keep the best user experience.
Some info and version compatibility table in the README also needs updating
Will do, I needed to make sure that I got all the code changes correctly first |
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.
From commit e3eaa7a I see you had considered renaming the static protected method _requires_api_version
to _requires_core_version
- I think you could safely do that as long as you fully update all references
Let me also test this locally before we merge it |
Now I think we are good to go |
Ok looks good to me 👍 |
So currently, aica.api_version()
# >>> Error getting version details! Expected a map of `signed_packages` to include `aica_api_server`: 'aica_api_server'
aica.core_version()
# >>> {'message': 'b\'{"online":true,"signed_packages":{},"entitlements":["aica_studio_access","is_aica_developer"]}\'. You have requested this URI [/api/version] but did you mean /api//version or /api/swagger.json or /api//v2/features ?'} Are those results expected and desired? Especially the second one seems weird to me EDIT: these results are due to the fact that I was using a custom core, i guess. With the v4.1.0 core version i get
which makes sense, but I'm still wondering why we get EDIT 2: |
I am unsure about the URL "parsing" that is happening with |
If we simply use an address like
While this client is intended for official releases, it would of course be nice to use it with internal pre-release builds that don't have valid package signatures. I'll add a check for that case to bypass the version requirement with a warning |
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.
For me this is good to go now. Sorry for the long delay and many additional changes but it's quite a good improvement!
python/CHANGELOG.md
Outdated
@@ -2,6 +2,7 @@ | |||
|
|||
Release Versions: | |||
|
|||
- [3.1.0](#300) |
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.
- [3.1.0](#300) | |
- [3.0.0](#300) |
python/README.md
Outdated
Use the following compatability table to determine which client version to use. | ||
|
||
| API server version | Matching Python client version | | ||
| AICA Core version | Matching Python client 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.
| AICA Core version | Matching Python client version | | |
| AICA Core version | Matching Python client version | |
Description
This PR updates the python API client to the most recently available api endpoints. I'm not 100% sure if I miss some decorators for
@_requires_api_version('>=X.Y.Z')
or@deprecated
or if we can even fully remove the deprecated endpoint, but appreciate if you give this a thought yourself. ThanksReview guidelines
Estimated Time of Review: 10 minutes
Checklist before merging: