-
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
feat(source/show): notify when PyPI is implicit #9974
Conversation
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
|
86c1938
to
21525c5
Compare
21525c5
to
e89675e
Compare
Add a notice when all sources are listed and PyPI is implicitly enabled.
e89675e
to
353dc1f
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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: