MRG, MAINT: Better downloading for testing and misc #8696
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move the variables we change most of the times inutils.pyto the top. In theory we could move all hashes and?version=s up there, but I think it actually becomes less readable to people who might need to change the values. 90% of the time we're just updatingtestingormiscso this seems like a nice compromise._RELEASESreleases(currently only testing and misc) is out of date based onversion.txtand download it if necessary.Remove a crufty warning from when we tied dataset versions to MNE versions, we don't do this anymore AFAIKThis is meant to work nicely with #8695 so that when a PR updates the testing version etc. it should automatically re-download the testing dataset, overwriting the previously cached version. So @GuillaumeFavelier as long as the cache is restored at the beginning, the download called, than cache saved, then this should auto-update things I think.
This will make it so that the cache gets redownloaded a lot while there is a PR in progress to update the testing dataset. One way around this would be to parse
mne/datasets/utils.pyfor thetesting=line, and name the cache based on the testing dataset version. @GuillaumeFavelier this might be the way to go for #8695. Then hopefully the oldest caches will just be booted by GitHub, which should be the case assuming they default to a MRU cache.@GuillaumeFavelier can you look?