OpenDRR / opendrr-api

REST API for OpenDRR data / API REST pour les données OpenDRR
MIT License
4 stars 7 forks source link

add_data.sh - verify checksum of downloaded files #83

Open anthonyfok opened 3 years ago

anthonyfok commented 3 years ago

As a follow up to Issue #66 / PR #82, it would be nice if:

Previous notes (copied from #66):

anthonyfok commented 3 years ago

For (my) reference, curl author Daniel Steinberg explains the retry options in depth: https://daniel.haxx.se/blog/2020/03/24/curl-ootw-retry-max-time/

--retry-connrefused may be a good candidate to add too. It was added in 7.52.0. curl included Ubuntu 18.04 and above is new enough.

anthonyfok commented 3 years ago

Idea: Use git partial clone and sparse-checkout to get just the pointers to *.csv in the original repo to quickly get the SHA256 checksums. Something like the following:

git clone --filter=blob:none --sparse git@github.com:OpenDRR/openquake-inputs.git
cd openquake-inputs
git sparse-checkout add '*.csv'