courts-db icon indicating copy to clipboard operation
courts-db copied to clipboard

Lookups fail on courts' own citation strings

Open anseljh opened this issue 2 years ago • 2 comments

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.

anseljh avatar Nov 17 '22 09:11 anseljh

Netlify deploy preview

https://deploy-preview-42201--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad) Details of bundle changes

Generated by :no_entry_sign: dangerJS against 4fd34ab8419315d9b70debb057e6791bfddfef2b

mui-bot avatar May 10 '24 22:05 mui-bot

Since this PR is inactive, I am closing it.

ZeeshanTamboli avatar Jun 30 '24 10:06 ZeeshanTamboli