-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
DocketReport: handle 'Date Entered' option #227
Open
johnhawkinson
wants to merge
5
commits into
freelawproject:main
Choose a base branch
from
johnhawkinson:2018.06.07.date_entered
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DocketReport: handle 'Date Entered' option #227
johnhawkinson
wants to merge
5
commits into
freelawproject:main
from
johnhawkinson:2018.06.07.date_entered
Conversation
This file contains 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
flake8 juriscraper/pacer/docket_report.py juriscraper/pacer/docket_report.py:96:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:142:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:166:80: E501 line too long (83 > 79 characters) juriscraper/pacer/docket_report.py:168:80: E501 line too long (88 > 79 characters) juriscraper/pacer/docket_report.py:174:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:176:80: E501 line too long (95 > 79 characters) juriscraper/pacer/docket_report.py:184:80: E501 line too long (86 > 79 characters) juriscraper/pacer/docket_report.py:198:80: E501 line too long (91 > 79 characters) juriscraper/pacer/docket_report.py:201:80: E501 line too long (98 > 79 characters) juriscraper/pacer/docket_report.py:206:80: E501 line too long (96 > 79 characters) juriscraper/pacer/docket_report.py:208:80: E501 line too long (110 > 79 characters) juriscraper/pacer/docket_report.py:212:80: E501 line too long (107 > 79 characters) juriscraper/pacer/docket_report.py:319:80: E501 line too long (82 > 79 characters) juriscraper/pacer/docket_report.py:336:80: E501 line too long (87 > 79 characters) juriscraper/pacer/docket_report.py:338:80: E501 line too long (92 > 79 characters) juriscraper/pacer/docket_report.py:366:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:483:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:684:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:695:80: E501 line too long (84 > 79 characters) juriscraper/pacer/docket_report.py:718:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:724:80: E501 line too long (96 > 79 characters) juriscraper/pacer/docket_report.py:728:15: E131 continuation line unaligned for hanging indent juriscraper/pacer/docket_report.py:754:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:794:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:797:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:893:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:912:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:931:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:947:80: E501 line too long (80 > 79 characters) juriscraper/pacer/docket_report.py:1057:1: E305 expected 2 blank lines after class or function definition, found 1
Use a constant, CELL_XPATH, for finding cells in the table Don't exclude header rows from `docket_entry_rows`. These lend clarity to the next commit.
A PACER docket report can be run with either 'Date Entered' or 'Date Filed' dates. Previous code assumed, roughly, "A date is a date," but that's not so. It's common for the date entered to lag the date filed by a day, and then that means different people who run the docket report with different values for that radio button would cause different dates to appear in the CL `date_filed` field. So here we check the column heading of the first column against several known choices, or we throw an exception if it doesn't make sense. We broaden the CELL_XPATH expression to include <th> as well as <td>, since in a few BK cases that's required. We also normalize the column heading whitespace with a helper function normalize_whitespace() that arguably could live elsewhere. There's some ambiguity about what 'Docket Date' means (is it filing or entering?), but since it only appers historically, we'll place it where we have always done so -- as the `date_filed`. This needs freelawproject/courtlistener#840 which adds support for the new `date_entered` field.
Can you pull out the pep8 stuff in a separate PR? I'm afraid I'll miss something with it all mixed together like this. |
Throw an assertion if it differs from the Date Entered column. But in the normal case, we'll get Date Filed from the first column and Date Entered from the end of the description's parenthetical note.
@johnhawkinson is this worth finishing? |
This is worth doing, yes, but I don't know where we'll prioritize it. If John does it, we'll merge it, but I don't think it's high on our list otherwise. |
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.
DocketReport: handle 'Date Entered' option
A PACER docket report can be run with either 'Date Entered' or 'Date
Filed' dates. Previous code assumed, roughly, "A date is a date,"
but that's not so.
It's common for the date entered to lag the date filed by a day, and
then that means different people who run the docket report with
different values for that radio button would cause different dates to
appear in the CL
date_filed
field.So here we check the column heading of the first column against
several known choices, or we throw an exception if it doesn't make
sense.
We broaden the CELL_XPATH expression to include
<th>
as well as<td>
,since in a few BK cases that's required.
We also normalize the column heading whitespace with a helper function
normalize_whitespace() that arguably could live elsewhere.
There's some ambiguity about what 'Docket Date' means (is it filing or
entering?), but since it only appears historically, we'll place it
where we have always done so -- as the
date_filed
.This needs freelawproject/courtlistener#840 which adds support for
the new
date_entered
field.