airbyte-source-google-sheets 0.10.0.dev202505211933__py3-none-any.whl → 0.10.0.dev202505271949__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.
- {airbyte_source_google_sheets-0.10.0.dev202505211933.dist-info → airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info}/METADATA +1 -1
- {airbyte_source_google_sheets-0.10.0.dev202505211933.dist-info → airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info}/RECORD +6 -6
- source_google_sheets/manifest.yaml +7 -5
- source_google_sheets/utils.py +23 -10
- {airbyte_source_google_sheets-0.10.0.dev202505211933.dist-info → airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info}/WHEEL +0 -0
- {airbyte_source_google_sheets-0.10.0.dev202505211933.dist-info → airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info}/entry_points.txt +0 -0
@@ -2,15 +2,15 @@ source_google_sheets/__init__.py,sha256=dYaZS0KrTjksk_yeSuXmNDXDsNKWctFnlZJSMgLr
|
|
2
2
|
source_google_sheets/components/__init__.py,sha256=v7odPaLdz2S_NRzExsxkk6694Vmjbplz4Z5mA4lxdkA,343
|
3
3
|
source_google_sheets/components/extractors.py,sha256=-d5hPW40ZBjU3gTUZNudayvqf1eHlveW1amwKJywDkU,9668
|
4
4
|
source_google_sheets/components/partition_routers.py,sha256=SWo1V0K10ZdWE2TQ0KuQUfue04RTyHJe1f6BOj6c96s,1265
|
5
|
-
source_google_sheets/manifest.yaml,sha256=
|
5
|
+
source_google_sheets/manifest.yaml,sha256=CuSnA8dnRMeXWfyUA6aXBvGU3mz1dJIi0HqMiks9Fd0,15938
|
6
6
|
source_google_sheets/models/__init__.py,sha256=Z-4MTpxG5t2jGhXzs4PPoIOa83zw3jRnUDx0N9Puv3s,61
|
7
7
|
source_google_sheets/models/spreadsheet.py,sha256=DEef7bWQEpY1Uqyk7RN6qLF8oxLSNzuAtHlGRmMAKQA,1112
|
8
8
|
source_google_sheets/models/spreadsheet_values.py,sha256=-XRMuuILn9JN8svHNTj6-oG8mLTZOZ5Hejy2pJ5bILk,440
|
9
9
|
source_google_sheets/run.py,sha256=eaPRcarWqkB2b2DokvI83w7rz1blmWPQCFahvCyCdSY,1887
|
10
10
|
source_google_sheets/source.py,sha256=qO1KoGdphieu7F5VgDYtrbqs56AUvMWFGNvFHP2b9Z4,778
|
11
11
|
source_google_sheets/spec.yaml,sha256=mFOiMN1IsrjyLRcjTRw7xa0b74LwkUXdVvUqau7iTXc,5709
|
12
|
-
source_google_sheets/utils.py,sha256=
|
13
|
-
airbyte_source_google_sheets-0.10.0.
|
14
|
-
airbyte_source_google_sheets-0.10.0.
|
15
|
-
airbyte_source_google_sheets-0.10.0.
|
16
|
-
airbyte_source_google_sheets-0.10.0.
|
12
|
+
source_google_sheets/utils.py,sha256=eOPrfTFBn7p80gkw4ZEQxskIrOFDj5_Fv9pCGQt4gkA,4576
|
13
|
+
airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info/METADATA,sha256=VwpBWod_jy9XLMVHO_oJrDbgGaovtT-1EYEmuRHiq4E,5385
|
14
|
+
airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
15
|
+
airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info/entry_points.txt,sha256=Dtsfjohe5IPUFyqojk49SIoP7CifCTlNLG_pgivzppo,69
|
16
|
+
airbyte_source_google_sheets-0.10.0.dev202505271949.dist-info/RECORD,,
|
@@ -224,11 +224,11 @@ definitions:
|
|
224
224
|
path: >-
|
225
225
|
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}?includeGridData=true&ranges={{stream_partition.sheet_id | urlencode}}!1:1&alt=json
|
226
226
|
error_handler:
|
227
|
-
type:
|
228
|
-
|
229
|
-
- type:
|
230
|
-
|
231
|
-
|
227
|
+
type: DefaultErrorHandler
|
228
|
+
backoff_strategies:
|
229
|
+
- type: ExponentialBackoffStrategy
|
230
|
+
response_filters:
|
231
|
+
$ref: "#/definitions/response_filters/single_sheet_response_error_filters"
|
232
232
|
response_filters:
|
233
233
|
expected_one_sheet:
|
234
234
|
type: HttpResponseFilter
|
@@ -320,9 +320,11 @@ definitions:
|
|
320
320
|
single_sheet_response_error_filters:
|
321
321
|
- $ref: "#/definitions/response_filters/expected_one_sheet"
|
322
322
|
- $ref: "#/definitions/response_filters/ignore_duplicate_headers"
|
323
|
+
- $ref: "#/definitions/response_filters/rate_limit"
|
323
324
|
check_operation_single_sheet_response_error_filters:
|
324
325
|
- $ref: "#/definitions/response_filters/expected_one_sheet"
|
325
326
|
- $ref: "#/definitions/response_filters/fail_duplicate_headers"
|
327
|
+
- $ref: "#/definitions/response_filters/rate_limit"
|
326
328
|
response_error_filters:
|
327
329
|
- $ref: "#/definitions/response_filters/server_error"
|
328
330
|
- $ref: "#/definitions/response_filters/forbidden"
|
source_google_sheets/utils.py
CHANGED
@@ -40,37 +40,50 @@ def name_conversion(text: str) -> str:
|
|
40
40
|
def experimental_name_conversion(text: str) -> str:
|
41
41
|
"""
|
42
42
|
Convert name using a set of rules, for example: '1MyName' -> '_1_my_name'
|
43
|
-
Removes leading/trailing spaces
|
43
|
+
Removes leading/trailing spaces, combines number-word pairs (e.g., '50th' -> '50th'),
|
44
|
+
letter-number pairs (e.g., 'Q3' -> 'Q3'), and removes special characters without adding underscores.
|
45
|
+
Spaces are converted to underscores for snake_case. Preserves spaces between numbers and words.
|
44
46
|
"""
|
45
|
-
|
46
|
-
|
47
|
+
# Step 1: Tokenization
|
47
48
|
tokens = []
|
48
49
|
for m in TOKEN_PATTERN.finditer(text):
|
49
50
|
if m.group("NoToken") is None:
|
50
51
|
tokens.append(m.group(0))
|
51
52
|
else:
|
52
|
-
|
53
|
+
# Process each character in NoToken match
|
54
|
+
for char in m.group(0):
|
55
|
+
if char.isspace():
|
56
|
+
tokens.append("")
|
53
57
|
|
54
|
-
#
|
58
|
+
# Step 2: Combine adjacent tokens where appropriate
|
55
59
|
combined_tokens = []
|
56
60
|
i = 0
|
57
61
|
while i < len(tokens):
|
58
|
-
if i + 1 < len(tokens) and tokens[i].
|
59
|
-
combined_tokens.append(tokens[i] + tokens[i + 1])
|
62
|
+
if i + 1 < len(tokens) and tokens[i] and len(tokens[i]) == 1 and tokens[i].isupper() and tokens[i + 1] and tokens[i + 1].isdigit():
|
63
|
+
combined_tokens.append(tokens[i] + tokens[i + 1]) # e.g., "Q3"
|
64
|
+
i += 2
|
65
|
+
elif i + 1 < len(tokens) and tokens[i] and tokens[i].isdigit() and tokens[i + 1] and tokens[i + 1].isalpha():
|
66
|
+
combined_tokens.append(tokens[i] + tokens[i + 1]) # e.g., "80th"
|
60
67
|
i += 2
|
61
68
|
else:
|
62
69
|
combined_tokens.append(tokens[i])
|
63
70
|
i += 1
|
64
71
|
|
72
|
+
# Step 3: Clean up empty tokens
|
73
|
+
while combined_tokens and combined_tokens[0] == "":
|
74
|
+
combined_tokens.pop(0)
|
75
|
+
while combined_tokens and combined_tokens[-1] == "":
|
76
|
+
combined_tokens.pop()
|
65
77
|
if len(combined_tokens) >= 3:
|
66
78
|
combined_tokens = combined_tokens[:1] + [t for t in combined_tokens[1:-1] if t] + combined_tokens[-1:]
|
67
79
|
|
80
|
+
# Step 4: Handle leading digits
|
68
81
|
if combined_tokens and combined_tokens[0].isdigit():
|
69
82
|
combined_tokens.insert(0, "")
|
70
83
|
|
71
|
-
|
72
|
-
|
73
|
-
return
|
84
|
+
# Step 5: Join and convert to lowercase
|
85
|
+
result = DEFAULT_SEPARATOR.join(combined_tokens)
|
86
|
+
return result.lower()
|
74
87
|
|
75
88
|
|
76
89
|
def safe_name_conversion(text: str) -> str:
|
File without changes
|