Repository navigation
chore: replace requirements.txt with pyproject.toml dependencies - #71
Conversation
| [project] | ||
| name = "bolt-python-starter-template" | ||
| version = "0.1.0" | ||
| requires-python = ">=3.11" |
There was a problem hiding this comment.
note: I went with 3.11 because it's the min version our Workflow tests.
There was a problem hiding this comment.
We should probably use the latest version of python here and in the workflow tests
There was a problem hiding this comment.
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.
zimeg
left a comment
There was a problem hiding this comment.
@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 📠
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest==9.0.2", | ||
| "ruff==0.9.4", | ||
| ] |
There was a problem hiding this comment.
🪓 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.tomlorsetup.py), not by discoveringrequirements.txtfiles embedded in projects.
🔗 https://pip.pypa.io/en/latest/user_guide/#requirements-files
There was a problem hiding this comment.
Sure, I think it's safe to remove the requirements.txt.
WilliamBergamin
left a comment
There was a problem hiding this comment.
Thanks for working on this 💯
Similar comments as @zimeg non blocking though!
| @@ -1,3 +1,17 @@ | |||
| [project] | |||
| name = "bolt-python-starter-template" | |||
| version = "0.1.0" | |||
There was a problem hiding this comment.
Is 0.0.0 a common pattern? Is the idea that we will never bump the version going forward?
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest==9.0.2", | ||
| "ruff==0.9.4", | ||
| ] |
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.
|
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. |
Type of change
Summary
This pull request makes
pyproject.tomlthe single source of dependencies by adding a[project]section with adependenciesarray and removingrequirements.txt.Without a
[project]section,pip install -e .returns an error. The Slack CLI runs that same command when it finds apyproject.toml, so this also covers projects created withslack create.requirements.txtintodependenciesand adevextra forpytestandrufflisteners, so the editable install works with the flat project layoutpip install -e ".[dev]"in CI and the READMERequirements