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 int8 (since gdal 3.7.0) #127

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Add int8 (since gdal 3.7.0) #127

merged 2 commits into from
Jul 11, 2024

Conversation

vincentvaroquauxads
Copy link
Contributor

No description provided.

@vincentvaroquauxads vincentvaroquauxads force-pushed the add_int8 branch 5 times, most recently from d1b6f40 to 11e1971 Compare July 3, 2024 13:54
@coveralls
Copy link
Collaborator

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9779195638

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 98.502%

Totals Coverage Status
Change from base Build 9745644977: 0.002%
Covered Lines: 3550
Relevant Lines: 3604

💛 - Coveralls

@vincentvaroquauxads
Copy link
Contributor Author

Unfortunately, I did not find a way to have a compile-time error iif Int8 is used with Gdal < 3.7.0. It will result in a runtime error.

@coveralls
Copy link
Collaborator

coveralls commented Jul 11, 2024

Pull Request Test Coverage Report for Build 9888791533

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 98.502%

Totals Coverage Status
Change from base Build 9745644977: 0.002%
Covered Lines: 3550
Relevant Lines: 3604

💛 - Coveralls

doc_test.go Outdated
@@ -289,6 +289,19 @@ func Example_rasterTutorial() {
poDstDS.Bands()[0].Write(0, 0, abyRaster, 512, 512)
poDstDS.Close()

poDstDSInt8, err := godal.Create(godal.GTiff, pszDstFilename, 1, godal.Int8, 512, 512)
Copy link
Member

Choose a reason for hiding this comment

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

Please put this test inside a new function in godal_test.go. doc_test.go is meant for documenting basic usage

godal.h Outdated
@@ -25,6 +25,10 @@

#if GDAL_VERSION_NUM < 3000000
#error "this code is only compatible with gdal version >= 3.0"
#elif GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(3, 7, 0)
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer if this went into its own #if instead of this #elif, as the intent is different

godal_test.go Outdated Show resolved Hide resolved
Co-authored-by: Thomas Bonfort <[email protected]>
@tbonfort tbonfort merged commit d2a4ab0 into main Jul 11, 2024
20 checks passed
@tbonfort tbonfort deleted the add_int8 branch July 11, 2024 10:45
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