feat(indexers): add framework for default hooks#140
Open
lukeroantreeONS wants to merge 1 commit intomainfrom
Open
feat(indexers): add framework for default hooks#140lukeroantreeONS wants to merge 1 commit intomainfrom
lukeroantreeONS wants to merge 1 commit intomainfrom
Conversation
…ed as part of the package
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Add framework for flexible, common hooks to be provided as part of the package
✨ Summary
Introduces a
hookssubmodule withinindexersto provide robust, flexible hooks to the user to cover common pre- and post-processing tasks, and provide a base class should an advanced user want to implement custom ones.Note: this does not remove the ability of a user to define a hook function themselves, without relying on the base class, as is currently the recommended approach.
📜 Changes Introduced
hook_factorydefines base classes and shared utilitiesdefault_hookscontains particular flexible pre- or post-processing hooks we offer as part of the package✅ Checklist
terraform fmt&terraform validate)🔍 How to Test
uv builddist/classifai<version>.whlwith any optional dependencies you want to test withtest.pyfile as described below:uv run test.py; confirm it runs successfully, and thequery_textcolumn in the output is all capitalised.methodparameter within theCapitalisationStandardisingHookobject initialisation