OpenHydrology/floodestimation

NRFA download url

Closed this issue · 2 comments

faph commented

Currently floodestimation reads the NRFA data download url from a json file on the github master branch. If this is not available it reverts to a hard coded url. To improve this, we should store the json and NRFA urls in an ini config file and update this each time a new url is fetched from the repo. Config file location should be same as sqlite db using appdirs package.

Would it not be possible to store inside the db rather than alongside it? Reduces risk of mismatch.

faph commented

Storing in db is good, but with sqlite we don't have any trigger function within the db. So it would need to be implemented in application code anyway. At the moment we don't have the option to update the data, the entire database gets thrown out and reloaded from the NRFA. If we update database records, we probably should have a table with update actions. Or fields with update metadata. For now, this works ok.