Skip to content

Lookups fail on courts' own citation strings #61

@anseljh

Description

@anseljh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions