Bump dependencies and add a test suite#9
Merged
Merged
Conversation
Upgrade all locked dependencies to their latest compatible releases and tighten the direct-dependency floors in pyproject.toml to match the versions now tested (scikit-learn 1.9, sentence-transformers 5.6, pytest 9.1, ruff 0.15.20, ty 0.0.55). Add the project's first automated test suite to guard against behavior changes from this and future bumps: - Make FuzzyClusterer's encoder injectable (keyword-only `encoder` param plus an Encoder Protocol) so the fuzzy path can be tested with a deterministic fake encoder, no model download required. Default behavior is unchanged. - Unit tests for preprocess_text, ExactClusterer, and FuzzyClusterer that assert structure and invariants rather than exact floats or label ids, so they survive future dependency upgrades. - An opt-in real-model integration test marked `slow`, excluded from the default run and CI; it skips when the model is unreachable. - pytest configuration that skips slow tests by default, a CI workflow running ruff/ty/pytest on Python 3.12 and 3.13, and a README note.
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.
Bumps all dependencies and adds the project's first automated test suite.
Dependencies
uv lock --upgrade).pyproject.tomlto match the versions now tested: scikit-learn 1.9, sentence-transformers 5.6, pytest 9.1, ruff 0.15.20, ty 0.0.55.Test suite
FuzzyClusterergains a keyword-onlyencoderparameter plus anEncoderProtocol, so the fuzzy path can be tested with a deterministic fake encoder and no model download. Default behavior is unchanged.preprocess_text,ExactClusterer, andFuzzyClustererthat assert structure and invariants (membership, bounds, determinism) rather than exact floats or label ids, so they survive future dependency bumps.slow, excluded from the default run and CI; it skips when the model is unreachable.Verification
ruff checkclean,ty checkclean, 16 default tests pass, and the slow real-model test passes against the actual model.