-
Notifications
You must be signed in to change notification settings - Fork 155
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
Parse unit starting with dot #402
Comments
Hi @eimerej thank you for raising this issue! Excellent points, and thank you for the PR also! |
Hi @kinverarity1, @eimerej, Thinking through the [name][.][unit] parsing scenarios. While Lasio doesn't currently parse all of these in the following (expected?) ways, 1 - 4 are do-able with just the information in a given metadata line. Number 5 shows situations where parsing is ambiguous. Draft branch at #413, demonstrates test cases for these examples so you can see the current state of parsing behavior. Could you check that these scenarios demonstrate the desired parsing behavior?
DC |
Hi @kinverarity1, Okay, this is good feedback! Thanks. Hold off on proceeding with #413. The tests will fail for now. I've been mulling over how to implement handling these in code. I hope to work on it in the next couple of weeks. DC |
Hi @eimerej, The initial example in this issue Thanks, |
Hi @dcslagel, |
Just a quick update, I'm still working on this, just delayed with other activities.. .. Making progress... |
Hi @eimerej , @kinverarity1 , After spending a fair amount of time looking that this, it @eimerej 's solution in pull-request #403 is the right one for now. It takes care of the cases .1 and .2 that I listed above and the cases .3 and .4 are highly unlikely and can be solved if there is ever a real-world case reported. Case .5, @kinverarity1 , mentioned it is okay to let it resolve with the current logic in Laisio. So all that said, I encourage merging pull request #403. Thank you for allowing me to dig in to this problem for extended period of time.. DC |
I have Las with unit starting with dot:
TDEP ..1IN :0.1-ft Frame Depth {F13.4}
In this case, the first dot is part of the mnemonic instead of the unit.
This is a special behavior implemented in lasio to support '..' caused by mnemonic abbreviation.
From the function configure_metadata_patterns(line, section_name)
According to the standard (2.0 and 3.0) mnemonic should not contains dot but unit could.
I see two way of solving this issue:
name_with_dots_re
regexpThe text was updated successfully, but these errors were encountered: