-
Notifications
You must be signed in to change notification settings - Fork 225
Add docs for dynamic types tests #1307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 6ecdca8 in 11 seconds
More details
- Looked at
253
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. fern/01-guide/04-baml-basics/testing-functions.mdx:473
- Draft comment:
Add a newline at the end of the file for consistency and to follow best practices. - Reason this comment was not posted:
Confidence changes required:10%
The documentation update is missing a newline at the end of the file, which is a common best practice.
Workflow ID: wflow_J16FeT9GsRk6yr0Y
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 9e54097 in 18 seconds
More details
- Looked at
406
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. fern/01-guide/04-baml-basics/testing-functions.mdx:323
- Draft comment:
The PR introduces a snippet inclusion for dynamic class tests, but the description lacks clarity on the changes made. Consider updating the PR description to explicitly mention the inclusion of the snippet for better clarity. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a snippet inclusion for dynamic class tests, but the description lacks clarity on the changes made. The snippet inclusion is a good practice for reusability, but the description should mention this change explicitly.
Workflow ID: wflow_2Cz6InMWMZsIjgQ5
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on babb416 in 14 seconds
More details
- Looked at
16
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. fern/03-reference/baml_client/typebuilder.mdx:332
- Draft comment:
Ensure the updated link is correct and points to the intended section. The change improves specificity, but verify the target content is relevant. - Reason this comment was not posted:
Confidence changes required:50%
The PR changes a link in the documentation to point to a more specific guide. This is a minor change, but it's important to ensure the link is correct and relevant.
Workflow ID: wflow_JVLGo1gpzLsWIv0y
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Docs #1307 Discussion #1310 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Implement comprehensive testing and support for dynamic types in the BAML engine, including parsing, validation, and runtime handling. > > - **Behavior**: > - Add support for dynamic types in `to_baml_arg.rs` by checking for `dynamic_type` attribute. > - Implement `type_builder` blocks in `repr.rs` to handle dynamic type definitions within tests. > - Add validation for `type_builder` blocks in `lib.rs`. > - **Testing**: > - Add tests for dynamic types in `dynamic_types.baml`, `dynamic_types_external_cycle_errors.baml`, `dynamic_types_internal_cycle_errors.baml`, `dynamic_types_parser_errors.baml`, and `dynamic_types_validation_errors.baml`. > - Implement `run_type_builder_block_test` in `test_runtime.rs` to test dynamic type handling. > - **Parsing**: > - Update `parse_type_expression_block.rs` and `parse_value_expression_block.rs` to handle `dynamic` and `type_builder` blocks. > - Add `parse_type_builder_block.rs` for parsing `type_builder` blocks. > - **Runtime**: > - Extend `RuntimeContextManager` and `RuntimeContext` to support dynamic type overrides. > - Implement `get_test_type_builder` in `runtime_interface.rs` to retrieve type builders for tests. > - **WASM**: > - Update `runtime_wasm/mod.rs` to handle dynamic types in WASM environment. > - **Syntax Highlighting**: > - Update `codemirror-lang-baml` and `vscode-ext` to support `type_builder` and `dynamic` syntax highlighting. > > <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 483363d. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
Important
This PR adds documentation for testing dynamic types in BAML, detailing the use of
type_builder
anddynamic
blocks with examples for dynamic classes and enums.testing-functions.mdx
,dynamic-types.mdx
,dynamic.mdx
,test.mdx
, andtypebuilder.mdx
.type_builder
anddynamic
blocks.snippets/dynamic-class-test.mdx
with a code example for dynamic class testing.type_builder
anddynamic
blocks.This description was created by
for babb416. It will automatically update as commits are pushed.