Skip to content

Commit

Permalink
feat(bc): make comments,
Browse files Browse the repository at this point in the history
`filter_year_by_year` and `filter_synthesis` fields optional
  • Loading branch information
laurent-laporte-pro committed Mar 25, 2024
1 parent a62b143 commit 53b46da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class BindingConstraintProperties(BaseModel, extra=Extra.forbid, allow_populatio
enabled: bool = True
time_step: BindingConstraintFrequency = BindingConstraintFrequency.HOURLY
operator: BindingConstraintOperator = BindingConstraintOperator.EQUAL
comments: str = ""
filter_year_by_year: str = ""
filter_synthesis: str = ""
comments: t.Optional[str] = None
filter_year_by_year: t.Optional[str] = None
filter_synthesis: t.Optional[str] = None


class BindingConstraintProperties870(BindingConstraintProperties):
Expand Down
14 changes: 13 additions & 1 deletion tests/variantstudy/test_command_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def setup_class(self):
"operator": "equal",
"coeffs": {},
"values": "values",
"comments": "",
"filter_synthesis": "",
"filter_year_by_year": "",
},
),
CommandDTO(
Expand All @@ -144,7 +147,10 @@ def setup_class(self):
"operator": "equal",
"coeffs": {},
"values": "values",
}
"comments": "",
"filter_synthesis": "",
"filter_year_by_year": "",
},
],
),
CommandDTO(
Expand All @@ -156,6 +162,9 @@ def setup_class(self):
"operator": "equal",
"coeffs": {},
"values": "values",
"comments": "",
"filter_synthesis": "",
"filter_year_by_year": "",
},
),
CommandDTO(
Expand All @@ -167,6 +176,9 @@ def setup_class(self):
"time_step": "hourly",
"operator": "equal",
"coeffs": {},
"comments": "",
"filter_synthesis": "",
"filter_year_by_year": "",
}
],
),
Expand Down

0 comments on commit 53b46da

Please sign in to comment.