Skip to content
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

Merged
merged 11 commits into from
Oct 17, 2024

Conversation

650elx
Copy link
Contributor

@650elx 650elx commented Jun 3, 2024

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.

@650elx 650elx changed the title DEVEXP-340 - automated CI/CD release to PyPI DEVEXP-340/DEVEXP-471 - automated CI/CD release to PyPI and async library replacement Jun 26, 2024
Copy link

@Dovchik Dovchik left a 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

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Release Python SDK
Copy link

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?

Copy link
Contributor Author

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(
Copy link
Contributor

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

Copy link
Contributor Author

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

params=request_data.query_params
)

if response.content:
Copy link
Contributor

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

Copy link
Contributor Author

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.

@650elx 650elx changed the base branch from main to v2.0-next August 22, 2024 15:07
@650elx 650elx changed the base branch from v2.0-next to v1.1-next October 8, 2024 14:06
@650elx 650elx merged commit f054a88 into v1.1-next Oct 17, 2024
4 checks passed
650elx added a commit that referenced this pull request Dec 19, 2024
* 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
@asein-sinch asein-sinch deleted the automated_release branch February 25, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants