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

refactor: improve error message when wrong CURVE-keyword input to single speed compressor #173

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

frodehk
Copy link
Contributor

@frodehk frodehk commented Sep 14, 2023

Why is this pull request needed?

Keyword CURVES is reserved for variable speed compressors only. Single speed compressors should use the keyword CURVE. Due to the obvious similarity it is a risk that the user mixes the two, e.g. using CURVES for single speed compressors. When this happens the error message is difficult to understand.

What does this pull request change?

  • Improve error message when CURVES is used for single speed compressor models
  • Improve error message when the keyword CURVE is not found (typo etc.) in general, for single speed compressor models.

Issues related to this change:

https://equinor-ecalc.atlassian.net/browse/ECALC-20?atlOrigin=eyJpIjoiOTBjOWU5M2VjOGQwNDdmOWFkOWIxYjlhM2ExYThmNTQiLCJwIjoiaiJ9

@frodehk frodehk requested a review from a team as a code owner September 14, 2023 09:18
@frodehk frodehk self-assigned this Sep 14, 2023
@frodehk frodehk force-pushed the ECALC-20-error-message-wrong-yaml-name-compressor-curve branch from d74a73f to 5c3b83c Compare September 14, 2023 09:27
Copy link
Contributor

@jsolaas jsolaas left a comment

Choose a reason for hiding this comment

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

Looks good. It would be nice if we could figure out a way to do this in the pydantic models, but it also makes sense to do it in the yaml models (not yet used/created)

@frodehk frodehk merged commit 9502bcc into main Sep 15, 2023
4 checks passed
@frodehk frodehk deleted the ECALC-20-error-message-wrong-yaml-name-compressor-curve branch September 15, 2023 09:01
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