/
curry.json
133 lines (133 loc) · 5.24 KB
/
curry.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"coverage": {
"US Census": {
"geoid": "41015",
"name": "Curry County",
"state": "Oregon"
},
"country": "us",
"state": "or",
"county": "Curry"
},
"schema": 2,
"layers": {
"addresses": [
{
"name": "county",
"data": "https://data.openaddresses.io/cache/uploads/migurski/d5add2/oregon_state_addresses.zip",
"protocol": "http",
"compression": "zip",
"conform": {
"format": "gdb",
"file": "Delivery/addresses_oregon.gdb",
"layer": "Curry",
"number": {
"function": "prefixed_number",
"field": "SITUS_ONE"
},
"street": {
"function": "regexp",
"field": "SITUS_ONE",
"pattern": "^\\d+\\s+([^,]+)"
},
"unit": {
"function": "regexp",
"field": "SITUS_ONE",
"pattern": "(?:,\\s+(.+))$"
},
"city": {
"function": "regexp",
"field": "SITUS_TWO",
"pattern": "^(.+?)(?:,|\\d+)"
},
"region": {
"function": "regexp",
"field": "SITUS_TWO",
"pattern": "\\b(OR)\\b"
},
"postcode": {
"function": "regexp",
"field": "SITUS_TWO",
"pattern": "\\b(\\d+)$"
}
},
"test": {
"enabled": true,
"description": "these are the tests that exercise valid inputs for Curry County",
"acceptance-tests": [
{
"description": "address with no unit",
"inputs": {
"SITUS_ONE": "98171 TUTTLE LN",
"SITUS_TWO": "BROOKINGS, OR 97415"
},
"expected": {
"street": "TUTTLE LN",
"unit": "",
"city": "BROOKINGS",
"region": "OR",
"postcode": "97415"
}
},
{
"description": "address with # unit",
"inputs": {
"SITUS_ONE": "31084 CRABAPPLE WAY, #10",
"SITUS_TWO": "GOLD BEACH, OR 97444"
},
"expected": {
"street": "CRABAPPLE WAY",
"unit": "#10",
"city": "GOLD BEACH",
"region": "OR",
"postcode": "97444"
}
},
{
"description": "address with unconventional unit",
"inputs": {
"SITUS_ONE": "32051 WATSON LN, SP K",
"SITUS_TWO": "GOLD BEACH, OR 97444"
},
"expected": {
"street": "WATSON LN",
"unit": "SP K",
"city": "GOLD BEACH",
"region": "OR",
"postcode": "97444"
}
},
{
"description": "address with no city/region/zip",
"inputs": {
"SITUS_ONE": "402 8 ST",
"SITUS_TWO": ""
},
"expected": {
"street": "8 ST",
"unit": "",
"city": "",
"region": "",
"postcode": ""
}
},
{
"description": "address with no only city/zip",
"inputs": {
"SITUS_ONE": "29672 STEWART ST",
"SITUS_TWO": "GOLD BEACH 97444"
},
"expected": {
"street": "STEWART ST",
"unit": "",
"city": "GOLD BEACH ",
"region": "",
"postcode": "97444"
}
}
]
}
}
]
}
}