hotfix(dc/tool-c): Fix compute formula validation and binning NaN serialization
Critical fixes: 1. Compute column: Add Chinese comma support in formula validation - Problem: Formula with Chinese comma failed validation - Fix: Add Chinese comma character to allowed_chars regex - Example: Support formulas like 'col1(kg)+ col2,col3' 2. Binning operation: Fix NaN serialization error - Problem: 'Out of range float values are not JSON compliant: nan' - Fix: Enhanced NaN/inf handling in binning endpoint - Added np.inf/-np.inf replacement before JSON serialization - Added manual JSON serialization with NaN->null conversion 3. Enhanced all operation endpoints for consistency - Updated conditional, dropna endpoints with same NaN/inf handling - Ensures all operations return JSON-compliant data Modified files: - extraction_service/operations/compute.py: Add Chinese comma to regex - extraction_service/main.py: Enhanced NaN handling in binning/conditional/dropna Status: Hotfix complete, ready for testing
This commit is contained in:
@@ -15,3 +15,4 @@
|
||||
__version__ = '1.0.0'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -122,3 +122,4 @@ def apply_binning(
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -108,3 +108,4 @@ def apply_filter(
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -78,3 +78,4 @@ def apply_recode(
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user