Detect pyproject.toml changes and automatically run `poetry install` if needed
See original GitHub issueWhen using Stack (Haskell) and Cargo (Rust), if you manually add a new dependency in package.yaml or Cargo.toml respectively, then the next invocation of stack test
or cargo test
will detect the change and install the new dependency, whereas poetry run pytest
could fail on the dependency missing. It would be great if Poetry could auto-detect the change instead of having to manually run poetry install
again. Of course, for an individual user, it’s easy to go through the poetry add
interface instead, but it’s more problematic when working on a team since other people won’t immediately know after git pull
whether there were updates requiring a poetry install
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Basic usage | Documentation | Poetry - Python dependency ...
The pyproject.toml file is what is the most important here. This will orchestrate your project and its dependencies. For now, it looks like...
Read more >Dependency Management With Python Poetry
With the install command, Poetry checks your pyproject.toml file for dependencies then resolves and installs them. The resolving part is ...
Read more >Poetry Advance - Python Biella Group
It functions similarly to install, with the distinction that version numbers in .lock will NOT be obeyed. If newer versions of the packages...
Read more >How To Install Poetry to Manage Python Dependencies on ...
Poetry is a dependency manager for Python that is also capable of building and packaging your Python projects for distribution. As a dependency ......
Read more >Poetry issue with pyproject.toml "Poetry could not find a ...
Ok, I already figured it out, I was not on the same folder. I just had to change of directory to get inside...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve achieved this behavior with a
Makefile
:but I would be in favor of
poetry
doing this automatically.@PavlosMelissinos, the behavior is still the same as of v0.12.17 - no warning or automatic install:
Then edit files to add a dependency:
Compare with Cargo for Rust:
Then edit to add a dependency: