-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Chore] Fix typos, and organize functions for style #1087
base: canary
Are you sure you want to change the base?
Conversation
@miguelcsx is attempting to deploy a commit to the Gloo Team on Vercel. A member of the Team first needs to authorize it. |
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 825d39e in 46 seconds
More details
- Looked at
1960
lines of code in86
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. integ-tests/python/baml_example_app.py:26
- Draft comment:
Typo in 'parsable'. It should be 'parsable'. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions fixing typos, and there is a typo in the word 'parsable' which should be 'parsable'.
Workflow ID: wflow_y9qTlou2pZadm1H8
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
- fixed typos in code and comments - reorganized function for improved readability and style
825d39e
to
7533516
Compare
will pause this until #1006 is merged in |
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.
@miguelcsx if you're still interested in getting this PR in, you're welcome to pick it back up now! There's probably a whole bunch of merge conflicts that you'll need to address, you might need to redo this from scratch.
@@ -304,7 +304,7 @@ impl PredefinedTypes { | |||
}; | |||
|
|||
// Any vars that are in both branches are merged | |||
// Any vars that are only in one branch, unioned with undefined | |||
// Any vars that are only in one branch, united with undefined |
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.
// Any vars that are only in one branch, united with undefined | |
// Any vars that are only in one branch, unioned with undefined |
"unioned" is technically an invalid word but is deliberately used here to reference type unions
@@ -32,7 +32,7 @@ pub(super) fn coerce_optional( | |||
Some(v) => match inner.coerce(ctx, optional_target, Some(v)) { | |||
Ok(v) => Ok(v), | |||
Err(e) => { | |||
flags.add_flag(Flag::DefaultButHadUnparseableValue(e)); | |||
flags.add_flag(Flag::DefaultButHadUnparsableValue(e)); |
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.
flags.add_flag(Flag::DefaultButHadUnparsableValue(e)); | |
flags.add_flag(Flag::DefaultButHadUnparseableValue(e)); |
both "parseable" and "parsable" are valid spellings, but the former will show up when grepping/searching for "parse"
Flag::DefaultButHadUnparsableValue(value) => { | ||
write!(f, "Null but had unparsable value")?; |
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.
unparseable
@@ -320,7 +320,7 @@ test_deserializer!( | |||
|
|||
// This is un-changed | |||
test_deserializer!( | |||
test_prefixed_incompleted_string, | |||
test_prefixed_incompletestring, |
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.
test_prefixed_incompletestring, | |
test_prefixed_incomplete_string, |
@@ -156,7 +156,7 @@ pub fn parse_schema( | |||
pest::error::ErrorVariant::ParsingError { positives, .. } => { | |||
get_expected_from_error(&positives) | |||
} | |||
_ => panic!("Could not construct parsing error. This should never happend."), | |||
_ => panic!("Could not construct parsing error. This should never happened."), |
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.
_ => panic!("Could not construct parsing error. This should never happened."), | |
_ => panic!("Could not construct parsing error. This should never happen."), |
println!(""); | ||
println!("Please install mise and direnv to build BAML (instructions: https://www.notion.so/gloochat/To-build-BAML-0e9e3e9b583e40fb8fb040505b24d65f )"); | ||
println!(""); | ||
println!("\nPlease install mise and direnv to build BAML (instructions: https://www.notion.so/gloochat/To-build-BAML-0e9e3e9b583e40fb8fb040505b24d65f )\n"); |
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.
undo this change, separate println's are deliberate
#[cfg(not(feature = "internal"))] | ||
pub(crate) use internal_baml_jinja::{ChatMessagePart, RenderedPrompt}; |
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.
restore this, i don't trust this change
@@ -382,7 +380,7 @@ impl BamlRuntime { | |||
// generating code, run 'baml-cli dev' to generate code" because that's surprising | |||
// | |||
// We _could_ do something like "show that message the first time the user tries to | |||
// codegen for rest/openapi", but that's overengineered, I think | |||
// codegen for rest/openapi", but that's over engineered, I think |
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.
// codegen for rest/openapi", but that's over engineered, I think | |
// codegen for rest/openapi", but that's overengineered, I think |
@@ -22,7 +22,7 @@ node -e "const prismaSchema = require('@prisma/prisma-schema-wasm'); console.log | |||
- It is triggered from the https://github.com/prisma/engines-wrapper publish action. | |||
- The [Rust source code](https://github.com/prisma/prisma-engines/tree/main/prisma-schema-wasm/src) for the wasm module | |||
- The [nix build definition](https://github.com/prisma/prisma-engines/blob/main/prisma-schema-wasm/default.nix) | |||
- It gives us a fully reproducible, thoroughly described build process and environment. The alternative would be a bash script with installs through `rustup`, `cargo install` and `apt`, with underspecified system dependencies and best-effort version pinning. | |||
- It gives us a fully reproducible, thoroughly described build process and environment. The alternative would be a bash script with installs through `rustup`, `cargo install` and `apt`, with under specified system dependencies and best-effort version pinning. |
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.
- It gives us a fully reproducible, thoroughly described build process and environment. The alternative would be a bash script with installs through `rustup`, `cargo install` and `apt`, with under specified system dependencies and best-effort version pinning. | |
- It gives us a fully reproducible, thoroughly described build process and environment. The alternative would be a bash script with installs through `rustup`, `cargo install` and `apt`, with underspecified system dependencies and best-effort version pinning. |
Description
This PR addresses the following non-functional maintenance tasks:
No functional changes have been made in this PR. The main objective is to improve the maintainability and clarity of the code.
Closes #1086
Important
Cleaned up unused imports, fixed typos, and reorganized functions for improved code style and readability.
to_baml_arg.rs
,json_schema.rs
,repr.rs
,chat_message_part.rs
,array_helper.rs
,coerce_optional.rs
,field_type.rs
,coerce_class.rs
,match_string.rs
,types.rs
,iterative_parser.rs
,parse_state.rs
,raw_value.rs
,test_iterative_parser.rs
,fixing_parser.rs
,json_collection.rs
,json_parse_state.rs
,value.rs
,lib.rs
,api_interface.rs
,core_types.rs
,mod.rs
,threaded_tracer.rs
,harness.rs
,test_runtime.rs
,runtime_wasm.rs
,generate_types.rs
,mod.rs
,parse_py_type.rs
,runtime.rs
,baml_example_app.py
.CHANGELOG.md
,README.md
,to_baml_arg.rs
,json_schema.rs
,repr.rs
,types.rs
,comments.rs
,misspeled_boolean_literals.baml
,valid_dictionary.baml
,shorthand_clients.baml
,failing_tests.baml
,valid_tests.baml
,valid.baml
,baml_value_to_jinja_value.rs
,chat_message_part.rs
,lib.rs
,api_interface.rs
,core_types.rs
,mod.rs
,threaded_tracer.rs
,harness.rs
,test_runtime.rs
,runtime_wasm.rs
,generate_types.rs
,mod.rs
,parse_py_type.rs
,runtime.rs
,baml_example_app.py
.to_baml_arg.rs
,json_schema.rs
,repr.rs
,chat_message_part.rs
,array_helper.rs
,coerce_optional.rs
,field_type.rs
,coerce_class.rs
,match_string.rs
,types.rs
,iterative_parser.rs
,parse_state.rs
,raw_value.rs
,test_iterative_parser.rs
,fixing_parser.rs
,json_collection.rs
,json_parse_state.rs
,value.rs
,lib.rs
,api_interface.rs
,core_types.rs
,mod.rs
,threaded_tracer.rs
,harness.rs
,test_runtime.rs
,runtime_wasm.rs
,generate_types.rs
,mod.rs
,parse_py_type.rs
,runtime.rs
,baml_example_app.py
.This description was created by for 825d39e. It will automatically update as commits are pushed.