Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ export SLACK_APP_TOKEN=<your-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
Expand All @@ -98,7 +107,7 @@ source .venv/bin/activate # for Windows OS, .\.venv\Scripts\Activate instead sh
#### Install dependencies

```sh
pip3 install -r requirements.txt
pip3 install ".[dev]"
```

</details>
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
[project]
name = "bolt-python-custom-step-template"
version = "0.1.0"
dependencies = [
"slack-bolt==1.28.0",
]

[project.optional-dependencies]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ issue: Optional dependencies aren't supported with the CLI at the moment:

https://github.com/slackapi/slack-cli/blob/defbe8f9712ca4f3f294a37d1a1b337d9d0a8525/internal/runtime/python/python.go#L377

And including slack-cli-hooks elsewhere not in "dependencies" causes the init command to not install this... It's a CLI bug I think, but we shouldn't merge this until a workaround exists I think. We can perhaps use the "dev" convention as another installation target but I'm less familiar with this best practice.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Here's a testing command I tried:

$ lack create my-bolt-python-custom-step --template slack-samples/bolt-python-custom-step-template -b ale-consolidate-pyprojecttoml -v
$ cd my-bolt-python-custom-step
$ lack run
...
🚫 The hook runtime executable was not found (runtime_not_found)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch ❤️

dev = [
"pytest==9.0.3",
"ruff==0.15.12",
"slack-cli-hooks<1.0.0",
]

[tool.ruff]
line-length = 125

Expand Down
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.