ECC-2317: Improve parsing comma-separated arguments - #533
Conversation
| tempGrib=temp.$label.grib | ||
| sample_grib2=$ECCODES_SAMPLES_PATH/sh_ml_grib2.tmpl | ||
|
|
||
| ${tools_dir}/grib_set -s gridSpec='{grid:[0.5,0.5]}' ${sample_grib2} $tempGrib |
There was a problem hiding this comment.
Another test should be added which combines the two forms separated by commas
e.g.,
grib_set -s year=1994,gridSpec='{blah,blah,etc}',month=5 in out
There was a problem hiding this comment.
That’s a good point! Otherwise, the test wouldn’t be complete.
There was a problem hiding this comment.
Also check what we just set actually went through,
grib_check_key_equals out month 5
grib_check_key_equals out year 1994
etc
There was a problem hiding this comment.
And also the grid increment changes should be checked ( as a result of setting gridSpec key )
:)
There was a problem hiding this comment.
For gridSpec, we’re adding a new systematic test. We’ll cover it there. Thanks a lot for improving the test!
|
|
||
| grib_check_key_equals $tempGrib month 1 | ||
| grib_check_key_equals $tempGrib year 1983 | ||
| grib_check_key_equals $tempGrib gridSpec '{"area":[20,0,0,20],"grid":[10,10]}' |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #533 +/- ##
===========================================
- Coverage 88.22% 88.22% -0.01%
===========================================
Files 854 854
Lines 63553 63559 +6
Branches 11290 11293 +3
===========================================
+ Hits 56071 56075 +4
- Misses 7482 7484 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
This pull request addresses parsing improvements in the
parse_keyval_stringfunction to handle comma-separated values that may include nested JSON-like structures. It also introduces a new regression test to ensure correct behavior for this case and updates the test suite to include the new test.Contributor Declaration
By opening this pull request, I affirm the following: