Conversation
- config.py: inline single-use variable in __post_init__ - sct.py: remove redundant list() conversion, simplify else branch - gliclass_adapter.py: flatten nested conditionals, remove dead code - ner.py: hoist GLiNER-only tag set out of chunk loop - resources.py: simplify resolve_language with early returns - special.py: pre-compile punctuation regex at module level - test_sct.py: deduplicate config construction in test helpers
- Add tests/test_functional.py: 69 end-to-end tests across 13 categories covering all backends (ONNX, Torch, GLiNER, ensemble, Presidio), replacement modes (placeholder, reversible, synthetic), PII detection, document classification, and config edge cases - Fix gliclass_adapter.py: use `labels=` parameter (not `candidate_labels`) and handle list[list[dict]] return format from ZeroShotClassificationPipeline - Fix ner.py: use `model_name=` parameter (not `model_path`) for GLiNERRecognizer to match current presidio-analyzer API - Update test_sct.py mock to match corrected GLiClass return format
- GLiNER ONNX graceful fallback: catch FileNotFoundError when model.onnx missing (GLiNER #314), fall back to PyTorch with warning instead of crash - Wrap Presidio anonymize return in AnonymizeResult for uniform typing - Extract TEST_NER_MODELS to tests/conftest.py (DRY) - Derive ENTITY_TAGS from ENTITY_TYPE_MAP (auto-sync) - Use importlib.util.find_spec for side-effect-free package detection - Remove dead else:pass branch, redundant decorators - Bump version to 0.6.1
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.
Summary
candidate_labels=→labels=, updated return format parsing (list[list[dict]])model_path=→model_name=, addedthreshold=passthroughmodel.onnxmissing (GLiNER #314) — no more user-facing crashtests/test_functional.py) covering 100% of feature surface with real model inferenceconftest.py, derived entity tags from production map, side-effect-free package detectionBugs fixed (3)
check_classify_document=True) was completely broken — GLiClass API mismatchFileNotFoundErrorfor most models — now falls back gracefullyTest results
test_sct.py(unit)test_functional.py(e2e)Test plan