File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,14 @@ class Change(BaseModel):
240240
241241 A change to the model or model state, corresponding to an individual
242242 row of the PEtab conditions table.
243+
244+ >>> Change(
245+ ... target_id="k1",
246+ ... operation_type=OperationType.SET_CURRENT_VALUE,
247+ ... target_value="10",
248+ ... ) # doctest: +NORMALIZE_WHITESPACE
249+ Change(target_id='k1', operation_type='setCurrentValue',
250+ target_value=10.0000000000000)
243251 """
244252
245253 #: The ID of the target entity to change
@@ -284,6 +292,19 @@ class ChangeSet(BaseModel):
284292 A set of simultaneously occurring changes to the model or model state,
285293 corresponding to a perturbation of the underlying system. This corresponds
286294 to all rows of the PEtab conditions table with the same condition ID.
295+
296+ >>> ChangeSet(
297+ ... id="condition1",
298+ ... changes=[
299+ ... Change(
300+ ... target_id="k1",
301+ ... operation_type=OperationType.SET_CURRENT_VALUE,
302+ ... target_value="10",
303+ ... )
304+ ... ],
305+ ... ) # doctest: +NORMALIZE_WHITESPACE
306+ ChangeSet(id='condition1', changes=[Change(target_id='k1',
307+ operation_type='setCurrentValue', target_value=10.0000000000000)])
287308 """
288309
289310 #: The condition ID
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ convention = "pep257"
114114"tests/*" = [" T201" ]
115115
116116[tool .ruff .format ]
117+ docstring-code-format = true
117118exclude = [
118119 " petab/math/_generated/*" , # auto-generated
119120]
Original file line number Diff line number Diff line change 11[pytest]
2+ addopts = --doctest-modules
23filterwarnings =
34 error
45 # TODO: until tests are reorganized for petab.v1
You can’t perform that action at this time.
0 commit comments