feat: Add header-based column detection for PACER docket descriptions (#239)#1682
Open
Rithboss wants to merge 3 commits intofreelawproject:mainfrom
Open
feat: Add header-based column detection for PACER docket descriptions (#239)#1682Rithboss wants to merge 3 commits intofreelawproject:mainfrom
Rithboss wants to merge 3 commits intofreelawproject:mainfrom
Conversation
- Implement _detect_description_column_index() method in DocketReport - Add _detect_description_column_index_history() method in DocketHistoryReport - Update docket entry parsing to use detected column index instead of hardcoding - Support both 2-column and 3-column table layouts - Add comprehensive unit tests for column detection - Add bounds checking and fallback to last cell if index is out of bounds - Cache the detected column index to avoid repeated detection - Add logging for debugging column detection This addresses issue freelawproject#239 by making the parser more robust to variations in table structure across different courts.
… support - Add unit tests for client code functionality in PacerSession - Test client code inclusion in login requests - Test that client code is optional and properly omitted when not provided - Add documentation for using client code with examples - Update CHANGES.md to document the feature This addresses issue freelawproject#192 by providing comprehensive test coverage and documentation for the existing client code support in PacerSession.
|
|
for more information, see https://pre-commit.ci
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.
Fixes #239
This PR adds header-based column detection for PACER docket descriptions, making the parser more robust to variations in table structure across different courts.
Problem
Different courts use different table layouts for docket entries:
The existing code hardcoded the assumption that descriptions would always be in column index 2, which fails for 2-column layouts.
Solution
Testing
Changes