-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Allow case-insensitive filename matching #8522
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
🎨 Allow case-insensitive filename matching #8522
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8522 +/- ##
==========================================
+ Coverage 87.55% 89.52% +1.97%
==========================================
Files 2007 1582 -425
Lines 78401 65462 -12939
Branches 1343 499 -844
==========================================
- Hits 68644 58608 -10036
+ Misses 9355 6724 -2631
+ Partials 402 130 -272
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
packages/models-library/src/models_library/api_schemas_storage/search_async_jobs.py
Show resolved
Hide resolved
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.
Pull Request Overview
This PR enhances the file search functionality to support case-insensitive filename matching using wildcards. The main implementation changes the filename pattern matching logic to compare both the filename and pattern in lowercase, enabling users to search for files regardless of case variations.
- Modified the
fnmatch
comparison in the search logic to perform case-insensitive matching - Added comprehensive test coverage for various case-insensitive pattern matching scenarios
- Renamed the search task constant for improved clarity
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
services/storage/src/simcore_service_storage/simcore_s3_dsm.py | Updated filename matching logic to convert both filename and pattern to lowercase for case-insensitive comparison |
services/storage/tests/unit/test_simcore_s3_dsm.py | Added comprehensive test cases covering case-insensitive matching for extensions, prefixes, and mixed-case patterns |
packages/models-library/src/models_library/api_schemas_storage/search_async_jobs.py | Changed task name from "files.search" to "files_search" (dot to underscore) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/models-library/src/models_library/api_schemas_storage/search_async_jobs.py
Show resolved
Hide resolved
@Mergifyio queue |
🟠 Waiting for conditions to match
|
🧪 CI InsightsHere's what we observed from your CI run for 32855b4. 🟢 All jobs passed!But CI Insights is watching 👀 |
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.
so insensitive!:-) thx
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.
🥳
|
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.
thanks!
What do these changes do?
This PR enhances the file search functionality to support case-insensitive filename matching using wildcards. The main implementation changes the filename pattern matching logic to compare both the filename and pattern in lowercase, enabling users to search for files regardless of case variations.
fnmatch
comparison in the search logic to perform case-insensitive matchingRelated issue/s
How to test
Dev-ops