freelawproject / reporters-db

A database of court reporters, tests and other experiments
BSD 2-Clause "Simplified" License
91 stars 33 forks source link

Adding treaties #118

Closed bbernicker closed 2 years ago

bbernicker commented 2 years ago

In response to issue #48 I offered to add support for the treaty sources to reporters-db. This PR does so for the treaty sources in Indigo Book T6.

Treaty sources are stored in either the laws.json or reporters.json file depending on which style they more closely resemble. Regardless of where they are stored, they all have cite_type "treaty." The test.py and README.rst files have been updated to recognize "treaty" as a valid cite_type. All examples for all treaties are from Court Listener except for the example for Pan-Am. Treaty Series, which is from a law review article.

I omitted two T6 sources from this PR (Statutes at Large and LEXIS) because they are not exclusive to treaties. Both are already present in reporters-db, and I added a note to the Statutes at Large one explaining that citations there could be to treaties. LEXIS citations are already their own specialty type.

Also, the regex and example for Treaty Series (T.S.) begin with a white space. This is to prevent false positives where T.S. is part of the name of another reporter, but it is an inelegant solution. I tried various lookbehinds and negative assertions, but because they are at the beginning of the string they cause problems.

bbernicker commented 2 years ago

Sorry I am new to GitHub and somehow messed this up. It should only have the two commits "Groundwork for new treaties" and "Added treaties." I will close this and submit a new PR with only thosw two now.

mlissner commented 2 years ago

I feel like everybody does whatever this mistake was all the time. I still do.