Skip to content

Commit

Permalink
GSYE-663: Moved the check of the no community self consumption to the…
Browse files Browse the repository at this point in the history
… module level, since this being part of the class prevented correct serialization.
  • Loading branch information
spyrostz committed Dec 13, 2023
1 parent 4b7ca6a commit 8019501
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gsy_framework/constants_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ class SCMSettings:
MARKET_ALGORITHM = CoefficientAlgorithm.STATIC.value
MARKET_ALGORITHM_LIMIT = RangeLimit(1, 3)

@classmethod
def is_no_community_self_consumption(cls) -> bool:
"""Check whether the SCM mode is set to no-community-self-consumption."""
return cls.MARKET_ALGORITHM == CoefficientAlgorithm.NO_COMMUNITY_SELF_CONSUMPTION.value

def is_no_community_self_consumption() -> bool:
"""Check whether the SCM mode is set to no-community-self-consumption."""
return (ConstSettings.SCMSettings.MARKET_ALGORITHM ==

Check warning on line 266 in gsy_framework/constants_limits.py

View check run for this annotation

Codecov / codecov/patch

gsy_framework/constants_limits.py#L266

Added line #L266 was not covered by tests
CoefficientAlgorithm.NO_COMMUNITY_SELF_CONSUMPTION.value)


class GlobalConfig:
Expand Down

0 comments on commit 8019501

Please sign in to comment.