-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add fuzzy search and general CLI improvements #94
Conversation
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 don't quite understand the need to use pagination just to check if items trail with /.
How slow is fuzzy? Compared to say, running a regex post query.
You absolutely want some self-tests for this type of function.
I'm not entirely sure which part you are referring to, but I'm gonna guess that you mean in function like
Fuzzy search is on par with the old "simple search" in terms of speed, which is not super fast 😕 I have not tested with a regex post query specifically. The point of implementing fuzzy was just to be a slightly better simple search (which was just a substring search that runs in linear time (
Sounds like a good idea. Should probably review and add more tests to the test suite soon 😅 |
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.
Looks good. Please add tests in regard to the features added.
Contents
The What
This pull request introduces several enhancements and new features to the
NGPIris
project, particularly focusing on the CLI and HCP handling functionalities. The most notable changes include adding new search capabilities, improving object listing options, and updating dependencies.Enhancements to CLI functionalities:
NGPIris/cli/__init__.py
: Enhanced the_list_objects_generator
function to support filtering by path and file-only options. Added new options to thelist_objects
command for pagination and file-only output. Introduced a newfuzzy_search
command utilizing the RapidFuzz library for improved search capabilities. [1] [2] [3] [4] [5] [6] [7]Improvements to HCP handling:
NGPIris/hcp/hcp.py
: Updated thelist_objects
method to include filtering by path and file-only options. Refined thedelete_objects
anddelete_folder
methods to handle non-existent objects more gracefully and ensure proper deletion of folders with subfolders. Added a newfuzzy_search_in_bucket
method for fuzzy search functionality using RapidFuzz. [1] [2] [3] [4] [5] [6]Dependency updates:
pyproject.toml
: Updated the project version to5.2.0.dev1
and added theRapidFuzz
library as a new dependency for enhanced search capabilities.The Why
Mostly quality of life changes
This update is:
Tests
pytest
pytype