pyap2 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyap2-0.3.0 → pyap2-0.3.1}/PKG-INFO +1 -1
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_US/data.py +13 -4
- {pyap2-0.3.0 → pyap2-0.3.1}/tests/test_parser_us.py +2 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/.gitignore +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/AUTHORS.rst +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/LICENSE +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/README.rst +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/__init__.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/address.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/api.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/exceptions.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/parser.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/py.typed +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_CA/__init__.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_CA/data.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_GB/__init__.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_GB/data.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/source_US/__init__.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyap/utils.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/pyproject.toml +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/tests/__init__.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/tests/test_parser.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/tests/test_parser_ca.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/tests/test_parser_gb.py +0 -0
- {pyap2-0.3.0 → pyap2-0.3.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pyap2
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A maintained, typed fork of pyap for parsing US, CA, and UK addresses
|
|
5
5
|
Project-URL: Documentation, https://github.com/argyle-engineering/pyap
|
|
6
6
|
Project-URL: Homepage, https://github.com/argyle-engineering/pyap
|
|
@@ -1124,10 +1124,19 @@ building = r"""
|
|
|
1124
1124
|
# A unit id is short and always contains a digit.
|
|
1125
1125
|
# A plain word like the "Shore" in "Bay Shore" is a city, not
|
|
1126
1126
|
# a unit id - we don't let one start with three letters.
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1127
|
+
# A unit id can also come in two parts, a letter and a number: "STE C 199".
|
|
1128
|
+
occupancy_details = r"""
|
|
1129
|
+
(?:
|
|
1130
|
+
# two-part unit id: a letter and a number, e.g. "C 199"
|
|
1131
|
+
[A-Za-z]\ \d{{1,5}}\b
|
|
1132
|
+
|
|
|
1133
|
+
# single unit id, e.g. "4B", "#12", "A-3"
|
|
1134
|
+
(?:\#\ )?
|
|
1135
|
+
(?![A-Za-z]{{3}})
|
|
1136
|
+
[A-Za-z\#\&\-\d]{{1,7}}
|
|
1137
|
+
(?:\s?{post_direction_re})?
|
|
1138
|
+
)
|
|
1139
|
+
""".format(post_direction_re=post_direction_re)
|
|
1131
1140
|
occupancy = r"""
|
|
1132
1141
|
(?P<occupancy>
|
|
1133
1142
|
(?:
|
|
@@ -345,6 +345,7 @@ def test_building(input, expected):
|
|
|
345
345
|
("ste 9E", True),
|
|
346
346
|
("Suite 1800", True),
|
|
347
347
|
("STE 130 S", True),
|
|
348
|
+
("STE B 245", True),
|
|
348
349
|
("Apt 1B", True),
|
|
349
350
|
("Rm. 52", True),
|
|
350
351
|
("#2b", True),
|
|
@@ -658,6 +659,7 @@ def test_full_street_positive(input, expected):
|
|
|
658
659
|
("PO Box # A3656\nChicago, IL 60690", True),
|
|
659
660
|
("2006 Broadway Ave Suite 2A, PO Drawer J, Great Bend, KS 67530", True),
|
|
660
661
|
("135 Pinelawn Road STE 130 S, Melville, NY 11747", True),
|
|
662
|
+
("123 Main RD\nSTE B 245\nSPRINGFIELD, IL 62701", True),
|
|
661
663
|
("1800 M STREET NW SUITE 375 N, WASHINGTON, DC 20036", True),
|
|
662
664
|
("10 INDIAN BAY, ALAMEDA CA 94502", True),
|
|
663
665
|
("1234 THE BENT TWIG JOHNS ISLAND, KY 40207", True),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|