Open
Description
The package automatically downloads SW-All
file from Celestrak in case it is not present in the package directory. However, it won't refresh the downloaded file in case an updated version is present on Celestrak.
The existing condition can be updated as follows -
def _load_f107_ap_data() -> dict[str, npt.NDArray]:
"""Load data from disk, if it isn't present go out and download it first."""
if not _F107_AP_PATH.exists() or datetime.datetime.now() > datetime.datetime.fromtimestamp(os.path.getmtime(_F107_AP_PATH)) + datetime.timedelta(days=1):
download_f107_ap()