Skip to content

Conversation

@arng40
Copy link
Contributor

@arng40 arng40 commented Nov 4, 2025

To reference an array of groups aka groupNameRefArray, we ensure we have to write attribute="{*}" .
We cannot longer write for example : attribute="*"

Also allow to have spaces spaces before and after a value in an attribute :

someAttributes="{ 0.0, 1.0, 10.0, 100.0 }"
coordinates="   { 0.0, 1.0, 10.0, 100.0 }"

@arng40 arng40 self-assigned this Nov 4, 2025
@arng40 arng40 changed the title Enforce arrayRef regex Enforce arrayRef regex & loosens xml spacing rules Nov 4, 2025
@arng40 arng40 changed the title Enforce arrayRef regex & loosens xml spacing rules refactor: Enforce arrayRef regex & loosens xml spacing rules Nov 4, 2025
@arng40 arng40 changed the title refactor: Enforce arrayRef regex & loosens xml spacing rules refactor: Enforce arrayRef regex & Handling and XML Spacing Rules Nov 5, 2025
@arng40 arng40 added ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI labels Nov 12, 2025
Copy link
Contributor

@MelReyCG MelReyCG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a few more work on unit tests

Comment on lines 302 to 303
std::make_tuple( "1e2.3 ", 0, true ),
std::make_tuple( "1 ", 0, true ),
std::make_tuple( "1e", 0, true ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing that case instead of adding one to test your new feature? (space before)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the regex has been updated this case no longer works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since your last commit, it is not prohibed nor accepted.
Take clear decision on "1 " and " 1".

Comment on lines 302 to 303
std::make_tuple( "1e2.3 ", 0, true ),
std::make_tuple( "1 ", 0, true ),
std::make_tuple( "1e", 0, true ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since your last commit, it is not prohibed nor accepted.
Take clear decision on "1 " and " 1".

Comment on lines 353 to 354
string_view stringTrimed = stringutilities::trimSpaces( value );
validateString( string( stringTrimed ), regex );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're getting issues in your unit tests because of the ordering of your validations:

Suggested change
string_view stringTrimed = stringutilities::trimSpaces( value );
validateString( string( stringTrimed ), regex );
validateString( value, regex );
string_view stringTrimed = stringutilities::trimSpaces( value );

Comment on lines +433 to +434
GroupNameTest( groupNameRefArrayRegex, "{path/to/resource*}" ),
GroupNameTest( groupNameRefArrayRegex, "{[arrayElement]}" ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these ones in non-array groupName test please?

GroupNameTest( groupNameRefArrayRegex, "{element with space, another}" ),
GroupNameTest( groupNameRefArrayRegex, "{element, element with space, 123.456, a-b}" ),
GroupNameTest( groupNameRefArrayRegex, "{ space at ends } " ),
GroupNameTest( groupNameRefArrayRegex, "{valuewith,,commas }" ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add one with all alowed whitespaces kind in-between the commas ({hello, \t\n\r ,world})

Comment on lines +381 to +384
std::string groupNameComp;
std::istringstream ss( input.m_valueToTest );
ss >> groupNameComp >> std::ws;
EXPECT_STREQ( groupNameComp.c_str(), groupName.c_str() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review type: cleanup / refactor Non-functional change (NFC)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants