Skip to content

Conversation

@pesap
Copy link
Collaborator

@pesap pesap commented Mar 4, 2025

This PR adds the correct model field for storage_capacity for HydroPumpedStorage and also changes the way we create named tuples. It turns out that if we create classes, the serialization is easier without to much compromise. Pydantic knows how to create the dict and deserialize it allowing us to deprecate the custom serialization.

@pesap pesap requested a review from mcllerena March 4, 2025 02:18
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.16%. Comparing base (4624441) to head (a176225).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   82.11%   82.16%   +0.04%     
==========================================
  Files          41       42       +1     
  Lines        4306     4318      +12     
==========================================
+ Hits         3536     3548      +12     
  Misses        770      770              
Files with missing lines Coverage Δ
src/r2x/exporter/plexos.py 90.00% <100.00%> (+0.02%) ⬆️
src/r2x/models/__init__.py 100.00% <100.00%> (ø)
src/r2x/models/branch.py 92.77% <100.00%> (+0.08%) ⬆️
src/r2x/models/generators.py 99.06% <100.00%> (+<0.01%) ⬆️
src/r2x/models/named_tuples.py 100.00% <100.00%> (ø)
src/r2x/models/services.py 93.75% <100.00%> (-0.54%) ⬇️
src/r2x/parser/plexos.py 73.35% <100.00%> (-0.14%) ⬇️
src/r2x/parser/reeds.py 90.88% <100.00%> (-0.03%) ⬇️

@pesap pesap marked this pull request as ready for review March 4, 2025 06:26
@pesap pesap merged commit 46ac96e into main Mar 4, 2025
8 checks passed
@pesap pesap deleted the ps/phes branch March 4, 2025 19:49
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.

4 participants