Skip to content
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

fix: average renamed #572

Conversation

sahand-asgarpour
Copy link
Contributor

@sahand-asgarpour sahand-asgarpour commented Sep 5, 2024

Issue addressed

Solves #569

Code of conduct

  • I HAVE NOT added sensitive or compromised (test) data to the repository.
  • I HAVE NOT added vulnerabilities to the repository.
  • I HAVE discussed my solution with (other) members of the RA2CE team.

What has been done?

all_agg_types = {
"max": "maximum",
"min": "minimum",
"mean": "mean",
"fr": "fraction of network segment impacted by hazard",
}

Checklist

  • Code is formatted using our custom black and isort definitions.
  • Tests are either added or updated.
  • Branch is up to date with master.
  • Updated documentation if needed.

Additional Notes (optional)

Add any additional notes or information that may be helpful.

@sahand-asgarpour sahand-asgarpour added bug Something isn't working Launch labels Sep 5, 2024
@sahand-asgarpour sahand-asgarpour marked this pull request as ready for review September 5, 2024 11:17
@ArdtK ArdtK linked an issue Sep 5, 2024 that may be closed by this pull request
2 tasks
@sahand-asgarpour sahand-asgarpour merged commit 1baffce into feat/518-calculate-eal Sep 5, 2024
3 checks passed
@sahand-asgarpour sahand-asgarpour deleted the fix/569-hazard-name-is-parsed-wrongly-for-aggregatewlenummean branch September 5, 2024 11:59
sahand-asgarpour added a commit to sahand-asgarpour/ra2ce_graz that referenced this pull request Sep 6, 2024
* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

* fix: average renamed (Deltares#572)

* test/570: fix issue with test concurrency

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>
sahand-asgarpour added a commit to sahand-asgarpour/ra2ce_graz that referenced this pull request Sep 6, 2024
* Feat/518 calculate eal (#18)

* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>

* Feat/518 calculate eal (#19)

* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

* fix: average renamed (Deltares#572)

* test/570: fix issue with test concurrency

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>
sahand-asgarpour added a commit to sahand-asgarpour/ra2ce_graz that referenced this pull request Sep 9, 2024
* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

* fix: average renamed (Deltares#572)

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>
sahand-asgarpour added a commit to sahand-asgarpour/ra2ce_graz that referenced this pull request Sep 9, 2024
* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

* fix: average renamed (Deltares#572)

* fix: lanes added

* feat: raise error if not all attributes_to_include in the dgf

* feat: reverted the raise error if not all attributes_to_include in the dgf

* feat: function created and used in nut to update rfid_c

* feat: function used in osm_network_wrapper in nut to update rfid_c

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>
sahand-asgarpour added a commit that referenced this pull request Sep 10, 2024
* chore: renaming representative_damage_percentile

* feat: risk_calculation_factory/base and its inherited classes are created. risk_calculation_mode/year added to the analysis_config

* feat: risk_calculation_factory returns the correct RiskCalculationBase classes

* feat: self._to_integrate = self.rework_damage_data() added to each risk_calculation class

* chore: renaming to _rework_damage_data

* feat: minor + creating the risk column in the self.result

* feat: aggregate_wl is added to analysis_config_data; can be read from ini and config.

* chore: aggregate_wl removed form AnalysisSectionLosses, because aggregate_wl is now part of AnalysisConfigData

* chore: self.analysis_config.config_data.aggregate_wl is used in _get_disrupted_criticality_analysis_results

* chore: aggregate_wl_suffix added to filter on the criticality_results that have any EV or RP columns with aggregate_wl_suffix of above aggregate_wl.

* chore: analysis_config_data_reader updated

* chore: analysis_config_data_reader updated

* chore: re package imported correctly

* chore: re package imported correctly

* chore: removed aggregate_wl from test analysis.ini

* chore: aggregate_wl added to the config of the test

* feat: EventTypeEnum NONE added and analysis.ini is updated for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* feat: aggregate_wl is removed from analysis.ini for correcting failing tests

* chore: error numbers are reduced. event_type default has become NONE instead of INVALID. The latter used to give error.

* chore: getting the return_periods is revised to get the numbers in the column names

* chore: cut_from_year rework function is updated to return correct _to_integrate

* test: updating test_calc_vlh for the cases with more than one event and different aggregate_wl[:2]

* test: resilience_curve updated. Test assertion added. expected_results updated to include the second resilience curve

* test: resilience_curve updated and relevant tests are updated

* test: TestRiskCalculation created

* test: TestRiskCalculation minor change

* test: TestRiskCalculation expected data updated

* chore: Unused import removed + .gitignor update

* Update tests/analysis/losses/resilience_curves/test_resilience_curves.py

chore: a number made float

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>

* chore: ABC inheritance removed

* chore: attributes with type hints are added to the class and removed form __init__

* chore: Unused imports are removed

* chore: passing key (k) is simplified

* chore: converted the function to an internal method of _get_to_integrate

* chore: inplace used instead of reassigning

* chore: conditions aggregated for readability

* chore: local variable is modified

* chore: super.__init__ is removed and _rework_damage_data usage moved to the base class

* chore: list made set + commented lines removed

* chore: self._to_integrates is returned in the end and not set in the method

* chore: asssert exists() added

* chore: self._rework_damage_data() moved to _get_to_integrate

* chore: self._rework_damage_data() returned

* chore: self._rework_damage_data() does not return but set self._to_integrate

* chore: cut_from_year test updated + rework_to_integrate sets self._to_integrate

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* chore: cut_from_year test updated

* test: factory test is made

* test: a fixture is added

* feat: get_suffix created for AggregateWlEnum

* chore: improvements for a correct encapsulation implementation

* chore: module test_risk_calculation_factory created

* chore: __post_init__ removed

* chore: properties protected

* chore: integrate_df_trapezoidal updated to avoid changing self._to_integrate

* chore: test updated regarding the protected attributes

* chore: get_wl_prefix updated

* chore: _ removed for the fixtures

* chore: fixtures moved to congtest + factory test in new module

* test: get_wl _prefix is added

* test: get_wl _prefix is modified to include expected prefixes

* test: get_wl _prefix fixed

* chore: gitignor updated

* chore: minor

* chore: minor

* chore: usage of abstract classes corrected and dependencies are updated accordingly

* Changed get_disruption to calculate_distruption

* chore: id test updated

* chore: conftest created at the lowest level. id naming also changed

* chore: prefix replaced with abbr

* chore: properties defined in init

* chore: _return_periods property and read-only (annotated) return_periods property

* chore: fixture added to the naming and reference

* chore: performance_key set once

* fix: average renamed (#572)

* Fix/573 update rfid c in the graph simple after segmentation (#574)

* fix: lanes added

* feat: raise error if not all attributes_to_include in the dgf

* feat: reverted the raise error if not all attributes_to_include in the dgf

* feat: function created and used in nut to update rfid_c

* feat: function used in osm_network_wrapper in nut to update rfid_c

* Update ra2ce/network/networks_utils.py

chore: inline comments changed

Co-authored-by: Carles S. Soriano Pérez <carles.sorianoperez@deltares.nl>

* chore: apply the comments on a previously made function + using deepcopy()

* chore: use of deepcopy is corrected

---------

Co-authored-by: Carles S. Soriano Pérez <carles.sorianoperez@deltares.nl>

---------

Co-authored-by: Ardt Klapwijk <59741981+ArdtK@users.noreply.github.com>
Co-authored-by: Cham8920 <138701847+Cham8920@users.noreply.github.com>
Co-authored-by: Carles S. Soriano Pérez <carles.sorianoperez@deltares.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hazard name is parsed wrongly for AggregateWlEnum.MEAN
2 participants