-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fixed specifying source file type manually in RasterStack #359
Conversation
Codecov Report
@@ Coverage Diff @@
## main #359 +/- ##
==========================================
- Coverage 79.20% 79.17% -0.04%
==========================================
Files 38 38
Lines 3121 3121
==========================================
- Hits 2472 2471 -1
- Misses 649 650 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tracking all of those down!
The main change is how you are using get
on kw
- we can just add the source
keyword instead directly in the function keyword arguments.
This PR will also need some tests that specify the source type manually.
Tests? |
I have no idea how to write tests, but I I'll look into it. |
Tests are crucial, more important than the code in the long term. Otherwise I or someone else might break this functionality again by accident. You can see some other tests in the tes/gdal.jl and test/ncdatasets.jl - that might be a good place to add tests where you rename a file to something custom and then force it to the right file type. Do your best anyway! If not I can add them. |
Can you recommend some good tutorial on writing tests in julia? I feel that I need to make myself more familiar with this anyway. |
Ok, making tests turned out to be not so difficult, but I think that they reveal some more bugs. I copy
This is inconsistent with RasterStack interface. Second, both Raster and RasterStack created from *.nc files are not equal to Raster and RasterStack created from *.nc4 files, they do not pass isequal test. Is such behavior expected? |
Thats great. Can you push the tests so I can try to find your problems? |
Not sure if I am doing the right thing, but here is my attempt. |
This PR is supposed to fix #356