-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New database #9
New database #9
Conversation
DEV_BLOB_SAS: ${{ secrets.DEV_BLOB_SAS }} | ||
AZURE_DB_PW_DEV: ${{ secrets.AZURE_DB_PW_DEV }} | ||
AZURE_DB_PW_PROD: ${{ secrets.AZURE_DB_PW_PROD }} | ||
AZURE_DB_UID: ${{ secrets.AZURE_DB_UID_DEV }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe want to change the name of this in secrets
to not reference DEV
-- not essential though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah in general I think having a better naming structure for our env vars would be good. Following up with Mike on including them as organization secrets as well, which would force us to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Only minor comments/clarifications. This looks good to me.
Not to be done in this PR, but I'm assuming next steps from here would be:
- Reconfigure processing of exposure rasters to contain full geographic scope (ie. not split by iso3)
- Then replace the raster stats computations here with what we have in
ds-raster-stats
repo.
Yup! Noted as #12, #13, OCHA-DAP/ds-raster-stats#31 |
Key changes:
.github/workflows/run_update_exposure.yml
: add step to trigger second workflow.github/workflows/run_update_raster_stats.yml
: created to calculate raster stats, and configured to be portable to another repositorypipelines/update_database.py
: deleted as we will no longer use this database tablepipelines/update_raster_stats.py
: script created to calculate raster stats and store in new database tablepublic
schemas (fromds-raster-stats
), calledapp.floodscan_exposure
src/utils/database.py
: define schema of new database tableAlso:
So, pipeline now would work by:
run_update_exposure.yml
run_update_raster_stats.yml
Note that I left in the
.parquet
calculation infloodscan.calculate_recent_flood_exposure_rasterstats()
so we still have these as a backup that gets updated daily. When we are more sure about the new database, and are writing to it daily, we can get rid of this function.