-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coerce floats and ints with commas and other special cases (#1023)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Enhance deserialization to handle numbers with commas and currency symbols, adding tests for validation in `coerce_primitive.rs`, `test_basics.rs`, and `test_lists.rs`. > > - **Behavior**: > - Enhance `coerce_int` and `coerce_float` in `coerce_primitive.rs` to handle numbers with commas and currency symbols. > - Introduce `float_from_comma_separated` to parse numbers with commas as decimal or thousand separators. > - **Tests**: > - Add `test_float_from_comma_separated` in `coerce_primitive.rs` to validate parsing of numbers with commas and currency symbols. > - Add tests in `test_basics.rs` and `test_lists.rs` for deserializing numbers with commas. > - **Misc**: > - Add a TODO comment in `render_output_format.rs` indicating a need for `FieldType`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for f299c5e. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
- Loading branch information
Showing
4 changed files
with
222 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters