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

chore: improve error message for extra pfs columns #541

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

frodehk
Copy link
Contributor

@frodehk frodehk commented Jun 27, 2024

ECALC-1342

Have you remembered and considered?

  • I have added tests
  • I have used conventional commits syntax (if you squash, make sure that conventional commit is used)
  • I have included the Jira issue ID somewhere in the commit body (ECALC-XXXX)

Why is this pull request needed?

Error message if illegal category is used for extra power from shore columns (CABLE_LOSS and MAX_USAGE_FROM_SHORE) is the same, even if only one of them is used in the model. Can be confusing for user.

What does this pull request change?

  • Improve error message to point at the problematic column (or both columns if they are in the model)
  • Add and update tests

Issues related to this change:

https://equinor-ecalc.atlassian.net/browse/ECALC-1342?atlOrigin=eyJpIjoiMzljZmE4MjlkZWZjNGFmM2EwYmIxNDU4ZGQyNTdkOWUiLCJwIjoiaiJ9

@frodehk frodehk self-assigned this Jun 27, 2024
@frodehk frodehk requested a review from a team as a code owner June 27, 2024 10:41
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.

It is possible to create reusable validators, they seem to be the same? We could also probably create a validator that could run separately for CABLE_LOSS and MAX_USAGE_FROM_SHORE, which would create two errors in the case where both are specified without the correct category.

@frodehk frodehk merged commit 13bac91 into main Jul 23, 2024
9 checks passed
@frodehk frodehk deleted the ECALC-1342-improve-error-message-for-extra-pfs-columns branch July 23, 2024 08:42
equinor-schen pushed a commit that referenced this pull request Aug 23, 2024
* chore: improve error message for extra pfs columns

ECALC-1342
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