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

Replace Flask-Sockets with aiohttp for testing #1445

Merged

Conversation

Jamim
Copy link
Contributor

@Jamim Jamim commented Dec 24, 2023

Hello @seratch,
I hope you may find this PR useful.

Summary

Flask-Sockets is deprecated and it won't receive any fixes in the future, so it seems reasonable to replace it with some up-to-date library.
aiohttp has been chosen since it was already presented as an optional requirement.

These changes also:

  • move format checking for tests from run_validation.sh to setup.py
  • remove duplicated dependency installations from setup.py
  • add a codegen step on CI
  • force colors on CI

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

Best regards!

Flask-Sockets is deprecated and it won't receive any fixes in the future,
so it seems reasonable to replace it with some up-to-date library.
aiohttp has been chosen since it was already presented as an optional requirement.

These changes also:
  * move format checking for tests from run_validation.sh to setup.py
  * remove duplicated dependency installations from setup.py
  * add a codegen step on CI
  * force colors on CI
Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56f7127) 85.60% compared to head (e1ef5f0) 85.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1445      +/-   ##
==========================================
+ Coverage   85.60%   85.64%   +0.04%     
==========================================
  Files         111      111              
  Lines       12128    12128              
==========================================
+ Hits        10382    10387       +5     
+ Misses       1746     1741       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seratch seratch added this to the 3.26.2 milestone Dec 24, 2023
@seratch seratch self-assigned this Dec 24, 2023
@seratch seratch added tests M-T: Testing work only Version: 3x socket-mode labels Dec 24, 2023
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is amazing! No comments to add. Thank you so much for taking the time for it!

@seratch seratch merged commit ebdfe45 into slackapi:main Dec 24, 2023
12 checks passed
@seratch
Copy link
Member

seratch commented Dec 24, 2023

@WilliamBergamin you can follow this for your new project

@Jamim Jamim deleted the feature/replace-flask-sockets-with-aiohttp branch December 24, 2023 11:26
@WilliamBergamin
Copy link
Contributor

Yess definitely this is awesome work 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants