warn-transformer 1.3.264__py3-none-any.whl → 1.3.266__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 +1 -1
- warn_transformer/transformers/nj.py +1 -0
- warn_transformer/transformers/ok.py +18 -4
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/METADATA +1 -1
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/RECORD +9 -9
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/WHEEL +0 -0
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/entry_points.txt +0 -0
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/licenses/LICENSE +0 -0
- {warn_transformer-1.3.264.dist-info → warn_transformer-1.3.266.dist-info}/top_level.txt +0 -0
warn_transformer/schema.py
CHANGED
|
@@ -176,7 +176,7 @@ class BaseTransformer:
|
|
|
176
176
|
elif isinstance(method, typing.Callable):
|
|
177
177
|
return method(row)
|
|
178
178
|
else:
|
|
179
|
-
raise ValueError("The field method
|
|
179
|
+
raise ValueError("The field method you provided is not valid.")
|
|
180
180
|
|
|
181
181
|
def get_hash_id(self, data: typing.Dict) -> str:
|
|
182
182
|
"""Convert the row into a unique hexdigest to use as a unique identifier.
|
|
@@ -170,6 +170,7 @@ class Transformer(BaseTransformer):
|
|
|
170
170
|
2025, 10, 21
|
|
171
171
|
),
|
|
172
172
|
"11/28/25, 12/31/25, 1/19/26, 1/30/26, 3/6/26, 6/26/26": datetime(2025, 11, 28),
|
|
173
|
+
"7/14/25 - 9/15/25": datetime(2025, 7, 14),
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
def transform_jobs(self, value: str) -> typing.Optional[int]:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
1
3
|
from ..schema import BaseTransformer
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,9 +8,21 @@ class Transformer(BaseTransformer):
|
|
|
6
8
|
|
|
7
9
|
postal_code = "OK"
|
|
8
10
|
fields = dict(
|
|
9
|
-
company="
|
|
10
|
-
location=lambda row: row["city"] or row["
|
|
11
|
+
company="company_name",
|
|
12
|
+
location=lambda row: row["city"] or row["workforce_board"],
|
|
11
13
|
notice_date="notice_date",
|
|
12
|
-
jobs="number_of_employees_affected",
|
|
14
|
+
# jobs="number_of_employees_affected",
|
|
15
|
+
jobs="jobs",
|
|
13
16
|
)
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
date_format = "%Y-%m-%d"
|
|
19
|
+
|
|
20
|
+
def check_if_closure(self, row: typing.Dict) -> typing.Optional[bool]:
|
|
21
|
+
"""Determine whether a row is a closure or not.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
row (dict): The raw row of data.
|
|
25
|
+
|
|
26
|
+
Returns: A boolean or null
|
|
27
|
+
"""
|
|
28
|
+
return "closing" in row["closure_type"].lower() or None
|
|
@@ -3,7 +3,7 @@ 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=6m62x1-B5LJFPMmUicZe6TZUzjkIfxJjm5-0hlo-x2k,13051
|
|
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=BVzKzIOpZ3fzSj6EjlqyG3z4D5LBVLwP6-gYRCfSVO4,2441
|
|
@@ -30,11 +30,11 @@ warn_transformer/transformers/mi.py,sha256=fXKiv-Slgh34tpKGPZiNs0hVd2mDqiaOP2ZEa
|
|
|
30
30
|
warn_transformer/transformers/mo.py,sha256=NYmHMISfXawIoIm00Bsvjzjw4TGAxbsHiS8MQ6oYEdk,1709
|
|
31
31
|
warn_transformer/transformers/mt.py,sha256=QSSlo3BFjJklcE4e6tUu_vJa1H887XeDXdxsCY0LGm0,762
|
|
32
32
|
warn_transformer/transformers/ne.py,sha256=WqUkSsoR9a2Oi4Y7sjOqH3C2lbbaYWQzFCvhme2iNKo,982
|
|
33
|
-
warn_transformer/transformers/nj.py,sha256=
|
|
33
|
+
warn_transformer/transformers/nj.py,sha256=Qpu_yG9INYuBn5rxOmXztyrRmgn1tVQJHne4x4_28VM,9341
|
|
34
34
|
warn_transformer/transformers/nm.py,sha256=w_u9AmXyc-VCqnspTvuUNlP2cwqjwSRvqeVHwQoLux0,664
|
|
35
35
|
warn_transformer/transformers/ny.py,sha256=YGlomU9-pr6dBLrR0xROL8jJzOwJWPGV01GSByqUHds,2559
|
|
36
36
|
warn_transformer/transformers/oh.py,sha256=ZTREXZgvurJjigJ-g38qBtiDmT4P1p5ZvOH0G7Y4Q9I,3273
|
|
37
|
-
warn_transformer/transformers/ok.py,sha256=
|
|
37
|
+
warn_transformer/transformers/ok.py,sha256=LxjyrJ4uzhVllXSqWLZhlZ9p60tshwrfco5kGv8m94E,733
|
|
38
38
|
warn_transformer/transformers/or.py,sha256=YcSBOndSS7sd04LICuVwmMwY4al2bBOCGxowXXj34vE,1433
|
|
39
39
|
warn_transformer/transformers/ri.py,sha256=nodHs6DIiZeReJo5R6kKQQiXecfrA2CdTgWc54xP-Z0,2270
|
|
40
40
|
warn_transformer/transformers/sc.py,sha256=0GNL3aFCCNsVKtHpUfS-W7Tb5bDkNnTIUrqJwsSu31o,1911
|
|
@@ -46,9 +46,9 @@ warn_transformer/transformers/va.py,sha256=vxlkvIgrphAUqqCKi_6xZ8raOEhbUpskBukKb
|
|
|
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.266.dist-info/licenses/LICENSE,sha256=ZV-QHyqPwyMuwuj0lI05JeSjV1NyzVEk8Yeu7FPtYS0,585
|
|
50
|
+
warn_transformer-1.3.266.dist-info/METADATA,sha256=vnpszBbk4KAoOWqGre_80LQdT3ZR1m4ffvmruliBSIE,1740
|
|
51
|
+
warn_transformer-1.3.266.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
52
|
+
warn_transformer-1.3.266.dist-info/entry_points.txt,sha256=MvWNvQnZTu5Fbpd7JMN-KGPeklT6f5v6Hx39uqnBl28,62
|
|
53
|
+
warn_transformer-1.3.266.dist-info/top_level.txt,sha256=8nZpmzmOcqSnismvY34muSX8MvaZM6aEfLldl-wp0fQ,17
|
|
54
|
+
warn_transformer-1.3.266.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|