Skip to content

Commit 12d43c7

Browse files
committed
test
1 parent 807cf86 commit 12d43c7

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

petab/v2/core.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,14 @@ class Change(BaseModel):
241241
242242
A change to the model or model state, corresponding to an individual
243243
row of the PEtab conditions table.
244+
245+
>>> Change(
246+
... target_id="k1",
247+
... operation_type=OperationType.SET_CURRENT_VALUE,
248+
... target_value="10",
249+
... ) # doctest: +NORMALIZE_WHITESPACE
250+
Change(target_id='k1', operation_type='setCurrentValue',
251+
target_value=10.0000000000000)
244252
"""
245253

246254
#: The ID of the target entity to change
@@ -286,6 +294,19 @@ class ChangeSet(BaseModel):
286294
A set of simultaneously occurring changes to the model or model state,
287295
corresponding to a perturbation of the underlying system. This corresponds
288296
to all rows of the PEtab conditions table with the same condition ID.
297+
298+
>>> ChangeSet(
299+
... id="condition1",
300+
... changes=[
301+
... Change(
302+
... target_id="k1",
303+
... operation_type=OperationType.SET_CURRENT_VALUE,
304+
... target_value="10",
305+
... )
306+
... ],
307+
... ) # doctest: +NORMALIZE_WHITESPACE
308+
ChangeSet(id='condition1', changes=[Change(target_id='k1',
309+
operation_type='setCurrentValue', target_value=10.0000000000000)])
289310
"""
290311

291312
#: The condition ID

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ convention = "pep257"
114114
"tests/*" = ["T201"]
115115

116116
[tool.ruff.format]
117+
docstring-code-format = true
117118
exclude = [
118119
"petab/math/_generated/*", # auto-generated
119120
]

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[pytest]
2+
addopts = --doctest-modules
23
filterwarnings =
34
error
45
# TODO: until tests are reorganized for petab.v1

0 commit comments

Comments
 (0)