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
Fix #4886 look for a tarball first fallback to individual files #4904
Fix #4886 look for a tarball first fallback to individual files #4904
Conversation
f67610e
to
656f8fa
Compare
0da4426
to
f5d0394
Compare
I expect the
|
Can we get this fixed? |
1e8fdd5
to
78812bd
Compare
78812bd
to
2f3d1fd
Compare
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 a lot for this, it looks good. Does this fix the representation of the results in the table, or does it not have any affect on that?
I think there is one issue with your logic, but otherwise looks good.
req_end_year = timerange.end.datetime.year | ||
start_year = req_start_year if self.MIN_YEAR < req_start_year <= cur_year else None | ||
end_year = req_end_year if self.MIN_YEAR < req_end_year <= cur_year else None | ||
if start_year is None and end_year is None: |
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.
If the start time or end time is out of range, but not both, then the start_year or end_year variables would be None
and would presumably fail later in this method? Do we need to clip them to the MIN_YEAR / MAX_YEAR?
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.
Yea that didn't catch that kind of edge case reworked and added new test for these cases.
…/samaloney/sunpy into bugfix-srsclient-missing-tarball * 'bugfix-srsclient-missing-tarball' of https://github.com/samaloney/sunpy: (62 commits) changed test and updated changelog More scraper range fixes Review updates and more test fixes Fix scraper to pass tests Add changelog Update scraper to use relativedelta not units Fix sunpy#4886 look for a tarball first fallback to individual files Docs for writing new Fido clients (sunpy#4387) Changed the X-axis labels for the histograms Update sunpy/map/mapbase.py Added an alternate histogram and colormap shading to quicklook Assorted Doc Build Fixes (sunpy#4993) Reduce number of rotatedsun test examples (sunpy#4990) Reduce runtimes of some more tests (sunpy#4991) Update changelog/4881.bugfix.rst Update sunpy/map/mapbase.py Handle time scale FITS metadata in map.date Bump minimum required Matplotlib version Convert stale bot to a GitHub action (sunpy#4980) added repr line limit to fido ...
17e13eb
to
163d1ec
Compare
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
da7d437
to
47f0255
Compare
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.
Wow this really spiralled didn't it.
I think it looks good, just a couple of small style comments. Has this grown to the point where it's no longer a simple bug fix and is really a behaviour change? (i.e. should this still get a 2.0 backport?)
|
||
""" | ||
date_parts = [int(p) for p in date.strftime('%Y,%m,%d,%H,%M,%S').split(',')] | ||
date_parts[-1] = date_parts[-1] % 60 |
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.
So what's the damage with regards to leap seconds here. I assume it doesn't really matter, but what if someone has a URL with a 61st second in a minute in it?
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.
I assume it doesn't work? It would get a different file?
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.
Yea if you are actually looking for a file with a 60th second you won't find it even if it was there. I think that's a pretty extreme edge case and I don't even think it would have worked before either.
Co-authored-by: Stuart Mumford <stuart@cadair.com>
ab5fc6b
to
381a120
Compare
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 2.0
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick c329146f8241a5bdca30d62522b1f26bd3d1f409 95ff4528f90306e136cc7ec3287bf6a4ba39180a 66513bf27202ab70307ce811047aed3631369a9d f5d039457875e1c4678c39d84f5d0ab029fb5b41 9ada04fda2f5e522f8619a9a82af1c1e9c7c3880 4bd556a35a78f1e4f294504a5ab85429589b6605 83d8f4b32f25883abb4ca13069600995b4b57490 5fea615af9720935c3c45e9c4ecb7f7d06677590 4d72bcf769196fd987314a93b698262579f3c155 8dbe4b69cbfee5e11034ad92474fccc18c4d929e 703f56e85857f45c4624913a335258dcbec9a78f 3d210cfdf1a629de8519dbab6ab244c168952aa5 2f3d1fd72beab4c35d40fbe5ec3f5570ed09d31c 0ed1bf3052970bc4ff2afdbaee3abf57d76e436b 163d1ec4248eb619eb9e28911050d799f1c40550 47f025520f1613c930bca9b8022849cb263276b8 381a120518b81af1d73e770461630b7e93aaca2b
# Create a new branch with these backported commits.
git checkout -b backport-4904-to-2.0
# Push it to GitHub.
git push --set-upstream origin backport-4904-to-2.0
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 2.1
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick c329146f8241a5bdca30d62522b1f26bd3d1f409 95ff4528f90306e136cc7ec3287bf6a4ba39180a 66513bf27202ab70307ce811047aed3631369a9d f5d039457875e1c4678c39d84f5d0ab029fb5b41 9ada04fda2f5e522f8619a9a82af1c1e9c7c3880 4bd556a35a78f1e4f294504a5ab85429589b6605 83d8f4b32f25883abb4ca13069600995b4b57490 5fea615af9720935c3c45e9c4ecb7f7d06677590 4d72bcf769196fd987314a93b698262579f3c155 8dbe4b69cbfee5e11034ad92474fccc18c4d929e 703f56e85857f45c4624913a335258dcbec9a78f 3d210cfdf1a629de8519dbab6ab244c168952aa5 2f3d1fd72beab4c35d40fbe5ec3f5570ed09d31c 0ed1bf3052970bc4ff2afdbaee3abf57d76e436b 163d1ec4248eb619eb9e28911050d799f1c40550 47f025520f1613c930bca9b8022849cb263276b8 381a120518b81af1d73e770461630b7e93aaca2b
# Create a new branch with these backported commits.
git checkout -b backport-4904-to-2.1
# Push it to GitHub.
git push --set-upstream origin backport-4904-to-2.1
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport Then, create a pull request where the |
…unpy#4904) * Fix sunpy#4886 look for a tarball first fallback to individual files * Update scraper to use relativedelta not units * Add changelog * Fix scraper to pass tests * Review updates and more test fixes * More scraper range fixes * Fix sunpy#4886 look for a tarball first fallback to individual files * Update scraper to use relativedelta not units * Add changelog * Fix scraper to pass tests * Review updates and more test fixes * More scraper range fixes * changed test and updated changelog * Rework date logic and update gong doc test. * Update sunpy/net/dataretriever/sources/noaa.py Co-authored-by: Nabil Freij <nabil.freij@gmail.com> * Apply suggestions from code review Co-authored-by: Stuart Mumford <stuart@cadair.com> Co-authored-by: Nabil Freij <nabil.freij@gmail.com> Co-authored-by: Stuart Mumford <stuart@cadair.com>
Description
Fixes #4886 by checking for a yearly tarball first if not found, try individual SRS files.