Skip to content
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

Add support for station names surrounded by double quotes #538

Conversation

tim-vd-aardweg
Copy link
Contributor

Fixes: #537

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Apr 17, 2023

Double quote support was tested and works. All cases from #537 (comment) now raise a validation error, as well ass these two from #459 (comment):

1.23  3.45  'some text with spaces' And everything beyond does not matter
1.23 3.45 Only_the_first_word and the test is ignored

One minor comment:
Only_the_first_word and the test is ignored results in:
"ValueError: Error parsing XYN file 'c:\DATA\dfm_tools\tests\examples\stats.xyn', line 11. Name Only_the_first_word and the test is ignored contains whitespace, so should be enclosed in single quotes."
This can also be double quotes now, so maybe "single/double quotes" or just "quotes".

@MRVermeulenDeltares
Copy link
Contributor

Peer reviewed together with @tim-vd-aardweg

@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tim-vd-aardweg
Copy link
Contributor Author

Double quote support was tested and works. All cases from #537 (comment) now raise a validation error, as well ass these two from #459 (comment):

1.23  3.45  'some text with spaces' And everything beyond does not matter
1.23 3.45 Only_the_first_word and the test is ignored

One minor comment: Only_the_first_word and the test is ignored results in: "ValueError: Error parsing XYN file 'c:\DATA\dfm_tools\tests\examples\stats.xyn', line 11. Name Only_the_first_word and the test is ignored contains whitespace, so should be enclosed in single quotes." This can also be double quotes now, so maybe "single/double quotes" or just "quotes".

Fixed the error message. Good catch! 👍

@tim-vd-aardweg tim-vd-aardweg merged commit 039ad37 into main Apr 17, 2023
@tim-vd-aardweg tim-vd-aardweg deleted the fix/537_Add_support_for_station_names_surrounded_by_double_quotes branch April 17, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for double quoted names in the .xyn file
3 participants