-
Notifications
You must be signed in to change notification settings - Fork 101
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
WIP: single function call to preload Astropy cache #1374
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 62.26% // Head: 62.18% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1374 +/- ##
==========================================
- Coverage 62.26% 62.18% -0.08%
==========================================
Files 89 89
Lines 20260 20239 -21
Branches 3652 3657 +5
==========================================
- Hits 12614 12585 -29
- Misses 6856 6868 +12
+ Partials 790 786 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@JPGlaser I think that adjusting your script to call |
This one is a bit of a headache because I'm trying to get the "don't access the Internet, be okay with old data" to work with everything from Astropy 4.0 to 5.1, and the code to deal with out-of-range data has changed several times over the course of that time. I might need to create some specialized tox tasks and test all the versions. We particularly need 4.3 to work because that's what NANOGrav used for 15yr and they want to keep using it; 5.1 works fine and quite gracefully, but so far 4.3, 5.0, and 5.1 need different solutions. |
@aarchiba We are okay with advancing to Astropy 5.1+ with the 15yr. This is because we have to advance our versions of other software for the wideband results. I think this feature would be a fantastic add as we get more folks in the IPTA using |
This is intended to resolve #1372 by providing a single function call that preloads the Astropy cache. Documentation on how to forbid PINT/Astropy from connecting to the Internet should also be included.
New functions:
pint.utils.preload_cache
- download everything you're likely to needpint.utils.no_internet
- context manager to run stuff without letting PINT/Astropy access the internetpint.utils.set_no_internet
- function to set Astropy config to turn off internet access for the duration of the current session