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

EWCR not EWCRC #169

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ds_caselaw_utils/data/court_names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@
end_year: 2022
selectable: false
listable: false
- code: "EWCRC"
- code: "EWCR"
name: "Crown Court"
link: https://www.judiciary.uk/courts-and-tribunals/crown-court/
ncn: \[(\d{4})\] (EWCRC) (\d+)
param: "ewcrc"
ncn: \[(\d{4})\] (EWCR) (\d+)
param: "ewcr"
start_year: 2024
end_year: 2024
selectable: false
Expand Down
2 changes: 1 addition & 1 deletion src/ds_caselaw_utils/data/neutral_citation_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'^\[(\d{4})\] (EWHC) (\d+) \((Admin|Admlty|Ch|Comm|Costs|Fam|IPEC|Pat|QB|KB|SCCO|TCC)\)$',
[2, 4, 1, 3],
],
['^\[(\d{4})\] (EWFC|EWCOP|EWCC|EWCRC) (\d+)$', [2, 1, 3]],
['^\[(\d{4})\] (EWFC|EWCOP|EWCC|EWCR) (\d+)$', [2, 1, 3]],
['^\[(\d{4})\] (EWCOP) (\d+) \((T1|T2|T3)\)$', [2, 4, 1, 3]],
['^\[(\d{4})\] (UKUT) (\d+) \((AAC|IAC|LC|TCC)\)$', [2, 4, 1, 3]],
['^\[(\d{4})\] (EAT) (\d+)$', [2, 1, 3]],
Expand Down
3 changes: 3 additions & 0 deletions src/ds_caselaw_utils/test_neutral.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def test_good_neutral_urls(self):
self.assertEqual(neutral_url("[2023] UKAIT 1"), "/ukait/2023/1")
self.assertEqual(neutral_url("[2024] EWCOP 17 (T2)"), "/ewcop/t2/2024/17")
self.assertEqual(neutral_url("[2000] UKIPTrib 99"), "/ukiptrib/2000/99")
self.assertEqual(neutral_url("[2000] EWCR 99"), "/ewcr/2000/99")
self.assertEqual(neutral_url("[2000] EWCC 99"), "/ewcc/2000/99")

def test_bad_neutral_urls(self):
self.assertEqual(neutral_url(""), None)
Expand All @@ -29,3 +31,4 @@ def test_bad_neutral_urls(self):
self.assertEqual(neutral_url("[2022] EAT A"), None)
self.assertEqual(neutral_url("[2022] NOTACOURT 1 TC"), None)
self.assertEqual(neutral_url("[2022] EWHC 1 (T2)"), None)
self.assertEqual(neutral_url("[2000] EWCRC 99"), None)