-
Notifications
You must be signed in to change notification settings - Fork 59
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
Scan keywords with roffio when importing GridProperties #954
Conversation
Codecov Report
@@ Coverage Diff @@
## main #954 +/- ##
==========================================
- Coverage 80.57% 80.53% -0.05%
==========================================
Files 91 91
Lines 13488 13501 +13
Branches 2224 2229 +5
==========================================
+ Hits 10868 10873 +5
- Misses 1899 1904 +5
- Partials 721 724 +3
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2af8fde
to
378f593
Compare
378f593
to
f159c80
Compare
I would the think the issue in #939 is the "<" letters, which I am pretty sure that Eclipse and friends will not allow in keywords.
If it is the byte position reports that are not supported, I think that is something which can be safely changed, and end users never will have use of that. Would it then be possible to scan with roffio completely? |
Yep! It is specifically the |
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.
LGTM
When importing a roff GridProperties file the names of the properties were scanned with C code which fails to collect keynames that begin with "NA". This change instead collects the valid keynames with roffio. Benchmark testing with roff files of different sizes showed that this incurs a consistent performance drop of 0.01 seconds.
Touched on the `scan_keywords` method while working looking through `_grid3d_utils.scan_keywords` invocations.
f159c80
to
59cba8c
Compare
Resolves #939
This test failure is caused by
xtgeo/src/clib/xtg/grd3d_scan_roffbinary.c
Lines 367 to 373 in 69d8caa
This will ignore any properties starting with "NA", which is probably not what we want. This PR changes to scan keywords with roffio instead, at a minor performance hit. We could probably seek to replace the C scan with roffio completely, but the
GridProperties.scan_keywords()
method has a return format that roffio cannot support.Benchmarks: