natcap / urban-online-workflow

This repository hosts the beta implementation of the Urban Online ES Workflow. The project is intended to give urban planners the ability to create and assess scenarios using InVEST Urban models.
1 stars 5 forks source link

multiple sources of truth for base LULC raster path #122

Open davemfish opened 7 months ago

davemfish commented 7 months ago

The SQL app hardcodes a default database value for the source LULC raster path:

server\sql_app/models.py:    lulc_url_base = Column(String, default="NLCD_2016_epsg3857.tif")

It would be nice to have a single source of truth for this file on the backend. Or at least a single source within sql_app/. But I'm also not sure why we want a default database value defined in this model. I updated the raster being used by the worker, but did not update this default value, and it seemed to have no impact on anything. Should the worker be responsible for populating this database field?

dcdenu4 commented 7 months ago

I believe the reason there is a default here is because it's not an optional field and during the creation process we don't have this input quite yet. So an error gets thrown. So perhaps the thing to do is remove the default value and make this an optional field? In both cases I think it'll end up being updated / overwritten.

There's likely a better workflow for this too but wanted to provide some context from my memory!

davemfish commented 1 month ago

Do this before -- or at least during -- #127