-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(source/show): notify when PyPI is implicit #9974
Merged
abn
merged 1 commit into
python-poetry:main
from
abn:command/sources/show-implicit-pypi-notice
Jan 10, 2025
Merged
feat(source/show): notify when PyPI is implicit #9974
abn
merged 1 commit into
python-poetry:main
from
abn:command/sources/show-implicit-pypi-notice
Jan 10, 2025
Conversation
This file contains 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
Reviewer's Guide by SourceryThis pull request introduces a notification feature to inform users when PyPI is implicitly enabled as a primary source in the 'source show' command. It adds a new method to handle this notification and updates the command logic to trigger it appropriately. Additionally, a test case is added to ensure the notification works as expected. Sequence diagram for source show command with implicit PyPI notificationsequenceDiagram
actor User
participant CLI as Poetry CLI
participant ShowCmd as SourceShowCommand
participant Pool as Poetry Pool
User->>CLI: poetry source show
CLI->>ShowCmd: handle()
ShowCmd->>ShowCmd: get_sources()
alt no sources configured
ShowCmd->>ShowCmd: notify_implicit_pypi()
ShowCmd->>Pool: has_repository('pypi')
Pool-->>ShowCmd: true/false
ShowCmd-->>User: Display implicit PyPI notice
else sources exist
loop for each source
ShowCmd->>ShowCmd: Display source info
end
alt PyPI not explicitly configured
ShowCmd->>ShowCmd: notify_implicit_pypi()
ShowCmd->>Pool: has_repository('pypi')
Pool-->>ShowCmd: true/false
ShowCmd-->>User: Display implicit PyPI notice
end
end
Class diagram for updated SourceShowCommandclassDiagram
class SourceShowCommand {
+handle(): int
+notify_implicit_pypi(): None
}
note for SourceShowCommand "Added notify_implicit_pypi() method
to handle PyPI implicit source notification"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
abn
force-pushed
the
command/sources/show-implicit-pypi-notice
branch
from
January 7, 2025 00:43
86c1938
to
21525c5
Compare
abn
force-pushed
the
command/sources/show-implicit-pypi-notice
branch
from
January 9, 2025 15:17
21525c5
to
e89675e
Compare
Secrus
approved these changes
Jan 10, 2025
Add a notice when all sources are listed and PyPI is implicitly enabled.
abn
force-pushed
the
command/sources/show-implicit-pypi-notice
branch
from
January 10, 2025 14:36
e89675e
to
353dc1f
Compare
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.
Add a notice when all sources are listed and PyPI is implicitly enabled.
Summary by Sourcery
Add a notification to inform users when PyPI is implicitly enabled as a primary source and update tests to verify this behavior.
New Features:
Tests: