Commit Graph

2 Commits

Author SHA1 Message Date
k-boikov
360d5cd577 Prevent docker compose to break config by creating folders (#4125) 2023-05-22 13:36:20 +03:00
Luke K
064ac5c742 Refactor AIConfig to Sanitize Input for Goal Parameters (#3492)
* Update remove_color_codes to handle non-string input

The `remove_color_codes` function now accepts any type of input that can be cast to a string. Previously, it was only accepting string input and not casting non-string types to string which was causing errors in some cases.

The changes were made to both logs.py and its corresponding test file.

* Refactor AIConfig to Sanitize Input for Goal Parameters

Details:
- Modified `ai_config.py` to correctly handle and sanitize user input for AI goals and convert them to formatted strings, to fix an issue where some specially formatted ai_settings.yaml files were causing goals to load as list[dict]
- `test_ai_config.py` includes a test for the `sanitize_input` function in `AIConfig` class.
- Removed unnecessary tests from `test_logs.py`

* Update for readabiity

* Update for readabiity

* Updates for conciceness

* Updated tests to confirm AIConfig saves goals as strings

* FIxed trailing space at end of line

---------

Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: James Collins <collijk@uw.edu>
2023-04-29 22:37:41 -07:00