Closed GMayank0310 closed 3 months ago
The recent changes enhance the ColumnMetadata
class by expanding the validation of the data_type
field to include float
, in addition to str
and int
. This broadens the data types accepted in various parts of the application, including validation and metadata handling, ensuring greater flexibility and precision in data representation.
Files | Change Summary |
---|---|
kairon/api/models.py |
Updated check method in ColumnMetadata to include float as a valid data_type . |
kairon/shared/cognition/data_objects.py |
Modified data_type field choices to include float and updated validation logic accordingly. |
kairon/shared/cognition/processor.py |
Enhanced validate_column_values to validate and convert float data types properly. |
kairon/shared/models.py |
Introduced float enumeration in CognitionMetadataType to support floating-point numbers. |
tests/integration_test/services_test.py |
Updated assertions in test_metadata_upload_invalid_data_type to include float in error messages. |
tests/unit_test/data_processor/data_processor_test.py |
Adjusted expected error messages in test_save_payload_metadata_data_type_invalid to include float . |
sequenceDiagram
participant User
participant Processor
participant ColumnMetadata
User->>ColumnMetadata: Submit data with data_type: float
ColumnMetadata->>ColumnMetadata: Check data_type
alt valid data_type
ColumnMetadata->>Processor: Forward valid data
else invalid data_type
ColumnMetadata->>User: Raise ValidationError
end
🐇 In the meadow, I hop with delight,
Data types growing, oh what a sight!
From strings to floats, we now have three,
A world of precision, so wild and free!
With each little change, our fields come alive,
In the land of code, together we thrive! 🌼✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
added float data type for cognition schema
Summary by CodeRabbit
New Features
float
, enhancing data validation capabilities.Bug Fixes
float
as a valid type.Tests