Skip to content
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

allow imports list for executequery and filterbyquery and rename to ExecuteExpression and FilterByExpression #542

Merged
merged 7 commits into from
Feb 5, 2024

Conversation

dafnapension
Copy link
Collaborator

No description provided.

@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch from 7f6f316 to 3c6c458 Compare January 31, 2024 19:40
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fee7ec1) 93.94% compared to head (f389889) 93.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #542   +/-   ##
=======================================
  Coverage   93.94%   93.94%           
=======================================
  Files         211      211           
  Lines        8104     8104           
=======================================
  Hits         7613     7613           
  Misses        491      491           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch from 8c4750c to 8a86d0a Compare February 1, 2024 08:11
@dafnapension dafnapension changed the title allow imports list for executequery and filterbyquery allow imports list for executequery and filterbyquery and rename to AssignExpression and FilterByExpression Feb 1, 2024
@elronbandel
Copy link
Member

I think AssignExpression might give the impression its just adding the expression as a field. I think that if the name was ExecuteExpression is it was more clear the expression is executed. what do you think @yoavkatz @dafnapension ?

@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch from 8a86d0a to 32f6da7 Compare February 1, 2024 09:19
@dafnapension
Copy link
Collaborator Author

dafnapension commented Feb 1, 2024

No problem in renaming. I was not sure why the expression is more 'executed' in this operator than it is by FilterByExpression.
I thought that the difference between those two is by what you do with the value of the expression:
filter (by the computed expression) vs assign (the computed expression) to to_field.
The expression is actually 'executed' (i.e. computed) by the Mixin.

"""

expression: str
imports_list: List[str] = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not good. as the imports_list here is assigned at the class level which means all the instances will forver use the same list

Can be fixed by first: from .dataclass import OptionalField

Then imports_list: List[str] = OptionalField(default_factory=list)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I missed that..

@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch 5 times, most recently from 7c074d3 to ac2b572 Compare February 4, 2024 10:54
@dafnapension dafnapension changed the title allow imports list for executequery and filterbyquery and rename to AssignExpression and FilterByExpression allow imports list for executequery and filterbyquery and rename to ExecuteExpression and FilterByExpression Feb 4, 2024
@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch 2 times, most recently from 2c121dd to c499612 Compare February 4, 2024 12:06
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
@dafnapension dafnapension force-pushed the add_imports_list_to_execute_query branch from fb8bbb0 to f389889 Compare February 4, 2024 21:46
@elronbandel elronbandel merged commit d5025f5 into main Feb 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants