-
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(search): search all repositories #9949
Conversation
Reviewer's Guide by SourceryThis pull request changes the search command to search across all repositories configured for the project, rather than just PyPI. It also adds tests to verify the new functionality and updates the documentation to reflect the changes. Sequence diagram for the updated search command flowsequenceDiagram
actor User
participant CLI
participant RepositoryPool
participant Repository1
participant Repository2
User->>CLI: poetry search <tokens>
activate CLI
CLI->>RepositoryPool: search(tokens)
activate RepositoryPool
RepositoryPool->>Repository1: search(tokens)
Repository1-->>RepositoryPool: results1
RepositoryPool->>Repository2: search(tokens)
Repository2-->>RepositoryPool: results2
RepositoryPool-->>CLI: combined results
deactivate RepositoryPool
CLI->>CLI: deduplicate results
CLI-->>User: display unique results
deactivate CLI
Class diagram for the updated repository search functionalityclassDiagram
class AbstractRepository {
<<abstract>>
+search(query: str|list[str]): list[Package]
}
class Repository {
+search(query: str|list[str]): list[Package]
}
class LegacyRepository {
+search(query: str|list[str]): list[Package]
}
class PyPiRepository {
+search(query: str|list[str]): list[Package]
}
class RepositoryPool {
+search(query: str|list[str]): list[Package]
}
AbstractRepository <|-- Repository
AbstractRepository <|-- LegacyRepository
AbstractRepository <|-- PyPiRepository
RepositoryPool o-- AbstractRepository
note for AbstractRepository "Updated search method signature"
note for RepositoryPool "Searches across all repositories"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
9b213c9
to
b6d55e7
Compare
@sourcery-ai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Deploy preview for website ready! ✅ Preview Built with commit c6224c8. |
@sourcery-ai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ef6ad5e
to
b93cb20
Compare
Building on top of python-poetry#9132, this change ensures that search command searches all non-explicit repositories configured for a project. Resolves: python-poetry#2446
This change converts the output of the `search` command to use a table instead of unstructured output. Additionally, the output now also includes source name.
b93cb20
to
7a7890f
Compare
Building on top of #9132, this change ensures that search command searches all non-explicit repositories configured for a project.
Resolves: #2446
Testing
Using pipx
pipx install --suffix=@9949 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/9949/head'
Using a container (podman | docker)
Summary by Sourcery
Search all repositories configured for a project.
New Features:
Fixes:
Tests:
Docs: