Add automated test suite, CI, and dev workflow (+ bug-026 matcher fix)#31
Open
PiratesIRC wants to merge 2 commits into
Open
Add automated test suite, CI, and dev workflow (+ bug-026 matcher fix)#31PiratesIRC wants to merge 2 commits into
PiratesIRC wants to merge 2 commits into
Conversation
Commits the previously-uncommitted v1.26.1511211 release (version bump across plugin.json/plugin.py/fuzzy_matcher.py + the numeric-sibling guard for same-prefix numbered channels, bug-021) alongside a new matcher fix. bug-026: FuzzyMatcher.calculate_similarity returned different scores depending on whether rapidfuzz was installed. The rapidfuzz path uses 1 - distance/max(len); the pure-Python fallback used (len1+len2-distance)/(len1+len2). At threshold 95 this flipped the match decision (Fox Sports 1 vs 2: 0.917 vs 0.958). The fallback now matches rapidfuzz exactly. Production runs the rapidfuzz path, so live behavior is unchanged; only the no-rapidfuzz fallback was corrected. fuzzy_matcher bumped to 26.161.2350. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First automated coverage for the plugin (102 tests). fuzzy_matcher runs with no Django; tests/conftest.py stubs Django + the Dispatcharr ORM so plugin.py's pure helpers import in isolation. Cases are regression locks derived from the documented bug history. - tests/: fuzzy matching/normalization, plugin helpers, channel-DB schema, version sync - .github/workflows/ci.yml: py_compile + version-sync + DB-validate + pytest - .githooks/pre-commit: fast local gate (opt in via core.hooksPath) - scripts/: standalone version-sync and DB validators (shared by CI + hook) - docs/DEVELOPMENT.md: full dev-workflow documentation - .gitignore: track requirements-dev.txt; ignore per-version doc sprawl and the local docs/history/ archive Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Adds the project's first automated test suite, CI, and developer tooling — plus a matcher correctness fix surfaced by the new tests. The repo is the Dispatcharr Plugin Hub distribution source, so this establishes a safety net between commits and users pulling code.
Commits
release: v1.26.1511211 + bug-026 matcher path parity fixFuzzyMatcher.calculate_similarityreturned different scores depending on whetherrapidfuzzwas installed — rapidfuzz uses1 - distance/max(len), the pure-Python fallback used(len1+len2-distance)/(len1+len2). At threshold 95 this flipped the match decision (Fox Sports 1vsFox Sports 2: 0.917 vs 0.958). The fallback now matches rapidfuzz exactly. Production runs the rapidfuzz path, so live behavior is unchanged — only the no-rapidfuzz fallback was corrected.fuzzy_matcherbumped to26.161.2350.test: add automated test suite, CI, pre-commit gate, and dev docstests/(102 passing): fuzzy matching/normalization,plugin.pypure helpers (via a Django-stubbingconftest.py), channel-database schema validation, and version sync. Cases are regression locks derived from the documented bug history..github/workflows/ci.yml: py_compile + version-sync + database validation + pytest on every push/PR..githooks/pre-commit: fast local gate (opt in viagit config core.hooksPath .githooks).scripts/: standalone version-sync and database validators, shared by CI and the hook.docs/DEVELOPMENT.md: full dev-workflow documentation..gitignore/.gitattributes: trackrequirements-dev.txt, ignore per-version doc sprawl + the localdocs/history/archive, force LF on the shell hook.Test plan
pip install -r requirements-dev.txtpython -m pytest -q-> 102 passedpython scripts/check_version_sync.pyandpython scripts/validate_databases.py-> pass🤖 Generated with Claude Code