imperialCHEPI / healthgps

Global Health Policy Simulation model (Health-GPS)
https://imperialchepi.github.io/healthgps/
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Extract zip files to cache folder #440

Closed alexdewar closed 2 weeks ago

alexdewar commented 3 weeks ago

By extracting zip files to a cache folder (e.g. on Linux, .cache/healthgps), we can avoid having to extract the same file more than once. While the performance benefits of this are negligible, if they exist at all, I'm introducing it as a preparatory step for when we want to be able to download data sets from a URL, with a given hash. (In this case the download can be avoided if the cache folder already exists.) For the hashing, I'm using SHA256 hashes, generated using openssl, which is already an indirect dependency.

For generating a platform-appropriate cache directory, I used the PlatformFolders library.

Closes #400.

alexdewar commented 3 weeks ago

Hmm... one of the tests is failing on Windows only. How odd. I'll dig into it when I get a chance

jamesturner246 commented 2 weeks ago

I know it's not super pretty, but how about moving all the testsuite data files into a src/HealthGPS.Tests/test_files directory, and using a pre-commit exclude filter on that directory?