-
Notifications
You must be signed in to change notification settings - Fork 3
Part 2 of plugin refactor #377
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
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (60.64%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
==========================================
+ Coverage 56.63% 57.03% +0.40%
==========================================
Files 55 56 +1
Lines 4953 4955 +2
Branches 431 447 +16
==========================================
+ Hits 2805 2826 +21
+ Misses 2120 2086 -34
- Partials 28 43 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR advances COMPASS’s plugin architecture by introducing a centralized plugin registry, refactoring ordinance plugins into more generic base classes, and enabling prompt-driven collector/extractor implementations to reduce duplicated extraction logic across technologies.
Changes:
- Added a plugin registry (
PLUGIN_REGISTRY+register_plugin) and migrated the processing runner to resolve plugins via the registry. - Refactored ordinance plugin framework to support prompt-chain collectors/extractors and centralized configuration/validation.
- Updated threaded cleaned-text writing to be driven by per-plugin file output registration, and adjusted unit tests/docs accordingly.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
compass/plugin/registry.py |
Introduces plugin registration and the global plugin registry used by the runner. |
compass/plugin/ordinance.py |
Adds generalized ordinance plugin base + prompt-driven collector/extractor implementations; registers cleaned output filenames. |
compass/plugin/interface.py |
Renames/splits plugin base responsibilities (filtered pipeline base separated from ordinance-specific parsing). |
compass/plugin/base.py |
Adds JURISDICTION_DATA_FP hook and a base validate_plugin_configuration entrypoint. |
compass/plugin/__init__.py |
Re-exports new plugin framework symbols and registry utilities. |
compass/scripts/process.py |
Switches from hardcoded extractor registry to PLUGIN_REGISTRY for tech→plugin resolution. |
compass/services/threaded.py |
Makes cleaned text outputs configurable via CLEANED_FP_REGISTRY keyed by plugin tech. |
compass/validation/content.py |
Extends chunk-validation callback signature to support prompt-driven validation calls. |
compass/utilities/jurisdictions.py |
Removes TX water districts CSV from default registry (now added via plugin registration). |
compass/extraction/wind/plugin.py |
Migrates wind plugin to OrdinanceExtractionPlugin and registers it. |
compass/extraction/wind/ordinance.py |
Converts wind ordinance collectors/extractors to prompt-driven implementations. |
compass/extraction/solar/plugin.py |
Migrates solar plugin to OrdinanceExtractionPlugin and registers it. |
compass/extraction/solar/ordinance.py |
Converts solar ordinance collectors/extractors to prompt-driven implementations. |
compass/extraction/small_wind/plugin.py |
Migrates small-wind plugin to OrdinanceExtractionPlugin and registers it. |
compass/extraction/small_wind/ordinance.py |
Converts small-wind ordinance collectors/extractors to prompt-driven implementations. |
compass/extraction/water/plugin.py |
Registers the TX water rights plugin and supplies its jurisdiction dataset path. |
compass/extraction/__init__.py |
Temporarily imports plugins to force registration via side effects. |
compass/__init__.py |
Temporarily imports plugins at package import time to force registration. |
docs/source/conf.py |
Updates Sphinx crossrefs and adds nitpick ignores for moved/changed symbols. |
tests/python/unit/services/test_services_threaded.py |
Updates cleaned-file writer tests for the new registry-driven output behavior. |
tests/python/unit/plugin/test_plugin_ordinances.py |
Updates ordinance plugin validation tests for the new ordinance plugin base classes. |
Generalized plugin classes a little bit as well as add prompt-driven plugin implementations. Also added a plugin registry.
This PR brings us about 90% of the way to the full plugin architecture. We are now also in a position where we can easily implement 1-shot extraction