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

Lookups fail on courts' own citation strings #61

Open
anseljh opened this issue Nov 17, 2022 · 2 comments · May be fixed by #62
Open

Lookups fail on courts' own citation strings #61

anseljh opened this issue Nov 17, 2022 · 2 comments · May be fixed by #62

Comments

@anseljh
Copy link
Member

anseljh commented Nov 17, 2022

For example, looking up "W.D. Wash." fails to find wawd, even though "W.D. Wash." is that court's citation_string.

When I add the exact same value as the court's own citation_string to the test examples, that test fails. A line with "W.D. Wash." is inserted as an example:

    {
        "case_types": [],
        "citation_string": "W.D. Wash.",
        "court_url": "http://www.wawd.uscourts.gov/",
        [...]
        "examples": [
            "W.D. Wash.",
            "United States District Court Western Distict of Washington At Seattle",
            "United States District Court For The Western Division of Washington",
            "United States District Court Westhern District"
        ],
        "id": "wawd",
        [...]
}
Testing Supreme Court of the Territory of Washington ... √
F...F.......
======================================================================
FAIL: test_all_example (__main__.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 56, in test_all_example
    self.assertIn(
AssertionError: 'wawd' not found in [] : Failure to find wawd in W.D. Wash.

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

----------------------------------------------------------------------
Ran 12 tests in 26.630s

FAILED (failures=2)
Testing W.D. Wash. ... %                                                          

I ran into this trying to convert Brad Heath's format (e.g., here) to a courts-db id.

@mlissner
Copy link
Member

Yeah, this seems like a fairly easy fix.

anseljh added a commit that referenced this issue Nov 18, 2022
@anseljh anseljh linked a pull request Nov 18, 2022 that will close this issue
@anseljh
Copy link
Member Author

anseljh commented Nov 23, 2022

Eh, don't merge this yet. I'm making some changes.

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 a pull request may close this issue.

2 participants