-
Notifications
You must be signed in to change notification settings - Fork 2
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
DEVEXP-340/DEVEXP-471 - automated CI/CD release to PyPI and async library replacement #29
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.
LGTM except the name of an action
.github/workflows/release-sdk.yaml
Outdated
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Release Python SDK |
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 the name should be Setup Python
?
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.
Good catch. Fixed
params=request_data.query_params | ||
) | ||
else: | ||
response = await self.http_session.request( |
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.
This part of code looks very similar to the lines 25-31. Maybe you can streamline this by using a single call and handling the content type inline
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.
This part of code looks very similar to the lines 25-31. Maybe you can streamline this by using a single call and handling the content type inline
I've done it on purpose. Since this is a async context I prefer to keep it simple
sinch/core/adapters/httpx_adapter.py
Outdated
params=request_data.query_params | ||
) | ||
|
||
if response.content: |
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.
This logic can be rewritten in a more concise way and should manage exceptions when parsing the response
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've extracted that logic into method (with exception handling) and used it on both transport implementations.
It's not very concise though. I prefer readability here.
* DEVEXP-340/DEVEXP-471 - automated CI/CD release to PyPI and async library replacement (#29) * DEVEXP-464 update verification API with backwards compat (#36) * fix: recursion error (#38) * [SMS] service plan id version of the API (#17) * relese: bump the package version
https://tickets.sinch.com/browse/DEVEXP-340
I've also removed old and unused GH action for white source.
Since DEVEXP-471 was a fallout of DEVEXP-340, I've decided to merge those two tickets into one.