-
Notifications
You must be signed in to change notification settings - Fork 117
feat: support glob and regex patterns in repodata queries #2036
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
base: main
Are you sure you want to change the base?
Conversation
Enable QueryExecutor to handle glob patterns (e.g., `foo*`) and regex patterns (e.g., `^numpy.*$`) in package names. Previously, these specs were silently dropped. The implementation stores pattern specs separately and expands them by matching against all package names from the subdirs before fetching records. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a new `rattler search` command that demonstrates the glob and regex pattern support in repodata queries. Users can search for packages using: - Exact names: `rattler search python` - Glob patterns: `rattler search "python*"` - Regex patterns: `rattler search "^numpy-.*$"` Example usage: rattler search "openssl*" -c conda-forge --limit 5 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7794e33 to
264107e
Compare
Add a doctest example to Gateway.query showing how to use glob patterns with MatchSpec(exact_names_only=False). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
||
| // If we have pattern specs, we need to wait for all subdirs to be loaded | ||
| // first so we can get all package names to match against | ||
| if !self.pending_pattern_specs.is_empty() { |
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.
I think it would be nicer if we can do this concurrently. This now blocks everything else meaning that if you have a channel that takes much longer we are essentially wasting time.
When a subdir resolves we query its names for matching packages.
I can also give this a go if that helps?
Enable QueryExecutor to handle glob patterns (e.g.,
foo*) and regex patterns (e.g.,^numpy.*$) in package names. Previously, these specs were silently dropped.The implementation stores pattern specs separately and expands them by matching against all package names from the subdirs before fetching records.
closes #1723
Description
This is part 1 of improving pixi search: Xref prefix-dev/pixi#378