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

feat/ING-3911 #1033

Merged
merged 5 commits into from
Jul 7, 2023
Merged

Conversation

emanuelaepure10
Copy link
Contributor

A new format .cpg has been added to the creatin of the .shp files.
The new files contains just the encoding text, such as “UTF-8”.

ING-3911

@kapil-agnihotri kapil-agnihotri self-requested a review June 29, 2023 09:27
@emanuelaepure10 emanuelaepure10 force-pushed the feat/ING-3911 branch 2 times, most recently from de91b2d to 8e68b12 Compare June 30, 2023 06:21
@kapil-agnihotri
Copy link
Member

retest this please

From the test class the whenReadWithBufferedReader_thenCorrect() and testCPGFileCreation() have been removed and a new method testCpgFileAgainstRelatedSpapefile() called from all the Test methods.
The writer has been updated taking the charset from the ShapefileDataStore of the related shapefile or adding the default charset in case the above one is null

feat: extend shapefile writer to create .cpg file

Create .cpg file/files when one/more .shp files are created.
The .cpg file contain only the encoding used to write the shapefile.
Create test for creating .cpg file
Create .cpg file/files when one/more .shp files are created.
The .cpg file contain only the encoding used to write the shapefile.
Create test for checking .cpg file content against related .shp file
@stempler
Copy link
Member

stempler commented Jul 4, 2023

@kapil-agnihotri Any idea related to the build failure?
Since the last build was yesterday it should not be related to the Artifactory downtime. I also would not expect the problem that we saw in hale-cli, since that was Gradle related (though if we can't find anything else it would be worth to also look into changing the artifactory repo, if it is part of the repos that Maven uses here).

@kapil-agnihotri
Copy link
Member

The error doesn't look like from our repositories but from groovy.jfrog.io artifactory.
The error states that Failure to find org.osgi:org.osgi.service.prefs:jar:1.1.2 in https://groovy.jfrog.io/artifactory/plugins-release . I checked manually in the artifactory and the jar is not available now.
I created PR by bringing mavenCentral on top in the repository list and the build now works.

Merge master into feat/ING-3911 to solve the problem
of the build: change priority list of pluginRepositories
@kapil-agnihotri
Copy link
Member

retest this please

@stempler
Copy link
Member

stempler commented Jul 6, 2023

@emanuelaepure10
Not easily understandable from the stacktrace in the failing tests what is going wrong here. Maybe you can try to debug one of these locally? (Or does the problem not exist when you run them locally?)

Advice on running unit tests in hale studio can be found here (sadly the "Run/debug as JUnit Plug-in test" in Eclipse often is quite slow to start depending on the Eclipse version, so there is an alternative described):
https://github.com/halestudio/hale/wiki/Tests#run-a-single-test-class-or-method

@emanuelaepure10
Copy link
Contributor Author

@stempler I get 15 tests complete with success.
Thank you very much for the link.

Update test containing text with special characters

Decode the encoded text containing special characters
@emanuelaepure10 emanuelaepure10 merged commit 6083214 into halestudio:master Jul 7, 2023
kapil-agnihotri pushed a commit to kapil-agnihotri/hale that referenced this pull request Aug 7, 2023
* Update test and writer

From the test class the whenReadWithBufferedReader_thenCorrect() and testCPGFileCreation() have been removed and a new method testCpgFileAgainstRelatedSpapefile() called from all the Test methods.
The writer has been updated taking the charset from the ShapefileDataStore of the related shapefile or adding the default charset in case the above one is null

feat: extend shapefile writer to create .cpg file

Create .cpg file/files when one/more .shp files are created.
The .cpg file contain only the encoding used to write the shapefile.
Create test for creating .cpg file

* feat: extend shapefile writer to create .cpg file

Create .cpg file/files when one/more .shp files are created.
The .cpg file contain only the encoding used to write the shapefile.
Create test for checking .cpg file content against related .shp file

* Set the charset to the writer as well as is done in the reader

Update test containing text with special characters

Decode the encoded text containing special characters
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.

3 participants