Commit Graph

4 Commits

Author SHA1 Message Date
Devin AI
1bf2e760ab Fix test failures for serialization changes
- Update test_invalid_input_types to test actual serialization failure
- Update test_interpolate_only_unsupported_type_error with proper __repr__ method
- Update test_interpolate_invalid_type_validation to test serialization vs rejection
- Update test_interpolate_custom_object_validation to distinguish serializable vs unserializable objects
- All tests now align with new behavior where unsupported types are serialized instead of rejected

Co-Authored-By: João <joao@crewai.com>
2025-05-31 19:53:59 +00:00
Devin AI
80b48208d5 Address lint failure and code review feedback
- Fix unused excinfo variable in test_empty_inputs_dictionary
- Extract nested validate_type function to module-level _validate_input_type
- Add constants for supported types (SUPPORTED_PRIMITIVE_TYPES, SUPPORTED_CONTAINER_TYPES)
- Improve type hints for interpolate_only function
- Remove unused imports (List, Union)

All tests pass and lint checks are clean.

Co-Authored-By: João <joao@crewai.com>
2025-05-31 19:46:52 +00:00
Devin AI
acd5aadfd1 Fix pandas DataFrame input support in crew.kickoff()
- Add automatic serialization of unsupported types in interpolate_only
- Support pandas DataFrames and other complex objects via to_serializable
- Add comprehensive tests for DataFrame inputs
- Maintain backward compatibility with existing input types

Fixes #2925

Co-Authored-By: João <joao@crewai.com>
2025-05-31 19:41:21 +00:00
Brandon Hancock (bhancock_ai)
ed1f009c64 Feat/improve yaml extraction (#2428)
* Support wildcard handling in `emit()`

Change `emit()` to call handlers registered for parent classes using
`isinstance()`. Ensures that base event handlers receive derived
events.

* Fix failing test

* Remove unused variable

* update interpolation to work with example response types in yaml docs

* make tests

* fix circular deps

* Fixing interpolation imports

* Improve test

---------

Co-authored-by: Vinicius Brasil <vini@hey.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-03-21 18:59:55 -07:00