Closed maheshsattala closed 3 months ago
The recent updates enhance the API with robust management capabilities for collection data. New endpoints allow users to save, update, delete, and list collections, complemented by a validation model that ensures data integrity. Enhanced methods in the processor support data encryption and decryption, while comprehensive testing validates these new features. This significantly improves the application's functionality and user experience.
File(s) | Change Summary |
---|---|
kairon/api/app/routers/bot/data.py |
Added endpoints for saving, updating, deleting, and listing collection data, utilizing a new data model. |
kairon/api/models.py |
Introduced CollectionDataRequest class with validation logic for incoming requests. |
kairon/shared/cognition/data_objects.py |
Created CollectionData class with fields and validation for collection attributes. |
kairon/shared/cognition/processor.py |
Enhanced CognitionDataProcessor with methods for managing collection data operations, including encryption. |
tests/integration_test/services_test.py |
Added integration tests for new API endpoints, covering various scenarios for collection data management. |
tests/unit_test/data_processor/data_processor_test.py |
Developed unit tests for the CognitionDataProcessor class, validating core functionalities for collections. |
sequenceDiagram
participant User
participant API
participant Processor
participant Model
User->>API: Save Collection Data
API->>Processor: Validate and Process Data
Processor->>Model: Save Data
Model-->>Processor: Return ID
Processor-->>API: Success Message with ID
API-->>User: Success Response
sequenceDiagram
participant User
participant API
participant Processor
participant Model
User->>API: Update Collection Data
API->>Processor: Validate and Update Data
Processor->>Model: Update Data
Model-->>Processor: Confirm Update
Processor-->>API: Success Message
API-->>User: Success Response
🐰 Hop along, the changes are here,
With collections to save, update, and cheer!
Data flows smoothly, no worries or fuss,
In the world of code, it's a magical plus!
So let’s leap and rejoice, with all of our might,
For a brighter tomorrow, all bundled up tight! ✨
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 CRUD operations for the CollectionData and added unit and integration tests for the same.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
CognitionDataProcessor
class to ensure robust data management functionality.