Skip to content

Commit 64e6a80

Browse files
Updated maintainer_guide (#1225)
* Updated maintainer_guide to recommend using bash scripts over python scripts * Added improvements based on feedback
1 parent c9dc6aa commit 64e6a80

File tree

1 file changed

+36
-14
lines changed

1 file changed

+36
-14
lines changed

.github/maintainers_guide.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $ pyenv rehash
4040

4141
Then, you can create a new [Virtual Environment](https://docs.python.org/3/tutorial/venv.html) specific to the Python version you just installed by running:
4242

43-
```
43+
```bash
4444
$ python -m venv env_3.9.6
4545
$ source env_3.9.6/bin/activate
4646
```
@@ -53,22 +53,33 @@ do so after you are done working in this project. To come back to development
5353
work for this project again in the future, `cd` into this project directory and
5454
run `source env_3.9.6/bin/activate` again.
5555

56-
The last step is to install this project's dependencies; to do so, check out [how
57-
we configure GitHub Actions to install dependencies for this project for use in
58-
our continuous integration](https://github.com/slackapi/python-slack-sdk/blob/main/.github/workflows/ci-build.yml#L26-L30). You can also run `./scripts/run_validation.sh` to install the dependencies and run the unit tests in one command!
56+
The last step is to install this project's dependencies and run all unit tests; to do so, you can run
57+
```bash
58+
$ ./scripts/run_validation.sh
59+
```
5960

61+
Also check out [how
62+
we configure GitHub Actions to install dependencies for this project for use in
63+
our continuous integration](https://github.com/slackapi/python-slack-sdk/blob/v3.17.0/.github/workflows/ci-build.yml#L28-L32).
6064
## Tasks
6165

6266
### Testing (Unit Tests)
6367

64-
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 by running the command. The `validate` command runs Flake8 (static code analyzer), Black (code formatter), and unit tests in the `tests` directory for you.
68+
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.
69+
70+
Run all the unit tests, code formatter, and code analyzer:
71+
```bash
72+
$ ./scripts/run_validation.sh
73+
```
6574

75+
Run all the unit tests (no formatter nor code analyzer):
6676
```bash
67-
python setup.py validate # run all
77+
$ ./scripts/run_unit_tests.sh
78+
```
6879

69-
# run a single test
70-
python setup.py validate \
71-
--test-target tests/web/test_web_client.py
80+
Run a specific unit test:
81+
```bash
82+
$ ./scripts/run_unit_tests.sh tests/web/test_web_client.py
7283
```
7384

7485
You can rely on GitHub Actions builds for running the tests on a variety of Python runtimes.
@@ -77,20 +88,31 @@ You can rely on GitHub Actions builds for running the tests on a variety of Pyth
7788

7889
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.
7990

91+
Run all integration tests:
8092
```bash
81-
python setup.py integration_tests # run all
93+
$ ./scripts/run_integration_tests.sh
94+
```
8295

83-
# run a single test
84-
python setup.py integration_tests \
85-
--test-target integration_tests/web/test_web_client.py
96+
Run a specific integration test:
97+
```bash
98+
$ ./scripts/run_integration_tests.sh integration_tests/web/test_async_web_client.py
8699
```
87100

88101
### Generating Documentation
89102

90103
The documentation is generated from the source and templates in the `docs-src` directory. The generated documentation
91104
gets committed to the repo in `docs` and also published to a GitHub Pages website.
92105

93-
You can generate the documentation by running `./scripts/docs.sh`.
106+
You can generate and preview the **SDK document pages** by running
107+
```bash
108+
$ ./scripts/docs.sh
109+
$ open docs/index.html
110+
```
111+
112+
Similarly you can generate and preview the **API documents for `slack_sdk` package modules** by running
113+
```bash
114+
$ ./scripts/generate_api_docs.sh
115+
```
94116

95117
### Releasing
96118

0 commit comments

Comments
 (0)