warn-transformer 1.3.122__py3-none-any.whl → 1.3.124__py3-none-any.whl
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.
Potentially problematic release.
This version of warn-transformer might be problematic. Click here for more details.
- warn_transformer/schema.py +15 -7
- warn_transformer/transformers/co.py +1 -0
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/METADATA +1 -1
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/RECORD +8 -8
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/LICENSE +0 -0
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/WHEEL +0 -0
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/entry_points.txt +0 -0
- {warn_transformer-1.3.122.dist-info → warn_transformer-1.3.124.dist-info}/top_level.txt +0 -0
warn_transformer/schema.py
CHANGED
|
@@ -233,7 +233,9 @@ class BaseTransformer:
|
|
|
233
233
|
try:
|
|
234
234
|
dt = datetime.strptime(value, self.date_format)
|
|
235
235
|
except ValueError:
|
|
236
|
-
logger.debug(
|
|
236
|
+
logger.debug(
|
|
237
|
+
f"{self.postal_code} - Could not parse '{value}'. Looking up correction"
|
|
238
|
+
)
|
|
237
239
|
dt = self.date_corrections[value]
|
|
238
240
|
|
|
239
241
|
# If it's a list, try them one by one
|
|
@@ -245,7 +247,9 @@ class BaseTransformer:
|
|
|
245
247
|
continue
|
|
246
248
|
# If there's nothing at the end of the loop, try the correction
|
|
247
249
|
if not dt:
|
|
248
|
-
logger.debug(
|
|
250
|
+
logger.debug(
|
|
251
|
+
f"{self.postal_code} - Could not parse '{value}'. Looking up correction"
|
|
252
|
+
)
|
|
249
253
|
dt = self.date_corrections[value]
|
|
250
254
|
|
|
251
255
|
# If the date parses as None, return that
|
|
@@ -259,14 +263,14 @@ class BaseTransformer:
|
|
|
259
263
|
today = datetime.today()
|
|
260
264
|
if dt > today + timedelta(days=self.max_future_days):
|
|
261
265
|
logger.debug(
|
|
262
|
-
f"Date '{dt}' is more than {self.max_future_days} days in the future. Looking up correction"
|
|
266
|
+
f"{self.postal_code} - Date '{dt}' is more than {self.max_future_days} days in the future. Looking up correction"
|
|
263
267
|
)
|
|
264
268
|
dt = self.date_corrections[value]
|
|
265
269
|
|
|
266
270
|
# If the date is below the minimum year, fix it
|
|
267
271
|
if dt.year < self.minimum_year:
|
|
268
272
|
logger.debug(
|
|
269
|
-
f"Year {dt.year} below minimum of {self.minimum_year}. Looking up correction"
|
|
273
|
+
f"{self.postal_code} - Year {dt.year} below minimum of {self.minimum_year}. Looking up correction"
|
|
270
274
|
)
|
|
271
275
|
dt = self.date_corrections[value]
|
|
272
276
|
|
|
@@ -306,7 +310,9 @@ class BaseTransformer:
|
|
|
306
310
|
clean_value = int(float(value))
|
|
307
311
|
except ValueError:
|
|
308
312
|
# If it won't convert, look for a manual correction
|
|
309
|
-
logger.debug(
|
|
313
|
+
logger.debug(
|
|
314
|
+
f"{self.postal_code} - Could not parse '{value}'. Looking up correction"
|
|
315
|
+
)
|
|
310
316
|
clean_value = self.jobs_corrections[value]
|
|
311
317
|
|
|
312
318
|
# If it's None, return it now
|
|
@@ -315,11 +321,13 @@ class BaseTransformer:
|
|
|
315
321
|
|
|
316
322
|
# Now validate it
|
|
317
323
|
if clean_value < 0:
|
|
318
|
-
logger.debug(
|
|
324
|
+
logger.debug(
|
|
325
|
+
"{self.postal_code} - Jobs must be greater than 0. Looking up correction"
|
|
326
|
+
)
|
|
319
327
|
clean_value = self.jobs_corrections[clean_value]
|
|
320
328
|
if clean_value > self.maximum_jobs:
|
|
321
329
|
logger.debug(
|
|
322
|
-
f"Jobs greater than {self.maximum_jobs} are probably wrong. Looking up correction"
|
|
330
|
+
f"{self.postal_code} - Jobs greater than {self.maximum_jobs} are probably wrong. Looking up correction"
|
|
323
331
|
)
|
|
324
332
|
clean_value = self.jobs_corrections[clean_value]
|
|
325
333
|
|
|
@@ -3,14 +3,14 @@ warn_transformer/cli.py,sha256=gwO96jz_dj_LSpMYtY-avRvZl3hzE7sUMhimpMZwUFU,3180
|
|
|
3
3
|
warn_transformer/consolidate.py,sha256=P2kgwxGt7V-ltD-XVnPMwsRhzNpXnxlm8J962hRPwn0,2393
|
|
4
4
|
warn_transformer/download.py,sha256=xkSV4jj2cwz70DqtNzoIs5pWIJUXdtBtv5W68Y2lNhU,1642
|
|
5
5
|
warn_transformer/integrate.py,sha256=ofeIvJGqktxsX8bj2ngSgEtJcIn293s_IXNCGNUIMwA,14829
|
|
6
|
-
warn_transformer/schema.py,sha256=
|
|
6
|
+
warn_transformer/schema.py,sha256=BfJ3foGinUvvnJM9CyQ440GwEio0sT5lcud0aoODyOo,13052
|
|
7
7
|
warn_transformer/utils.py,sha256=wEgK9lE2aLKdtlQAgu21vMo0nTcSK6LbT_eMrkke-50,655
|
|
8
8
|
warn_transformer/transformers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
warn_transformer/transformers/ak.py,sha256=b3kMBttEeUxnNcMaI3l6Bcx58uos_OiQIF5C51UrW8s,2239
|
|
10
10
|
warn_transformer/transformers/al.py,sha256=eMlG4P0IXDOZYb6aPTGR2tTaoV07pouVZaVouyUXChs,811
|
|
11
11
|
warn_transformer/transformers/az.py,sha256=cB1fTlpBH-meU4NO4hS5-pO2_oCSc6q6Ip7eeQQEUJo,398
|
|
12
12
|
warn_transformer/transformers/ca.py,sha256=7BYjoEr01EE2bPX6No94gUglvDs-Hj5Lea-l9zRYuX8,1534
|
|
13
|
-
warn_transformer/transformers/co.py,sha256=
|
|
13
|
+
warn_transformer/transformers/co.py,sha256=EeIZu0LShyOiDEHfLQNQ8TANXBKA46hjRkImDdcThRg,4849
|
|
14
14
|
warn_transformer/transformers/ct.py,sha256=8BpRZvY6FcYS30jUYyeZ2VUYwFhHcFjZBJyIjhOIDQs,3742
|
|
15
15
|
warn_transformer/transformers/dc.py,sha256=uHJxFIvX7zzZFoPx-ATSmM3tqO_-tzSD3KgRsaziDK0,1407
|
|
16
16
|
warn_transformer/transformers/de.py,sha256=QTvAVeR9A_cqLKBPf1ELL1PzYixazOsPIbLipJqyTrI,344
|
|
@@ -46,9 +46,9 @@ warn_transformer/transformers/va.py,sha256=LkWxPFfQ1hMqko4_FdbRsn6rNFXTQN_CLnDMZ
|
|
|
46
46
|
warn_transformer/transformers/vt.py,sha256=5J9p7yexXmn4K3Pe0xIkPa9fR10DpZ2DSzvjkrDbCZs,452
|
|
47
47
|
warn_transformer/transformers/wa.py,sha256=0addhlk4jBAfScVngCq8VUJvd-Bc8e1winPn8Lu2DZo,1111
|
|
48
48
|
warn_transformer/transformers/wi.py,sha256=sM5KFkACDQ6dqiQ666wvZ8gJe47ywFVmM1hFbw8Io64,3019
|
|
49
|
-
warn_transformer-1.3.
|
|
50
|
-
warn_transformer-1.3.
|
|
51
|
-
warn_transformer-1.3.
|
|
52
|
-
warn_transformer-1.3.
|
|
53
|
-
warn_transformer-1.3.
|
|
54
|
-
warn_transformer-1.3.
|
|
49
|
+
warn_transformer-1.3.124.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
50
|
+
warn_transformer-1.3.124.dist-info/METADATA,sha256=WSNtlXEJZ-pF3IBIDnkoGs9rr6msQk5yqxO7SNB2V7Y,1543
|
|
51
|
+
warn_transformer-1.3.124.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
52
|
+
warn_transformer-1.3.124.dist-info/entry_points.txt,sha256=MvWNvQnZTu5Fbpd7JMN-KGPeklT6f5v6Hx39uqnBl28,62
|
|
53
|
+
warn_transformer-1.3.124.dist-info/top_level.txt,sha256=8nZpmzmOcqSnismvY34muSX8MvaZM6aEfLldl-wp0fQ,17
|
|
54
|
+
warn_transformer-1.3.124.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|