From da14ff73254915ee6d2a8085b2401bb78730b6d8 Mon Sep 17 00:00:00 2001 From: "slack-samples[bot]" <169401055+slack-samples[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 14:03:37 +0000 Subject: [PATCH] chore(block-kit): prefer pyproject over requirements --- .github/MAINTAINERS_GUIDE.md | 2 +- .github/workflows/test.yml | 2 +- block-kit/pyproject.toml | 33 +++++++++++++++++++++++++++++++++ block-kit/requirements.txt | 4 ---- 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 block-kit/pyproject.toml delete mode 100644 block-kit/requirements.txt diff --git a/.github/MAINTAINERS_GUIDE.md b/.github/MAINTAINERS_GUIDE.md index aed110c..a986899 100644 --- a/.github/MAINTAINERS_GUIDE.md +++ b/.github/MAINTAINERS_GUIDE.md @@ -26,7 +26,7 @@ $ cd bolt-python-examples $ cd block-kit # Navigate to an example to change $ python -m venv .venv $ source .venv/bin/activate -(.venv) $ pip install -r requirements.txt +(.venv) $ pip install -e ".[dev]" (.venv) $ pip install /path/to/python-slack-sdk/dist/slack_sdk-*-py2.py3-none-any.whl --force-reinstall ``` diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfbebdf..c46e6e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Run tests run: | cd "${{ matrix.showcase }}" - pip install -r requirements.txt + pip install -e ".[dev]" ruff check ruff format --diff --check mypy ./**/*.py diff --git a/block-kit/pyproject.toml b/block-kit/pyproject.toml new file mode 100644 index 0000000..2e6dc44 --- /dev/null +++ b/block-kit/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "bolt-python-examples-block-kit" +version = "0.1.0" +description = "Block Kit examples for Bolt for Python" +readme = "README.md" +requires-python = ">=3.10" +dependencies = [ + "slack_sdk==3.41.0", +] + +[project.optional-dependencies] +dev = [ + "mypy==2.0.0", + "pytest==9.0.3", + "ruff==0.15.12", +] + +test = [ + "pytest==9.0.3", +] + +[tool.setuptools.packages.find] +include = ["src*"] + +[tool.ruff] + +[tool.ruff.lint] + +[tool.ruff.format] diff --git a/block-kit/requirements.txt b/block-kit/requirements.txt deleted file mode 100644 index 7a6e621..0000000 --- a/block-kit/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -mypy==2.0.0 -pytest==9.0.3 -ruff==0.15.12 -slack_sdk==3.41.0