-
Notifications
You must be signed in to change notification settings - Fork 85
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
Only check if results are cloud hosted when there are results #839
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #839 +/- ##
==========================================
- Coverage 73.88% 72.35% -1.54%
==========================================
Files 31 31
Lines 2003 1993 -10
==========================================
- Hits 1480 1442 -38
- Misses 523 551 +28 ☔ View full report in Codecov by Sentry. |
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.
This fixes #526, so I've suggested an update to the changelog, plus always assigning a value to cloud
.
@jhkennedy, how about a unit test as well? |
@chuckwondo yes, that would be a good idea, wouldn't it! 🤦🤣 It'll take me a little but I'll circle back around to that |
🤔 now, how did I miss that issue?! From the conversation there, there's also a refactor we should do. I prefer to merge this to get the quick fix out the door and circle back to the refactor later. I think that means closing #526 and opening a new issue for it, but leaving #526 open would also work. |
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Common Changelog](https://common-changelog.org/) | ||
and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
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.
💯 💯 💯
💯 |
Good point. I forgot about the refactoring bit. I think closing #526 with this PR makes sense, and opening a new issue for the refactoring bit would be my preference (and @mfisher87's preference too, if I'm interpreting his previous comment correctly). |
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.
LGTM! Thanks for adding the ref to Common Changelog that was missing.
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.
Oops! I was too hasty in approving. How about a unit test?
Yep, unit test is on my todo list, but I likely won't get to it this week. Any maintainer should feel free to push a test to this branch if they want. Otherwise, I'll get to it next week. |
Co-authored-by: Chuck Daniels <cjdaniels4@gmail.com>
Alright, I added a unit test and confirmed the test fails on the main branch but works on this branch. |
I also opened the follow-on refactor issue here: #844 @chuckwondo @mfisher87 @betolink feel, free to edit/expand/etc. |
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 Joe!
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User ebolch does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
User Sherwin-14 does not have permission to run integration tests. A maintainer must perform a security review of the code changes in this pull request and re-run the failed integration tests jobs, if the code is deemed safe. |
Currently, if you search for a collection that doesn't exist because you have the wrong name for it,
earthaccess
will bonk pretty hard with an error message that doesn't describe the problem:I would expect this instead:
This PR:
earthaccess
to return an empty list.Background:
I was helping a user on Earthdata Forum troubleshoot why their STAC CMR queries weren't working and gave them a version of their script using
earthaccess
:https://forum.earthdata.nasa.gov/viewtopic.php?t=5953&sid=578d74d50b040bc37ad8aa188610a90a
When I initially tried to convert the script, I had the short name wrong and encountered the error message above, which I found rather incomprehensible.
I can see having the wrong short name and getting no results as a common situation users could encounter.
As an aside, I had initially naively used the CMR collection name as the short name. What I didn't realize is that In CMR,
short_name
is not required to be unique, butshort_name
+version
is, so CMR STAC usesshort_name
+version
for the collection ID to provide a unique, human-readable collection ID.This is the search I was trying to perform:
Pull Request (PR) draft checklist - click to expand
contributing documentation
before getting started.
Ensure an issue exists representing the problem being solved in this PR.title such as "Add testing details to the contributor section of the README".
Example PRs: #763
example,
closes #1
. SeeGitHub docs - Linking a pull request to an issue.
CHANGELOG.md
with details about your change in a section titled## Unreleased
. If such a section does not exist, please create one. FollowCommon Changelog for your additions.
Example PRs: #763
README.md
with details of changes to theearthaccess interface, if any. Consider new environment variables, function names,
decorators, etc.
Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!
Pull Request (PR) merge checklist - click to expand
Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the
@nsidc/earthaccess-support
team in a comment and wewill help you out!
Request containing "pre-commit.ci autofix" to automate this.
📚 Documentation preview 📚: https://earthaccess--839.org.readthedocs.build/en/839/