cdapython 2.0.3__tar.gz → 2.0.4__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.
- {cdapython-2.0.3 → cdapython-2.0.4}/CHANGELOG.md +1 -1
- {cdapython-2.0.3 → cdapython-2.0.4}/PKG-INFO +1 -1
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/validation.py +7 -34
- {cdapython-2.0.3 → cdapython-2.0.4}/pyproject.toml +1 -1
- {cdapython-2.0.3 → cdapython-2.0.4}/LICENSE +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/README.md +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/__init__.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/application_utilities.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/config/__init__.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/config/logger_default_config.yml +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/discover.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/get_data.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/logging_wrappers.py +0 -0
- {cdapython-2.0.3 → cdapython-2.0.4}/cdapython/summarize.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
2025-09-17: 2.0.
|
|
1
|
+
2025-09-17: 2.0.4: update ternary numeric comparison handling for latest API ternary operator syntax support
|
|
2
2
|
|
|
3
3
|
2025-08-18: 2.0.2: update PyYAML build dependency
|
|
4
4
|
|
|
@@ -152,42 +152,8 @@ def validate_and_transform_match_filter_list( cached_column_metadata, match_stat
|
|
|
152
152
|
'f': 'false'
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
# Enforce column uniqueness (across multiple filters) if directed to do so.
|
|
156
|
-
# Track which columns have been seen in case we need to catch disallowed sets of multiple queries on the same column.
|
|
157
155
|
seen_filter_column_names = set()
|
|
158
156
|
|
|
159
|
-
# Have we seen this before (and do we care)?
|
|
160
|
-
if enforce_column_uniqueness:
|
|
161
|
-
if filter_column_name not in column_names_exempt_from_uniqueness_check and filter_column_name in seen_filter_column_names:
|
|
162
|
-
raise RuntimeError( f"Requested column '{filter_column_name}' cannot be used twice in a 'match_all' list." )
|
|
163
|
-
else:
|
|
164
|
-
seen_filter_column_names.add( filter_column_name )
|
|
165
|
-
|
|
166
|
-
for filter_expression in match_statement_list:
|
|
167
|
-
match_result = re.search( r'^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S.*)$', filter_expression ) if isinstance( filter_expression, str ) else None
|
|
168
|
-
is_ternary = False
|
|
169
|
-
if match_result is not None:
|
|
170
|
-
left_numeric = match_result.group(1)
|
|
171
|
-
left_operator = match_result.group(2)
|
|
172
|
-
column_name = match_result.group(3)
|
|
173
|
-
right_operator = match_result.group(4)
|
|
174
|
-
right_numeric = match_result.group(5)
|
|
175
|
-
if re.search( r'^[-+]?\d+(\.\d+)?$', left_numeric ) is not None and re.search( r'^[-+]?\d+(\.\d+)?$', right_numeric ) is not None and \
|
|
176
|
-
left_operator in comparison_operators and right_operator in comparison_operators:
|
|
177
|
-
# This is a numeric comparison of the type we seek.
|
|
178
|
-
is_ternary = True
|
|
179
|
-
|
|
180
|
-
# If we're enforcing column uniqueness, we only want to see each column filtered via
|
|
181
|
-
# at most one filter expression.
|
|
182
|
-
if enforce_column_uniqueness and column_name in seen_filter_column_names:
|
|
183
|
-
raise RuntimeError( f"Requested column '{column_name}' cannot be used twice in a 'match_all' list." )
|
|
184
|
-
else:
|
|
185
|
-
seen_filter_column_names.add( column_name )
|
|
186
|
-
if enforce_column_uniqueness and not is_ternary:
|
|
187
|
-
new_match_statement_list.append( filter_expression )
|
|
188
|
-
|
|
189
|
-
match_statement_list = new_match_statement_list
|
|
190
|
-
|
|
191
157
|
for filter_expression in match_statement_list:
|
|
192
158
|
|
|
193
159
|
if not isinstance( filter_expression, str ) or len( filter_expression ) == 0:
|
|
@@ -243,6 +209,13 @@ def validate_and_transform_match_filter_list( cached_column_metadata, match_stat
|
|
|
243
209
|
if not filter_is_ternary:
|
|
244
210
|
filter_column_name = re.sub( r'^([\S]+)\s.*', r'\1', filter_expression ).lower()
|
|
245
211
|
|
|
212
|
+
# Have we seen this before (and do we care)?
|
|
213
|
+
if enforce_column_uniqueness:
|
|
214
|
+
if filter_column_name in seen_filter_column_names:
|
|
215
|
+
raise RuntimeError( f"Requested column '{filter_column_name}' cannot be used twice in a 'match_all' list." )
|
|
216
|
+
else:
|
|
217
|
+
seen_filter_column_names.add( filter_column_name )
|
|
218
|
+
|
|
246
219
|
# Let's see if this thing exists.
|
|
247
220
|
filter_column_metadata = cached_column_metadata[ cached_column_metadata['column'] == filter_column_name ]
|
|
248
221
|
|
|
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
|