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

fix: use yaml expression type for installation #412

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

jsolaas
Copy link
Contributor

@jsolaas jsolaas commented Mar 19, 2024

Improves error messages for hcexport and regularity

Improves error messages for hcexport and regularity
@jsolaas jsolaas requested a review from a team as a code owner March 19, 2024 11:16
@@ -9,8 +9,6 @@
)
from libecalc.presentation.yaml.yaml_types.yaml_variable import YamlSingleVariable

# from libecalc.presentation.yaml.yaml_types import YamlSingleVariable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

YamlVariables still do not use YamlExpressionType, this is because we expect the type to be parsed into an expression. YamlExpressionType only validates. We should look into parsing into an expression in YamlExpressionType I think, if we go that route we probably don't need to implement pydantic specific methods in expression.py (__get_pydantic_core_schema__ etc.). The alternative is to make expression.py validate similar to YamlExpressionType and use that in the Yaml classes.

@jsolaas jsolaas merged commit 4a2bdf9 into main Mar 20, 2024
6 checks passed
@jsolaas jsolaas deleted the fix/expression-errors branch March 20, 2024 07:51
equinor-schen pushed a commit that referenced this pull request Aug 23, 2024
Improves error messages for hcexport and regularity
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