Conversation
chahank
reviewed
Apr 7, 2026
chahank
reviewed
Apr 7, 2026
Member
|
Excellent idea! |
Cleans-up, Docstringfies Better to_dict, color parser, and post_inits Removes duplicate docstring
…MADA-project/climada_python into feature/option-appraisal-dataclasses
MeasureConfig dataclasses for serializable measure configuration.MeasureConfig dataclasses for serializable measure configuration.
Collaborator
Author
|
Question: Should measures (defined by Currently, they are specific (thus configs require you to provide I see how you could want modifications of impact function to be for multiple hazards Any opinion on that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this PR:
This PR introduces a new module defining a family of dataclasses that encode adaptation measure parameters in a serializable, declarative form. This is a preparatory step for the broader
Measure/MeasureSetrework.The objective is to retain the possibility to define measures from modifiers in addition to the upcoming system that will use python functions directly, and provide a (better) user interface for this.
no existing code is changed.
New dataclasses:
MeasureConfigtop-level configuration for a single measure, aggregating all modifier configs below.ImpfsetModifierConfigparameters for modifying impact functions (intensity, MDD, PAA scaling, optional replacement)HazardModifierConfigparameters for modifying hazard (intensity scaling, frequency cutoff, optional replacement)ExposuresModifierConfigparameters for modifying exposures (impact function remapping, zeroing regions, optional replacement)CostIncomeConfigserializable representation of cost/income cash flow parametersAll configs inherit from the abstract
_ModifierConfigbase, which provides sharedto_dict/from_dictand a__repr__that highlights non-default fields.MeasureConfigsupports full serialization to/from dict, YAML, and legacy Excel rows (from_row), which will serve as the migration path for the existing file-based I/O inMeasureSet.PR Author Checklist
develop)PR Reviewer Checklist