Skip to content

Commit 7e5e1e3

Browse files
committed
test
1 parent 1658d86 commit 7e5e1e3

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
@@ -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

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)