Skip to content

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

Merged
mwbrooks merged 6 commits into
mainfrom
mwbrooks-pyproject-project-section
Oct 19, 2026
Merged

mwbrooks merged 6 commits into
mainfrom
mwbrooks-pyproject-project-section

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Feb 20, 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 by adding a [project] section with a dependencies array and removing requirements.txt.

Without a [project] section, pip install -e . returns an error. The Slack CLI runs that same command when it finds a pyproject.toml, so this also covers projects created with slack create.

  • Moves the pinned versions from requirements.txt into dependencies and a dev extra for pytest and ruff
  • Limits setuptools package discovery to listeners, so the editable install works with the flat project layout
  • Installs with pip install -e ".[dev]" in CI and the README

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 self-assigned this Feb 20, 2026
@mwbrooks
mwbrooks requested a review from a team as a code owner February 20, 2026 23:09
@mwbrooks mwbrooks added the bug Something isn't working label Feb 20, 2026
Comment thread pyproject.toml
[project]
name = "bolt-python-starter-template"
version = "0.1.0"
requires-python = ">=3.11"

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.

note: I went with 3.11 because it's the min version our Workflow tests.

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.

We should probably use the latest version of python here and in the workflow tests

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.

Sure. 3.15?

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.

On second look, #93 already added 3.15 to the CI test matrix, so we're testing against the latest. I kept requires-python = ">=3.11" because raising it to 3.15 would block installs on the 3.11-3.14 versions CI still tests.

@mwbrooks mwbrooks changed the title fix: update pyproject.toml with project section chore: update pyproject.toml with project section Feb 21, 2026
@mwbrooks mwbrooks changed the title chore: update pyproject.toml with project section chore: update pyproject.toml with [project] section Feb 21, 2026
@mwbrooks mwbrooks added enhancement New feature or request and removed bug Something isn't working labels Feb 21, 2026

@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 LGTM and thanks for bringing this project to latest standards oncemore 🚀 ✨

I'm leaving a comment about requirements.txt that might be related to this changeset but shouldn't block changes otherwise! Thanks for finding these update 📠

Comment thread pyproject.toml
Comment on lines +9 to +13
[project.optional-dependencies]
dev = [
"pytest==9.0.2",
"ruff==0.9.4",
]

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.

🪓 question: Can we remove requirements.txt alongside these additions?

IIRC the pyproject.toml is recommended as standard for dependencies?

It’s important to be clear that pip determines package dependencies using the project metadata (typically in pyproject.toml or setup.py), not by discovering requirements.txt files embedded in projects.

🔗 https://pip.pypa.io/en/latest/user_guide/#requirements-files

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.

➕

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.

Sure, I think it's safe to remove the requirements.txt.

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.

Commit 3f638f7

@WilliamBergamin WilliamBergamin left a comment

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.

Thanks for working on this 💯

Similar comments as @zimeg non blocking though!

Comment thread pyproject.toml Outdated
@@ -1,3 +1,17 @@
[project]
name = "bolt-python-starter-template"
version = "0.1.0"

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.

Why not 0.0.0?

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.

Is 0.0.0 a common pattern? Is the idea that we will never bump the version going forward?

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.

Commit 3f638f7

Comment thread pyproject.toml
Comment on lines +9 to +13
[project.optional-dependencies]
dev = [
"pytest==9.0.2",
"ruff==0.9.4",
]

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.

➕

WilliamBergamin and others added 3 commits October 16, 2026 15:17
Remove requirements.txt so pyproject.toml is the single source of
dependencies, per review. Sync the pinned versions with the ones
requirements.txt had, install with `pip install -e ".[dev]"` in CI and
the README, and limit setuptools package discovery to `listeners` so
the editable install works with the flat layout. Set the version to
0.0.0 to match bolt-python-search-template.
@mwbrooks mwbrooks changed the title chore: update pyproject.toml with [project] section chore: replace requirements.txt with pyproject.toml dependencies Oct 19, 2026
@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks for the reviews @zimeg and @WilliamBergamin 🙇🏻

I've left our workflow tests running the original Python version range. I can follow-up with a new PR that brings it up to only 3.15 if @WilliamBergamin would like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants