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

Added support for float input in scientific notation and removed float rounding. #711

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sreeramsanjay
Copy link

@sreeramsanjay sreeramsanjay commented Aug 14, 2024

Motivation

There is no support for floating-point inputs with scientific notation in the current implementation of miniWDL. Float values are rounded to 6 decimal points only; for example, floats smaller than 0.000001 are rounded to 0.0. Adding support for float input in scientific notation and removing float rounding using repr method to keep the input float value as is.
NOTE: floats smaller than 0.0001 will be return in scientific notations.

Approach

...

Checklist

  • Add appropriate test(s) to the automatic suite
  • Use make pretty to reformat the code with black
  • Use make check to statically check the code using Pyre and Pylint
  • Send PR from a dedicated branch without unrelated edits
  • Ensure compatibility with this project's MIT license

@mlin
Copy link
Collaborator

mlin commented Mar 2, 2025

@sreeramsanjay Sorry for the very slow uptake on this!

  1. The serialization of a float to a string with six decimal places is required by the WDL spec (at least in a command placeholder). Are there other contexts where the serialization could be done differently consistent with the spec?
  2. Can you supply a test case where reading a float with an exponent isn't working? I think it should generally, but specific bugs/oversights are possible certainly.

@mlin mlin added the question Further information is requested label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants