From f64663fb97005066fcb21e278fe509adc69a94d7 Mon Sep 17 00:00:00 2001 From: "@zimeg" Date: Thu, 13 Mar 2025 12:14:19 -0700 Subject: [PATCH 1/2] docs: include packaging script steps in the maintainers guide --- .github/maintainers_guide.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/maintainers_guide.md b/.github/maintainers_guide.md index 5e1fd2ae6..31ea65621 100644 --- a/.github/maintainers_guide.md +++ b/.github/maintainers_guide.md @@ -65,7 +65,9 @@ our continuous integration](https://github.com/slackapi/python-slack-sdk/blob/v3 ## Tasks -### Testing (Unit Tests) +### Testing + +#### Unit Tests When you make changes to this SDK, please write unit tests verifying if the changes work as you expected. You can easily run all the tests and formatting/linter with the below scripts. @@ -89,7 +91,7 @@ $ ./scripts/run_unit_tests.sh tests/web/test_web_client.py You can rely on GitHub Actions builds for running the tests on a variety of Python runtimes. -### Testing (Integration Tests with Real Slack APIs) +#### Integration Tests with Real Slack APIs This project also has integration tests that verify the SDK works with the Slack API platform. As a preparation, you need to set [the required env variables](https://github.com/slackapi/python-slack-sdk/blob/main/integration_tests/env_variable_names.py) properly. You don't need to setup all of them if you just want to run some of the tests. Commonly, `SLACK_SDK_TEST_BOT_TOKEN` and `SLACK_SDK_TEST_USER_TOKEN` are used for running `WebClient` tests. @@ -105,6 +107,24 @@ Run a specific integration test: $ ./scripts/run_integration_tests.sh integration_tests/web/test_async_web_client.py ``` +#### Develop Locally + +If you want to test the package locally you can. + +1. Build the package locally + - Run + ```bash + scripts/build_pypi_package.sh + ``` + - This will create a `.whl` file in the `./dist` folder +2. Use the built package + - Example `/dist/slack_sdk-1.2.3-py2.py3-none-any.whl` was created + - From anywhere on your machine you can install this package to a project with + ```bash + pip install /dist/slack_sdk-1.2.3-py2.py3-none-any.whl + ``` + - It is also possible to include `/dist/slack_sdk-1.2.3-py2.py3-none-any.whl` in a [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file + ### Generating Documentation See [`/docs/README`](https://github.com/slackapi/python-slack-sdk/blob/main/docs/README.md) for information on editing documentation pages. From 1426318371c9d209101914b746e94cbc4108a83e Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Thu, 13 Mar 2025 14:10:34 -0700 Subject: [PATCH 2/2] style: reference the filepath of the whl using pip at notations Co-authored-by: William Bergamin --- .github/maintainers_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/maintainers_guide.md b/.github/maintainers_guide.md index 31ea65621..57ad6b689 100644 --- a/.github/maintainers_guide.md +++ b/.github/maintainers_guide.md @@ -123,7 +123,7 @@ If you want to test the package locally you can. ```bash pip install /dist/slack_sdk-1.2.3-py2.py3-none-any.whl ``` - - It is also possible to include `/dist/slack_sdk-1.2.3-py2.py3-none-any.whl` in a [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file + - It is also possible to include `slack_sdk @ file:////dist/slack_sdk-1.2.3-py2.py3-none-any.whl` in a [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file ### Generating Documentation