From a3212ef71ff2d76da543a74c58ff7d321166f031 Mon Sep 17 00:00:00 2001 From: Thibault Ducret Date: Tue, 17 Sep 2024 11:18:20 +0200 Subject: [PATCH] Add `Bay` street type --- pyap/source_US/data.py | 3 ++- tests/test_parser_us.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index e24c965..b1e0da5 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -211,7 +211,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str: ) # This list was taken from: https://pe.usps.com/text/pub28/28apc_002.htm -# Broadway and Lp (abbreviation for Loop) were added to the list +# Bay, Broadway and Lp (abbreviation for Loop) were added to the list street_type_list = [ "Allee", "Alley", @@ -230,6 +230,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str: "Avenue", "Avn", "Avnue", + "Bay", "Bayoo", "Bayou", "Bch", diff --git a/tests/test_parser_us.py b/tests/test_parser_us.py index f2f1cbc..07633aa 100644 --- a/tests/test_parser_us.py +++ b/tests/test_parser_us.py @@ -228,6 +228,7 @@ def test_post_direction(input, expected): ("Interstate 35", True), ("I- 35", True), ("I-35 Service Road", True), + ("BAY", True), # negative assertions # TODO ], @@ -601,6 +602,7 @@ def test_full_street_positive(input, expected): ("2006 Broadway Ave Suite 2A, PO Drawer J, Great Bend, KS 67530", True), ("135 Pinelawn Road STE 130 S, Melville, NY 11747", True), ("1800 M STREET NW SUITE 375 N, WASHINGTON, DC 20036", True), + ("10 INDIAN BAY, ALAMEDA CA 94502", True), # negative assertions ("ONE HEALING CENTER LLC, 16444", False), ("85 STEEL REGULAR SHAFT - NE", False),