docs: clarify install vs update command differences#10713
Open
abdullahmujahidali wants to merge 4 commits intopython-poetry:mainfrom
Open
docs: clarify install vs update command differences#10713abdullahmujahidali wants to merge 4 commits intopython-poetry:mainfrom
abdullahmujahidali wants to merge 4 commits intopython-poetry:mainfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideClarifies Poetry CLI docs for install vs update by adding guidance on when to use each, explicitly stating that update both refreshes the lockfile and installs dependencies, and noting that update does not modify pyproject.toml. Sequence diagram for poetry update behavior on lockfile and environmentsequenceDiagram
actor User
participant Poetry_CLI
participant pyproject_toml
participant poetry_lock
participant Environment
User->>Poetry_CLI: poetry update
Poetry_CLI-->>pyproject_toml: Read version_constraints
Poetry_CLI-->>poetry_lock: Read_existing_locked_versions
Poetry_CLI->>Poetry_CLI: Resolve_dependencies_to_latest_compatible_versions
Poetry_CLI-->>poetry_lock: Write_updated_locked_versions
Poetry_CLI--x pyproject_toml: Do_not_modify_constraints
Poetry_CLI->>Environment: Install_updated_dependencies
Environment-->>User: Updated_packages_available
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Related Documentation No published documentation to review for changes on this repository. |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `docs/cli.md:480` </location>
<code_context>
+{{% note %}}
+**When to use `install` vs `update`:**
+- Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve and create it if missing).
+ This is what you run after cloning a project or when you want reproducible installs.
+- Use `poetry update` when you want to update dependencies to their latest versions (within constraints)
</code_context>
<issue_to_address>
**suggestion (typo):** Clarify the phrase "or resolve and create it if missing" to avoid ambiguity.
The parenthetical is grammatically ambiguous: "resolve" has no clear object, and "it" refers to `poetry.lock`, which isn’t something you typically "resolve." Please reword to make it explicit, e.g. "(or resolve dependencies and create it if missing)" or "(or resolve dependencies and create the lock file if it’s missing)."
```suggestion
- Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve dependencies and create the lock file if it’s missing).
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
radoering
reviewed
Feb 7, 2026
docs/cli.md
Outdated
| {{% note %}} | ||
| **When to use `install` vs `update`:** | ||
| - Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve dependencies and create the lock file if it's missing). | ||
| This is what you run after cloning a project or when you want reproducible installs. |
Member
There was a problem hiding this comment.
Especially for reproducible installs sync is even better than install.
docs/cli.md
Outdated
| **When to use `install` vs `update`:** | ||
| - Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve dependencies and create the lock file if it's missing). | ||
| This is what you run after cloning a project or when you want reproducible installs. | ||
| - Use `poetry update` when you want to update dependencies to their latest versions (within constraints) |
Member
There was a problem hiding this comment.
Which constraints? Maybe, better:
Suggested change
| - Use `poetry update` when you want to update dependencies to their latest versions (within constraints) | |
| - Use `poetry update` when you want to update dependencies to their latest versions (within the constraints from the `pyproject.toml`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Check List
Resolves: #4117
Summary
Improves documentation for
installandupdatecommands to address common user confusion.Changes
installsection explaining when to useinstallvsupdateupdatealso installs packages after updating the lock fileupdatedoes not modifypyproject.tomlQuestions Addressed (from issue)
update, are new packages installed?-> Yespyproject.tomlupdated? -> No, onlypoetry.lockinstall? → After cloning or for reproducible installsSummary by Sourcery
Clarify the behavioral differences between the
poetry installandpoetry updatecommands in the CLI documentation.Documentation:
poetry installversuspoetry update, emphasizing reproducible installs and lockfile creation.poetry updateboth updates and installs dependencies while only modifyingpoetry.lockand notpyproject.toml, and direct users toaddfor changing version constraints.