Allow Exposures.from_raster to set Exposure metadata by ChrisFairless · Pull Request #1091 · CLIMADA-project/climada_python
Changelog updated!
Regarding your question about whether we should be able to set non-metadata properties through this new parameter: my thinking was to restrict it to the metadata parameters so that we don't have to write a lot of code to police the unexpected things someone might provide through this call.
However, reading the Exposures.__init__ method more carefully, these checks are already made.
So ... let's remove the restriction? The danger is that someone provides e.g. cover and deductible info through data that don't align with the raster, and as long as there are the right number of rows they'll never know. But I guess it's not our job to tell them to be careful?
I'll make the change, but will revert it if anyone wants to be more careful.