-
Notifications
You must be signed in to change notification settings - Fork 107
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
Reinstate test_download_granules_without_subsetting #581
Conversation
Ensure that granules can be ordered from NSIDC and downloaded with the `subset=False` option. Need to check what the stdout and stderr strings are to get the test to pass.
👈 Launch a binder notebook on this branch for commit 115ce4c I will automatically update this comment whenever this PR is modified 👈 Launch a binder notebook on this branch for commit 9090378 👈 Launch a binder notebook on this branch for commit 58a4a68 👈 Launch a binder notebook on this branch for commit 97ba3de 👈 Launch a binder notebook on this branch for commit 29a7230 👈 Launch a binder notebook on this branch for commit e47a1a5 👈 Launch a binder notebook on this branch for commit 4fbbb98 👈 Launch a binder notebook on this branch for commit 358a265 👈 Launch a binder notebook on this branch for commit 1e8799c 👈 Launch a binder notebook on this branch for commit d3a0b8a 👈 Launch a binder notebook on this branch for commit 65328a6 👈 Launch a binder notebook on this branch for commit 6434fae |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #581 +/- ##
===============================================
- Coverage 71.08% 65.17% -5.91%
===============================================
Files 37 37
Lines 3043 3061 +18
Branches 594 596 +2
===============================================
- Hits 2163 1995 -168
- Misses 769 981 +212
+ Partials 111 85 -26 ☔ View full report in Codecov by Sentry. |
Got `UnboundLocalError: local variable 'loop_root' referenced before assignment` in CI because the order request status completed early, so need to declare the 'loop_root' variable early.
Adding the start of the stdout message, and expanding the reqparams and orderIDs length to get the integration test to pass.
Move the codecov setup to the install step to reduce repetition, so that both the 'basic tests' and 'behind Earthdata' stages can use the same codecov uploader script.
Check that 3 processed_ATL06_201902*.h5 files are downloaded after calling `.download_granules()`.
Correct test should have been to check for files without 'processed_' prefix. Also checking the .iso.xml metadata files and the filesize for good measure now.
# check that the max extent of the downloaded granules isn't subsetted | ||
assert len(glob.glob(pathname=f"{path}/ATL06_201902*.iso.xml")) == 3 | ||
h5_paths = glob.glob(pathname=f"{path}/ATL06_201902*.h5") | ||
assert len(h5_paths) == 3 | ||
assert [os.path.getsize(filename=p) for p in h5_paths] == [ | ||
65120027, # 62.1 MiB | ||
53228429, # 50.8 MiB | ||
49749227, # 47.4 MiB | ||
] |
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.
Checking for the non-subsetted 'ATL06_*.h5' files here now. Let me know if there's a better way to check for non-subsetted files instead of just the filesize here.
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.
@mfisher87 Any ideas other than file size?
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.
Woops, missed this. I don't have any other ideas right now!
Returned list from glob is not deterministic, so need to sort the filename list to make the test pass always.
This reverts commit d3a0b8a.
Got the |
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, @weiji14! I think this looks great.
Out of curiousity, how did you trigger it? It doesn't have a manual trigger, and should only run with an "approved" PR review status (but we're having some issues with this, clearly, so trying to learn how you were able to make it go). |
I triggered it at commit d3a0b8a by modifying |
Co-authored-by: Jessica Scheick <[email protected]>
Sneaky! Would that work from a fork too? |
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.
Re-approving to trigger integration test.
Not sure 😅 I had a look at the docs and couldn't figure it out. Understandably, this sounds like a security concern, but secrets shouldn't be accesible from forks, and there should be an 'Approve to run' button that is set for new contributors according to https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks |
Trying to increase code coverage of
ipx.Query
class'sorder_granules
anddownload_granules
methods, by ensuring that granules can be ordered from NSIDC and downloaded with thesubset=False
option.TODO:
Adjacent stuff done in this PR
- [x] Upload code coverage for 'behind Earthdata' tests via Travis CI