Skip to content

Devs/empty dicts#119

Merged
FBumann merged 9 commits intonext/patchfrom
devs/empty-dicts
Jan 11, 2025
Merged

Devs/empty dicts#119
FBumann merged 9 commits intonext/patchfrom
devs/empty-dicts

Conversation

@FBumann
Copy link
Copy Markdown
Member

@FBumann FBumann commented Jan 11, 2025

Default values changed: {} / [] instead of None

Instead of using None to represent the absence of certain values, empty Lists and Dictionaries are now used (when applicable).
This enables iterating over them easier.

LinearConverter

  • conversion_factors
  • segmented_conversion_factors

Flow

  • effects_per_flow_hour

InvestParameters

  • fix_effects
  • specific_effects
  • divest_effects

OnOffParameters

  • effects_per_switch_on
  • effects_per_running_hour

aggregation.py

AggregationParameters

  • time_series_for_high_peaks
  • time_series_for_low_peaks

Aggregation

  • weights
  • time_series_for_high_peaks
  • time_series_for_low_peaks

Other improvements:

Improved an Exception message in CalculationResults.to_dataframe(), regarding not found Elements

@FBumann FBumann linked an issue Jan 11, 2025 that may be closed by this pull request
@FBumann FBumann merged commit b572886 into next/patch Jan 11, 2025
@FBumann FBumann deleted the devs/empty-dicts branch January 14, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use empty Dicts instead of None whenever possible

1 participant