-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(SemanticLayerSchema): making column type optional and avoid dumping and parsing null values in the SemanticLayerSchema #1521
Merged
Conversation
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
…e, removes unreachable code and adds tests for _load_from_local_source
…into release/v3 * 'release/v3' of https://github.com/scaliseraoul/pandas-ai: ci: fix lint refactor: remove workspace
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…into release/v3 * 'release/v3' of https://github.com/scaliseraoul/pandas-ai: refactor(loader): renames _load_from_source to _load_from_local_source removes unreachable code and adds tests for _load_from_local_source (sinaptik-ai#1514)
…gical and business validation
…over the code instead of the dictionary
…ing and parsing null values in the SemanticLayerSchema
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 f889c86 in 1 minute and 38 seconds
More details
- Looked at
254
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. docs/v3/contributing.mdx:67
- Draft comment:
Ensure that the change frommake tests
tomake test_all
is reflected in the actual Makefile or test script to maintain consistency. - Reason this comment was not posted:
Confidence changes required:50%
The change in the test command frommake tests
tomake test_all
in the documentation should be reflected in the actual Makefile or test script. This ensures consistency between the documentation and the actual commands used.
2. pandasai/dataframe/base.py:179
- Draft comment:
Check ifcolumns_dict
is notNone
before mapping it toColumn
objects to avoid potentialTypeError
. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. pandasai/data_loader/semantic_layer_schema.py:38
- Draft comment:
Ensure thatparams
is checked forNone
before accessing its elements to avoid potentialAttributeError
. - Reason this comment was not posted:
Comment did not seem useful.
4. pandasai/data_loader/semantic_layer_schema.py:27
- Draft comment:
Check iftype
is notNone
before validating it to avoid potentialTypeError
. - Reason this comment was not posted:
Marked as duplicate.
5. pandasai/data_loader/semantic_layer_schema.py:30
- Draft comment:
Consider rephrasing the error message for unsupported column type for clarity:
f"Unsupported column type: {type}. Supported types are: {', '.join(VALID_COLUMN_TYPES)}."
- Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_8URjNb3RqkoKGaja
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Make column type optional in
SemanticLayerSchema
and avoid dumping/parsing null values, with related documentation and code updates.type
inColumn
class insemantic_layer_schema.py
is now optional.params
inTransformation
class insemantic_layer_schema.py
is now optional.to_dict()
method inSemanticLayerSchema
now excludesNone
values.to_yaml()
method inSemanticLayerSchema
usesto_dict()
to excludeNone
values.docs/v3/semantic-layer.mdx
to reflect changes in column definition from dict to list.docs/v3/contributing.mdx
to changemake tests
tomake test_all
._get_abs_dataset_path()
inloader.py
to return a string path._create_yml_template()
inbase.py
to handle optional columns.test_save_creates_correct_schema()
intest_dataframe.py
to reflect schema changes.This description was created by
for f889c86. It will automatically update as commits are pushed.