-
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): Refactoring using SemanticLayerSchema all over the code instead of the dictionary #1520
Conversation
…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
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.
❌ Changes requested. Reviewed everything up to a43c1db in 2 minutes and 10 seconds
More details
- Looked at
944
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. pandasai/data_loader/loader.py:231
- Draft comment:
Consider adding a check for unsupported cache formats and raise an exception to handle them explicitly. - Reason this comment was not posted:
Marked as duplicate.
2. pandasai/dataframe/virtual_dataframe.py:36
- Draft comment:
Ensureschema.source.table
andschema.description
are notNone
before using them to initializetable_name
anddescription
. - Reason this comment was not posted:
Comment did not seem useful.
3. pandasai/data_loader/loader.py:156
- Draft comment:
The error message for unsupported file format should be more informative. Consider using:
raise ValueError(f"Unsupported file format: {format}. Supported formats are: 'csv', 'parquet'.")
- Reason this comment was not posted:
Comment was on unchanged code.
4. pandasai/data_loader/loader.py:231
- Draft comment:
The error message for unsupported cache format should be more informative. Consider using:
raise ValueError(f"Unsupported cache format: {cache_format}. Supported formats are: 'csv', 'parquet'.")
- Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_UnFzo6WKG0Sqz2QQ
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Refactor code to use
SemanticLayerSchema
instead of dictionaries for schema representation, enhancing type safety and readability, with updated tests.SemanticLayerSchema
inloader.py
,query_builder.py
, andbase.py
.DatasetLoader
to useSemanticLayerSchema
for schema handling.QueryBuilder
to acceptSemanticLayerSchema
.Source
class insemantic_layer_schema.py
.Destination
format is supported insemantic_layer_schema.py
.test_loader.py
,test_query_builder.py
, andtest_semantic_layer_schema.py
to useSemanticLayerSchema
._validate_schema
method fromDataFrame
class inbase.py
.to_yaml
method inSemanticLayerSchema
for YAML serialization.This description was created by
for a43c1db. It will automatically update as commits are pushed.