Skip to content

Rmp plugin#445

Draft
ColbyNREL wants to merge 6 commits into
mainfrom
rmp_plugin
Draft

Rmp plugin#445
ColbyNREL wants to merge 6 commits into
mainfrom
rmp_plugin

Conversation

@ColbyNREL
Copy link
Copy Markdown
Collaborator

Adding an example folder for RMPs. This will house the RMP schema as well as the configs that I ran when extracting information related to geothermal restrictions.

Also fixed a problem where I was not able to run a document but the solution does not seem super clean. @ppinchuk would love some ideas for a better way to solve the problem. The five problems fixed during this were:
Problem Symptom
Bad TESSDATA_PREFIX Tesseract can't load language data, fails immediately
OCR kwargs not stripped from non-OCR path Non-OCR reads crash with unexpected kwarg
OCR kwargs not forwarded to read_pdf_ocr DPI/timeout settings silently ignored
Default DPI too high Per-page timeout exceeded on 165-page scan
WinError 32 not suppressed Pages silently drop OCR results on Windows

ColbyNREL and others added 4 commits May 26, 2026 13:42
Add support for extracting geothermal restrictions from BLM RMPs: introduce a large rmp_jurisdictions.csv dataset and register it in the jurisdictions registry. Add compass/utilities/finalize_rmp.py to compile parsed ordinance CSVs, save run metadata, format outputs (qualitative/quantitative), apply empirical adjustments, and generate a run summary. Update one-shot components to include geothermal-specific output columns (location, restriction_type, geothermal_applicability, ammendment). Include an rmp_demo example with configuration, schema, local docs template, plugin config, and a small jurisdictions.csv to demonstrate running the one-shot extraction workflow.
Allow schema-based one-shot plugins to write extracted data via a configurable finalize module (default or "rmp"). Fix PDF reading/OCR: strip unexpected kwargs before calling pdftotext, forward image/convert kwargs into OCR path, and patch pytesseract cleanup on Windows to suppress OSErrors when removing temp files. Adjust finalize_rmp import to match renamed helper, and add local_activate.{sh,bat} plus register the Windows activation script in pixi.toml to support loading a local .env.
* Adjust cleanup function

* Minor formatting

* Better description

* More precise message

* Add docs

* update local docs

* Minor plugin update

* Add default dir

* Update dep

* Remove unused module

* Plugins now specify their own output columns

* Add extra columns to rmp output

* Add `load_dotenv` call

* Fix CSV

* Use out cols for parser

* Fix command call

* Fix tests

* Wire-up plugin

* Update tech

* Rename file

* Minor bug fix

* Update README

* Doc fix

* Extra columns taken from schema instead
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 72.00000% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.23%. Comparing base (75cc04c) to head (efd1b45).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
compass/services/cpu.py 28.57% 10 Missing ⚠️
compass/_cli/finalize.py 33.33% 4 Missing ⚠️
compass/plugin/one_shot/base.py 85.00% 3 Missing ⚠️
compass/plugin/interface.py 81.81% 2 Missing ⚠️
compass/plugin/one_shot/components.py 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (72.00%) 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     #445      +/-   ##
==========================================
+ Coverage   60.86%   61.23%   +0.37%     
==========================================
  Files          77       77              
  Lines        6843     6896      +53     
  Branches      670      675       +5     
==========================================
+ Hits         4165     4223      +58     
+ Misses       2561     2556       -5     
  Partials      117      117              
Flag Coverage Δ
unittests 61.23% <72.00%> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants