Skip to content

Convert lognormal dist validation to exception-based approach - #732

Merged
dafeda merged 2 commits into
equinor:mainfrom
dafeda:refactor-lognormal
Aug 26, 2025
Merged

Convert lognormal dist validation to exception-based approach#732
dafeda merged 2 commits into
equinor:mainfrom
dafeda:refactor-lognormal

Conversation

@dafeda

@dafeda dafeda commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@dafeda dafeda self-assigned this Aug 25, 2025

assert not dists._check_dist_params_lognormal(["mean", "mu"])[0]
def test_that_valid_lognormal_parameters_return_float_tuple(self):
assert dists.parse_and_validate_lognormal_params([0, 1]) == (0.0, 1.0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"0" and "1" are also valid parameters in parser code, but untested.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I've added a test.

@berland berland left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🥇

@dafeda
dafeda merged commit abea817 into equinor:main Aug 26, 2025
7 checks passed
@dafeda
dafeda deleted the refactor-lognormal branch August 26, 2025 07:10
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