-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: evaluate expression from root (#67)
* fix: evaluate expressions from root to support branches * chore: vscode-pytest only use tests folder
- Loading branch information
Showing
29 changed files
with
1,046 additions
and
866 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
from data_factory_testing_framework.functions.evaluator import ExpressionEvaluator | ||
from data_factory_testing_framework.functions.functions_repository import FunctionsRepository | ||
|
||
__all__ = [ | ||
"FunctionsRepository", | ||
"ExpressionEvaluator", | ||
] |
291 changes: 0 additions & 291 deletions
291
src/data_factory_testing_framework/functions/_expression_transformer.py
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
src/data_factory_testing_framework/functions/evaluator/__init__.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .expression_evaluator import ExpressionEvaluator | ||
|
||
__all__ = [ | ||
"ExpressionEvaluator", | ||
] |
21 changes: 21 additions & 0 deletions
21
src/data_factory_testing_framework/functions/evaluator/exceptions.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import Union | ||
|
||
from data_factory_testing_framework.exceptions.expression_evaluation_error import ExpressionEvaluationError | ||
|
||
|
||
class ExpressionEvaluationInvalidNumberOfChildrenError(ExpressionEvaluationError): | ||
"""Expression evaluation invalid number of children error.""" | ||
|
||
def __init__(self, required: int, actual: int) -> None: | ||
"""Initialize expression evaluation invalid number of children error.""" | ||
super().__init__(f"Invalid number of children. Required: {required}, Actual: {actual}") | ||
|
||
|
||
class ExpressionEvaluationInvalidChildTypeError(ExpressionEvaluationError): | ||
"""Expression evaluation invalid child type error.""" | ||
|
||
def __init__(self, child_index: int, expected_types: Union[tuple[type], type], actual_type: type) -> None: | ||
"""Initialize expression evaluation invalid child type error.""" | ||
super().__init__( | ||
f"Invalid child type at index {child_index}. Expected: {expected_types}, Actual: {actual_type}" | ||
) |
Oops, something went wrong.