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

Configuring with pyproject.toml #1436

Merged

Conversation

WilliamBergamin
Copy link
Contributor

Summary

This PR is an extension of #bolt-996 and aims to follow its spirit. It introduces changes that make the pyproject.toml file the default configuration file for python-slack-sdk

The setup.py file is now used as support for "legacy" commands in this project

Requirements File Format pattern is used to import test dependencies. This creates a clear distinction between the project dependencies and the development dependencies.

Category

  • 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

  • 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.

@WilliamBergamin WilliamBergamin added the enhancement M-T: A feature request for new functionality label Nov 29, 2023
@WilliamBergamin WilliamBergamin self-assigned this Nov 29, 2023
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef883ad) 85.59% compared to head (69b73eb) 85.44%.

❗ Current head 69b73eb differs from pull request most recent head dc6c2e6. Consider uploading reports for the commit dc6c2e6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
- Coverage   85.59%   85.44%   -0.15%     
==========================================
  Files         111      111              
  Lines       12128    12113      -15     
==========================================
- Hits        10381    10350      -31     
- Misses       1747     1763      +16     

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

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.

Nice! You can merge this after verifying the test.pypi.org works with it

@seratch seratch added this to the 3.26.1 milestone Nov 30, 2023
@seratch
Copy link
Member

seratch commented Nov 30, 2023

@WilliamBergamin An external contribution #1435 to add PyPy support etc. was merged. Can you update this PR accordingly?

Copy link
Contributor

@Jamim Jamim left a comment

Choose a reason for hiding this comment

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

Hello @WilliamBergamin,
I've found a few inclusions of slack_bolt to this PR which, I suppose, are not intentional.

pyproject.toml Outdated Show resolved Hide resolved
scripts/build_pypi_package.sh Outdated Show resolved Hide resolved
WilliamBergamin and others added 2 commits November 30, 2023 10:23
Co-authored-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
Co-authored-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
@WilliamBergamin
Copy link
Contributor Author

@Jamim thanks a lot for the review, got some good catches 💯

@WilliamBergamin
Copy link
Contributor Author

WilliamBergamin commented Nov 30, 2023

I realized this morning that this PR may change the behavior of of the pip show slack-sdk command

previously

Name: slack-sdk
Version: 3.26.0
Summary: The Slack API Platform SDK for Python
Home-page: https://github.com/slackapi/python-slack-sdk
Author: Slack Technologies, LLC
Author-email: opensource@slack.com
License: MIT
Location: /experiments/python_func_handler_mvp/env_3_11_2/lib/python3.11/site-packages
Requires: 
Required-by: slack-bolt

New

Name: slack-sdk
Version: 3.26.0
Summary: The Slack API Platform SDK for Python
Home-page: 
Author: 
Author-email: "Slack Technologies, LLC" <opensource@slack.com>
License: MIT
Location: experiments/python_func_handler_mvp/env_3_11_2/lib/python3.11/site-packages
Requires: 
Required-by: slack-bolt

I'm not sure how developers may use this command but these changes could change their flow
@seratch let me know if the output of this command needs to be maintained, I believe it can be done by adding some fields in a setup.cfg file (this can also be added in a follow up PR)

@seratch
Copy link
Member

seratch commented Dec 1, 2023

@seratch let me know if the output of this command needs to be maintained, I believe it can be done by adding some fields in a setup.cfg file (this can also be added in a follow up PR)

@WilliamBergamin Yeah, we should keep those metadata too. Can you make the changes for the compatibility?

@WilliamBergamin
Copy link
Contributor Author

WilliamBergamin commented Dec 1, 2023

@seratch I've added the necessary changes to maintain the behavior of the pip show slack-sdk command

here is the output

Name: slack-sdk
Version: 3.26.0b1
Summary: The Slack API Platform SDK for Python
Home-page: https://github.com/slackapi/python-slack-sdk
Author: Slack Technologies, LLC
Author-email: opensource@slack.com
License: MIT
Location: /Users/env_3.11.2/lib/python3.11/site-packages
Requires: 
Required-by: 

I've also deployed to https://test.pypi.org/project/slack-sdk I believe the deploy behavior is maintained

@seratch seratch modified the milestones: 3.26.1, 3.26.2 Dec 4, 2023
@WilliamBergamin WilliamBergamin merged commit 69638bf into slackapi:main Dec 6, 2023
10 checks passed
@WilliamBergamin WilliamBergamin deleted the pyproject-toml-configuration branch December 6, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants