-
Notifications
You must be signed in to change notification settings - Fork 33
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 pvl loads #591
base: main
Are you sure you want to change the base?
Fixed pvl loads #591
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 15.82% 15.81% -0.01%
==========================================
Files 56 56
Lines 6283 6284 +1
==========================================
Hits 994 994
- Misses 5289 5290 +1 ☔ View full report in Codecov by Sentry. |
Are there tests for this already? Also changelog entry. |
Not completely done as I need to figure out how to load some kind of test cube akin to the one I am using inside of the test itself without loading it from local storage. There should be some way to put it in the test data area my main problem is I would like to avoid putting a whole cube in the test's data folder as they are larger files and I believe that convention of putting cubes there is to be avoided.
@Kelvinrr I updated the changelog and added a rudimentary test file that isn't complete because I want to determine how to load the test cube file into the test without referencing it from some local directory/storage. I am sure there is a way to do this without putting the whole cube in the test's data folder but I am not sure what that is yet. You can see what I am talking about in the test file test_pvl_load.py. this is also why the checks are currently failing because the tests reference a local file on my workstation. |
After thinking about this a little more, I don't know why it's necessary for the verification script? Looking over the PR we are attempting to load a file using |
@acpaquette It isn't necessary I guess but the problem from my understanding is just that ale.loads() should be able to load a PVLObject just fine, which it does when that PVLObject was constructed from a cube/image file however when that PVLObject is instead made from a label rather than an image file it seems to cause a major problem for ale.loads(). I currently have the driver_verification script(ale/ale/driver_verification.py at ec29db75af3fbcd7a56cd82588a419aa161fcf87 · DOI-USGS/ale (github.com)) set to just use ale.loads while ingesting the image file itself but it can be tweaked with one line of code(its actually commented there on lines 185 and 194, then lines 186 and 195 just need to replace The problem here is in my test script I attempt to use ale.loads to ingest a PVLObject made from the image's label file and ale.loads seems to not be able to find a driver when if I make a small tweak to use the image instead of it's label to make the PVLObject it runs just fine. I think there is something to be examined there at least; while it certainly isn't a breaking change it does show some weird behavior. |
@Kelvinrr this should be ready for a review and merge, the one failed check looks like it is unrelated to the tests and something to do with the runner |
Addresses #586 and compliments #584 by allowing that verification script to account for these changes which allow PVLModules to be used with ale.load(s).
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: