Skip to content
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

Handle citation strings #62

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Handle citation strings #62

wants to merge 11 commits into from

Conversation

anseljh
Copy link
Member

@anseljh anseljh commented Nov 18, 2022

Closes #61

This didn't change on my local machine after running black, but GitHub demanded it. This is uglier. :(
@CLAassistant
Copy link

CLAassistant commented Nov 18, 2022

CLA assistant check
All committers have signed the CLA.

@mlissner mlissner requested a review from flooie November 18, 2022 01:12
@mlissner
Copy link
Member

Bill, I think it's our fault that there are conflicts here, since we didn't review it when it was clean. When you get this prioritized, can you plan to fix those for poor @anseljh, who's just trying to be a good contributor and doesn't deserve merge conflicts (not that any of us do, but, him less than us).

@anseljh
Copy link
Member Author

anseljh commented Dec 12, 2022

I think there may be a little more to it than that with the failing tests, unfortunately. @flooie, might be good to sync up some time this week.

@flooie
Copy link
Collaborator

flooie commented Dec 12, 2022

I’m happy to fix it. I wasn’t sure from the last comment to hold up or what not.

@anseljh
Copy link
Member Author

anseljh commented Dec 12, 2022

Thanks, Bill. Here's what I have failing locally now. Ping me if you'd like to talk after poking around a bit.

% python setup.py test
======================================================================
FAIL: test_all_example (tests.DataTest)
Can we extract the correct court id from string and date?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/anseljh/Code/courts-db/tests.py", line 57, in test_all_example
    self.assertIn(
AssertionError: 'akd' not found in ['akb'] : Failure to find akd in D. Alaska

======================================================================
FAIL: test_all_non_bankruptcy_examples (tests.ExamplesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/anseljh/Code/courts-db/tests.py", line 137, in test_all_non_bankruptcy_examples
    self.assertIn(court["id"], results, msg=f"Failed {example}")
AssertionError: 'akd' not found in [] : Failed D. Alaska

======================================================================
FAIL: test_bankruptcy_examples (tests.ExamplesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/anseljh/Code/courts-db/tests.py", line 148, in test_bankruptcy_examples
    self.assertIn(court["id"], results, msg=f"Failed {example}")
AssertionError: 'akb' not found in [] : Failed Bankr. D. Alaska

----------------------------------------------------------------------
Ran 12 tests in 12.674s

FAILED (failures=3)
Test failed: <unittest.runner.TextTestResult run=12 errors=0 failures=3>
error: Test failed: <unittest.runner.TextTestResult run=12 errors=0 failures=3>

@flooie
Copy link
Collaborator

flooie commented Dec 13, 2022

This looks like an issue caused by overlapping bankruptcy issues I bet it’ll be easy to fix.

@flooie
Copy link
Collaborator

flooie commented Dec 16, 2022

@anseljh - I'm reviewing this PR at the moment.

I've noticed what appear like extra .'s at the end of many regexes.
Del\.\s?Super\.\s?Ct\.\s?\. -> for Del. Super. Ct. with an extra whitespace as well. or more common

something like this for Alakaska, Iowa or Courts ending in numbers for example.

"S\\.\\s?D\\.\\s?Iowa\\." -> "S.D. Iowa"
"Ky\\.\\s?Circ\\.\\s?Ct\\.\\s?, 2\\."

These are atleast contributing to the failing tests and I'm not sure if they were intentional or not. Ive found about 20 or so. I assume they aren't but I wanted to double check.

@anseljh
Copy link
Member Author

anseljh commented Dec 16, 2022

Yeah, I agree, those don't look right, @flooie.

@flooie
Copy link
Collaborator

flooie commented Dec 16, 2022

So, There are a couple of issues, but they all seem a bit minor. Thanks for getting this rolling @anseljh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pull Requests
Development

Successfully merging this pull request may close these issues.

Lookups fail on courts' own citation strings
4 participants