diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6838316..ae479a6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | pip install -U pip - pip install -r requirements.txt + pip install ".[dev]" - name: Lint with ruff run: | ruff check diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1b51b0..a02e413 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | pip install -U pip - pip install -r requirements.txt + pip install ".[dev]" - name: Run all tests run: | pytest . diff --git a/README.md b/README.md index 551d8d4..d19c0ae 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,19 @@ export SLACK_APP_TOKEN= #### Initializing the project +**Using Slack CLI:** + +```sh +slack create my-bolt-python-custom-step --template slack-samples/bolt-python-custom-step-template +cd my-bolt-python-custom-step +``` + +**Using git:** + ```sh git clone https://github.com/slack-samples/bolt-python-custom-step-template.git my-bolt-python-custom-step cd my-bolt-python-custom-step +slack init ``` #### Setup your python virtual environment @@ -98,7 +108,7 @@ source .venv/bin/activate # for Windows OS, .\.venv\Scripts\Activate instead sh #### Install dependencies ```sh -pip3 install -r requirements.txt +pip3 install ".[dev]" ``` diff --git a/pyproject.toml b/pyproject.toml index 1c0a283..cb12e7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,17 @@ +[project] +name = "bolt-python-custom-step-template" +version = "0.1.0" +dependencies = [ + "slack-bolt==1.28.0", +] + +[project.optional-dependencies] +dev = [ + "pytest==9.0.3", + "ruff==0.15.12", + "slack-cli-hooks<1.0.0", +] + [tool.ruff] line-length = 125 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2556880..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -slack-bolt==1.28.0 -pytest==9.0.3 -ruff==0.15.12