Skip to content

Texas RRC Pg 2 Fix - #52

Merged
rtl9148 merged 3 commits into
mainfrom
dev_fix_pg2_texas_rrc
Sep 24, 2026
Merged

rtl9148 merged 3 commits into
mainfrom
dev_fix_pg2_texas_rrc

Conversation

@rtl9148

@rtl9148 rtl9148 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Add New Cleaning function to forward-fill previously detected lease_field or lease_operator vals into subsequent null instances. Utilizes the 'options' context of cleaning functions to save previous vals found.
This solution will resolve the issues with Page 2 extracted fields IF we modify our Page 2 splitter to have multiple pages (all the pages for a given Page 2 instance) in each record.

Issue: CATALOG-Historic-Records/orphaned-wells-ui#604

@rtl9148 rtl9148 self-assigned this Sep 23, 2026
@MichaelPesce

Copy link
Copy Markdown
Contributor

@rtl9148 looks fine. One thing to consider is how we will process the documents in the correct order. I believe the current batch processing may send documents from the GCS buckets in an undetermined order. So if we process using the current OGRRE method, we wouldn't necessarily have lease-value-less documents following the correct lease value.

@rtl9148

rtl9148 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

@rtl9148 looks fine. One thing to consider is how we will process the documents in the correct order. I believe the current batch processing may send documents from the GCS buckets in an undetermined order. So if we process using the current OGRRE method, we wouldn't necessarily have lease-value-less documents following the correct lease value.

Hey Mike,
I've been looking into this and I think it should not be an issue. I see that we when we upload a lot of records(like for uploading an entire record_group), we do some batch downloading of documents. The stack flow for this looks like:
_process_batch_documents() -> _process_one_batch() -> _prepare_document_for_batch()
In the last function _prepare_document_for_batch() , we download the entire record, convert it into some png files _convert_pdf_bytes_to_png_files(), and in that function it looks like we assign some order to those png files so when we recombine them, they are in the same order the original pdf files were in.
I guess to summarize, it is fine if the RECORDS in a record_group are processed in a random order, but the pages WITHIN a record will need to be processed in the same order they are in within the pdf and I believe we are doing that. I plan to test this though on some multi-page records with a separate backend PR in the staging environment to verify.

@rtl9148
rtl9148 merged commit 90cf840 into main Sep 24, 2026
8 checks passed
@MichaelPesce

Copy link
Copy Markdown
Contributor

ahh OK that makes sense. thanks for clarifying @rtl9148

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.

2 participants