-
Notifications
You must be signed in to change notification settings - Fork 16
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 scientific notation filter #1077
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I had one comment for you to address, which may result in updating the code documentation to be more clear about the behavior or changing the template filter to ignore large values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a stylistic change to the filter itself, and did more work on the tests, so it self-documents what this filter returns.
|
||
|
||
class TestENotation: | ||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes it very clear what this filter does. I'd recommend doing something like this in the future so there's no ambiguity in what the filter looks like.
Add a template filter that formats floats in scientific notation when <=1e-5 or >1e5, and use that filter when displaying assessment values.