Skip to content

chore: replace requirements.txt with pyproject.toml dependencies - #337

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-pyproject-dependencies
Oct 29, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-pyproject-dependencies

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Type of change

  • New feature
  • Bug fix
  • Documentation

Summary

This pull request makes pyproject.toml the single source of dependencies for each example, so developers install an example and its dev tools with one command: pip install -e ".[dev]".

The Slack CLI runs pip install -e . when it finds a pyproject.toml, so this also covers examples created with slack create --subdir.

  • Moves the pinned versions from each requirements.txt into dependencies and a dev extra for mypy, pytest, and ruff
  • Limits setuptools package discovery to src, so the editable install skips tests
  • Installs with pip install -e ".[dev]" in CI and the maintainers guide, and ignores the *.egg-info folder the editable install writes
  • Matches bolt-python-custom-step-template#69

Testing

  • Verified each of the 5 examples in a fresh Python 3.14 virtual environment: the install, ruff check, ruff format --check, mypy ., and pytest all succeed (84, 2, 3, and 3 tests passed, methods has no tests)

Notes

Requirements

  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@mwbrooks
mwbrooks marked this pull request as ready for review October 28, 2026 23:57
@mwbrooks
mwbrooks requested a review from a team as a code owner October 28, 2026 23:57

@zimeg zimeg left a comment

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.

📦 @mwbrooks One install command for every example is such a nice cleanup! Matches the custom step template too 🎁

Comment thread methods/pyproject.toml Outdated
version = "0.0.0"
requires-python = ">=3.10"
dependencies = [
"slack-cli-hooks==0.3.0",

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.

🌲 nit: The other examples spell this slack_cli_hooks with underscores. pip treats both the same, so this is only for consistency, no need to block on it!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks @zimeg! Fixed in c0e6c8e so every example spells it the same way.

@zimeg zimeg added update PR only - an update or maintenance is being made to an existing app dependencies Pull requests that update a dependency file labels Oct 29, 2026
@mwbrooks
mwbrooks merged commit 911c4c6 into main Oct 29, 2026
16 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-pyproject-dependencies branch October 29, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file update PR only - an update or maintenance is being made to an existing app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants