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

Fixed pvl loads #591

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Fixed pvl loads #591

wants to merge 11 commits into from

Conversation

antonhibl
Copy link
Contributor

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:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@antonhibl antonhibl added the bug Something isn't working label Jan 17, 2024
@antonhibl antonhibl self-assigned this Jan 17, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (775ff21) 15.82% compared to head (9ed3389) 15.81%.

Files Patch % Lines
ale/base/label_isis.py 0.00% 7 Missing ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.

@Kelvinrr
Copy link
Collaborator

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.
@antonhibl
Copy link
Contributor Author

antonhibl commented Jan 24, 2024

@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.

@acpaquette
Copy link
Collaborator

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 ale.loads which makes sense. I guess it isn't clear to my why the functionality to be able to read an in-memory PVL object is necessary

@antonhibl
Copy link
Contributor Author

@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 image_{ale/isis}_path with {ale/isis}_label) in order to load a PVLObject made from said image file and it runs fine in both cases, I have tested multiple times just to be sure.

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.

@antonhibl
Copy link
Contributor Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants