Conversation
…e/deprecation # Conflicts: # climada/engine/calibration_opt.py # climada/engine/unsequa/calc_impact.py # climada/entity/measures/base.py # climada/test/test_calibration.py
|
Great updates! I am however not convinced yet by the change
I think this warrants a more in-depth discussion. The variable This is mostly a fix to ensure backward compatibility, right? How about instead we right a method |
Only formally.
You mean instead of using a impact = impactCalc.impact() if impactCalc.check_exposure_insured() else impactCalc.insured_impact()or this way: impact = impactCalc.impact(insured=impactCalc.insured_impact())Don't know. Looks noisy to me. The method itself sure seems neat but being forced to call it all the time doesn't. |
|
My suggestion was rather to reverse the change completely. Instead, create a method In this way, the results from the previous |
|
Am I understanding you right, on the bottom line you prefer to have no default behavior at all? |
|
I would like to have a default behaviour that is explicit (it is not dependent on the presence or absence of data in exposures). The default behavior is to compute impacts (which is what Now, this is a change from the previous behavior, where if But, your question if I understand it correctly is that in the other modules |
Exactly. |
That hasn't changed with this PR. Still possible. |
When I say default behavior I mean default behavior or the program not the user 😄 |
:D what I mean is that the default behaviour imho should be to compute impacts, no under-the-hood insured impacts. But, for what should be used in other modules, I think warrants a deeper discussion. Let us take it to the developer's meeting next week ok? |
# Conflicts: # climada/engine/impact_calc.py
|
Updates:
|
Changes proposed in this PR:
Impact.calcis deprecated.This PR aims to adapt to this change throughout the whole code base, including tutorials (but not scripts, like 'San_Salvador_Adaptacion.ipynb')
impactorinsured_impactshould be used. Therefore the splittin of methods has been (partly) reversed andimpactgot an additional argument,insured, which is derived from the exposures object if it is givenNone.Entity.read_excelhas been replaced byEntity.from_excelThis PR fixes issue #
Pull Request Checklist
develop)