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

Add tests for sum rules #1507

Merged
merged 2 commits into from
Jan 31, 2022
Merged

Add tests for sum rules #1507

merged 2 commits into from
Jan 31, 2022

Conversation

scarlehoff
Copy link
Member

The sum rules are important enough to be tested explicitly.

ret = pd.concat([known_sumrules, central_val], axis=1)
# The unknown sum rules need to be treated a bit because
# 1) They don't contain min or max
# 2) They are of type object?
Copy link
Contributor

Choose a reason for hiding this comment

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

This is so that the central value and error are displayed with a reasonable number of decimals in all cases. See

https://github.com/NNPDF/reportengine/blob/675036a93ffc853398d169501d7fc40c9c2cb168/src/reportengine/floatformatting.py#L55

I guess one could use unknown_sum_rules action instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. But the other problem stays so not sure if it changes much (and the others are floats)

Copy link
Contributor

@Zaharid Zaharid left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Thanks for adding the test.

Copy link
Member

@RoyStegeman RoyStegeman left a comment

Choose a reason for hiding this comment

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

Seems ok!

@scarlehoff scarlehoff merged commit ab7f053 into master Jan 31, 2022
@scarlehoff scarlehoff deleted the add_test_for_sumrules branch January 31, 2022 10:27
@Zaharid Zaharid added the enhancement New feature or request label May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants