Skip to content

Commit 92d8516

Browse files
chore: rename requirements files to improve Dependabot dependency scoping (#1510)
1 parent ea21484 commit 92d8516

16 files changed

Lines changed: 42 additions & 42 deletions

.github/maintainers_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ If you make changes to `slack_bolt/adapter/*`, please verify if it surely works
7171

7272
```sh
7373
# Install all optional dependencies
74-
$ pip install -r requirements/adapter.txt
75-
$ pip install -r requirements/adapter_testing.txt
74+
$ pip install -r requirements/adapter_dev.txt
75+
$ pip install -r requirements/test_adapter.txt
7676

7777
# Set required env variables
7878
$ export SLACK_SIGNING_SECRET=***

.github/workflows/ci-build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
run: |
4949
pip install -U pip
5050
pip install -U .
51-
pip install -r requirements/tools.txt
51+
pip install -r requirements/dev_tools.txt
5252
- name: Type check synchronous modules
5353
run: mypy --config-file pyproject.toml --exclude "async_|/adapter/"
5454
- name: Install async and adapter dependencies
5555
run: |
56-
pip install -r requirements/async.txt
57-
pip install -r requirements/adapter.txt
56+
pip install -r requirements/async_dev.txt
57+
pip install -r requirements/adapter_dev.txt
5858
- name: Type check all modules
5959
run: mypy --config-file pyproject.toml
6060

@@ -88,15 +88,15 @@ jobs:
8888
run: |
8989
pip install -U pip
9090
pip install .
91-
pip install -r requirements/testing_without_asyncio.txt
91+
pip install -r requirements/test.txt
9292
- name: Run tests without aiohttp
9393
run: |
9494
pytest tests/slack_bolt/ --junitxml=reports/test_slack_bolt.xml
9595
pytest tests/scenario_tests/ --junitxml=reports/test_scenario.xml
9696
- name: Install adapter dependencies
9797
run: |
98-
pip install -r requirements/adapter.txt
99-
pip install -r requirements/adapter_testing.txt
98+
pip install -r requirements/adapter_dev.txt
99+
pip install -r requirements/test_adapter.txt
100100
- name: Run tests for HTTP Mode adapters
101101
run: |
102102
pytest tests/adapter_tests/ \
@@ -105,14 +105,14 @@ jobs:
105105
--junitxml=reports/test_adapter.xml
106106
- name: Install async dependencies
107107
run: |
108-
pip install -r requirements/async.txt
108+
pip install -r requirements/async_dev.txt
109109
- name: Run tests for Socket Mode adapters
110110
run: |
111111
# Requires async test dependencies
112112
pytest tests/adapter_tests/socket_mode/ --junitxml=reports/test_adapter_socket_mode.xml
113113
- name: Install all dependencies
114114
run: |
115-
pip install -r requirements/testing.txt
115+
pip install -r requirements/test_async.txt
116116
- name: Run tests for HTTP Mode adapters (ASGI)
117117
run: |
118118
# Requires async test dependencies
@@ -155,9 +155,9 @@ jobs:
155155
run: |
156156
pip install -U pip
157157
pip install .
158-
pip install -r requirements/adapter.txt
159-
pip install -r requirements/testing.txt
160-
pip install -r requirements/adapter_testing.txt
158+
pip install -r requirements/adapter_dev.txt
159+
pip install -r requirements/test_async.txt
160+
pip install -r requirements/test_adapter.txt
161161
- name: Run all tests for codecov
162162
run: |
163163
pytest --cov=./slack_bolt/ --cov-report=xml

AGENTS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Then wire it into `BoltContext` (`slack_bolt/context/context.py`) and `AsyncBolt
183183
1. Create `slack_bolt/adapter/<framework>/`
184184
2. Add `__init__.py` and `handler.py` (or `async_handler.py` for async frameworks)
185185
3. The handler converts the framework's request to `BoltRequest`, calls `app.dispatch()`, and converts `BoltResponse` back
186-
4. Add the framework to `requirements/adapter.txt` with version constraints
186+
4. Add the framework to `requirements/adapter_dev.txt` with version constraints
187187
5. Add adapter tests in `tests/adapter_tests/` (sync) or `tests/adapter_tests_async/` (async)
188188

189189
### Adding a Kwargs-Injectable Argument
@@ -205,12 +205,12 @@ The core package has a **single required runtime dependency**: `slack_sdk` (defi
205205

206206
**`requirements/` directory structure:**
207207

208-
- `async.txt` -- async runtime deps (`aiohttp`, `websockets`)
209-
- `adapter.txt` -- all framework adapter deps (Flask, Django, FastAPI, etc.)
210-
- `testing.txt` -- test runner deps (`pytest`, `pytest-asyncio`, includes `async.txt`)
211-
- `testing_without_asyncio.txt` -- test deps without async (`pytest`, `pytest-cov`)
212-
- `adapter_testing.txt` -- adapter-specific test deps (`moto`, `boddle`, `sanic-testing`)
213-
- `tools.txt` -- dev tools (`mypy`, `flake8`, `black`)
208+
- `async_dev.txt` -- async runtime deps (`aiohttp`, `websockets`)
209+
- `adapter_dev.txt` -- all framework adapter deps (Flask, Django, FastAPI, etc.)
210+
- `test_async.txt` -- test runner deps (`pytest`, `pytest-asyncio`, includes `async_dev.txt`)
211+
- `test.txt` -- test deps without async (`pytest`, `pytest-cov`)
212+
- `test_adapter.txt` -- adapter-specific test deps (`moto`, `boddle`, `sanic-testing`)
213+
- `dev_tools.txt` -- dev tools (`mypy`, `flake8`, `black`)
214214

215215
When adding a new dependency: add it to the appropriate `requirements/*.txt` file with version constraints, never to `pyproject.toml` `dependencies` (unless it's a core runtime dep, which is very rare).
216216

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# pip install -r requirements/adapter.txt
2-
# NOTE: any of async ones requires pip install -r requirements/async.txt too
1+
# pip install -r requirements/adapter_dev.txt
2+
# NOTE: any of async ones requires pip install -r requirements/async_dev.txt too
33
# used only under slack_bolt/adapter
44
boto3<=2
55
bottle>=0.12,<1

requirements/async.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

requirements/async_dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pip install -r requirements/async_dev.txt
2+
aiohttp>=3,<4
3+
websockets<16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# pip install -r requirements/testing_without_asyncio.txt
1+
# pip install -r requirements/test.txt
22
pytest<8.5
33
pytest-cov>=7.1.0,<8; python_version>="3.14" # only needed to evaluate coverage on the latest supported python version
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pip install -r requirements/adapter_testing.txt
1+
# pip install -r requirements/test_adapter.txt
22
moto>=3,<6 # For AWS tests
33
docker>=5,<8 # Used by moto
44
boddle>=0.2.9,<0.3 # For Bottle app tests

requirements/test_async.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# pip install -r requirements/test_async.txt
2+
-r test.txt
3+
-r async_dev.txt
4+
pytest-asyncio<2;

0 commit comments

Comments
 (0)