Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces a configurable document-selection strategy for ordinance extraction to better support handling multiple retrieved documents, including new “concat all” and “merge features” behaviors.
Changes:
- Added
DocSelectionMethodenum and updatedOrdinanceExtractionPlugin.parse_docs_for_structured_data()to dispatch among multiple multi-doc extraction modes. - Implemented multi-doc “concat” and “merge” paths (including prohibition-aware merging and prioritization logic).
- Updated one-shot config/docs and added extensive unit tests covering the new multi-doc behaviors and helper utilities.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/python/unit/plugin/test_plugin_ordinances.py | Adds unit tests for selection-method dispatch plus merge/priority/source-filling helpers. |
| examples/water_rights_demo/one-shot/plugin_config.yaml | Updates example config to use the new doc_selection_method option. |
| compass/scripts/download.py | Adjusts ordinance-doc logging and tweaks sorting fallback date tuple. |
| compass/plugin/ordinance.py | Introduces DocSelectionMethod, new multi-doc parse modes, and merge/prioritization helpers. |
| compass/plugin/one_shot/base.py | Replaces allow_multi_doc_extraction with doc_selection_method config parsing and docs. |
| compass/plugin/init.py | Re-exports DocSelectionMethod. |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (56.71%) 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 #418 +/- ##
==========================================
+ Coverage 54.99% 55.74% +0.74%
==========================================
Files 62 62
Lines 5870 5983 +113
Branches 546 568 +22
==========================================
+ Hits 3228 3335 +107
+ Misses 2593 2589 -4
- Partials 49 59 +10
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:
|
More flexible handling for multiple retrieved documents