Option for issue-126: General approach to empty string parameter values #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull-request is a draft of one of the alternative options discussed in pull-request #134 (for fixing #126).
On reading from_las() and from_lasio() if a header field/mnemonic is an empty string convert it to python's None type.
This could be good because it would be a general rule applied to all fields/mnemonic and any changes in subsequent code to handle this would be consistent across Welly. There may be other impacts that are less favorable if processing of other fields/mnemonics expect a str object. A draft implementation could be interesting.
This draft further constrains the values changed to the parameter section and to those fields/mnemonics without a unit setting. It is limited to the parameter section just to limit any unknown impact. It would be opened up to cover other sections. The reason for limiting to fields/mnemonics without a unit setting, is that items with a unit setting are likely to be numbers and handled elsewhere.
Let me know if this change could be accepted (or rejected) or
needs some additional changes before being approved and merged.
Thank you,
DC