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

[Feature Request] Improve Formula parsing/printing consistency #62

Open
kMutagene opened this issue Jul 26, 2019 · 0 comments
Open

[Feature Request] Improve Formula parsing/printing consistency #62

kMutagene opened this issue Jul 26, 2019 · 0 comments
Labels
FeatureRequest priority-medium project-Core Issues regarding the BioFSharp project
Milestone

Comments

@kMutagene
Copy link
Member

Is your feature request related to a problem? Please describe.
the input of Formula.parseFormulaString and the output of Formula.toString are inconsistent:

let CO2 = Formula.parseFormulaString "CO2" // Number is an integer and no space between the elements

Formula.toString CO2 // val it : string = "C1.00 O2.00 " Number is a float and theres a space between the elements

while the output of the Formula.toString is valid input for Formula.parseFormulaString, i dont understand why we need the spaces and floats.

Additionally, (CO)2 is not parsed correctly (this case is marked as To-Do in the source code):

let C2O2 = Formula.parseFormulaString "(CO)2" 

Formula.toString CO2 // val it : string = "C1.00 O2.00" , expected "C1.00 O2.00"

Describe the solution you'd like
Solve the (CO)2 problem, change number output of Formula.toString to int and remove spaces

Describe alternatives you've considered
Formula.toString output is not wrong per se, so we could leave it as-is, but the (CO)2 problem needs fixing

@kMutagene kMutagene added FeatureRequest priority-medium project-Core Issues regarding the BioFSharp project labels Jul 26, 2019
@kMutagene kMutagene added this to the Backlog milestone Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest priority-medium project-Core Issues regarding the BioFSharp project
Projects
None yet
Development

No branches or pull requests

1 participant