Skip to content

Commit 5502460

Browse files
committed
..
1 parent 6ef6aa0 commit 5502460

1 file changed

Lines changed: 37 additions & 30 deletions

File tree

petab/v2/core.py

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ class PriorType(str, Enum):
8686
Prior types as used in the PEtab parameters table.
8787
"""
8888

89-
#: Normal distribution
89+
#: Normal distribution.
9090
NORMAL = C.NORMAL
91-
#: Laplace distribution
91+
#: Laplace distribution.
9292
LAPLACE = C.LAPLACE
93-
#: Uniform distribution
93+
#: Uniform distribution.
9494
UNIFORM = C.UNIFORM
95-
#: Log-normal distribution
95+
#: Log-normal distribution.
9696
LOG_NORMAL = C.LOG_NORMAL
9797
#: Log-Laplace distribution
9898
LOG_LAPLACE = C.LOG_LAPLACE
@@ -115,19 +115,19 @@ class PriorType(str, Enum):
115115
class Observable(BaseModel):
116116
"""Observable definition."""
117117

118-
#: Observable ID
118+
#: Observable ID.
119119
id: str = Field(alias=C.OBSERVABLE_ID)
120-
#: Observable name
120+
#: Observable name.
121121
name: str | None = Field(alias=C.OBSERVABLE_NAME, default=None)
122-
#: Observable formula
122+
#: Observable formula.
123123
formula: sp.Basic | None = Field(alias=C.OBSERVABLE_FORMULA, default=None)
124-
#: Observable transformation
124+
#: Observable transformation.
125125
transformation: ObservableTransformation = Field(
126126
alias=C.OBSERVABLE_TRANSFORMATION, default=ObservableTransformation.LIN
127127
)
128-
#: Noise formula
128+
#: Noise formula.
129129
noise_formula: sp.Basic | None = Field(alias=C.NOISE_FORMULA, default=None)
130-
#: Noise distribution
130+
#: Noise distribution.
131131
noise_distribution: NoiseDistribution = Field(
132132
alias=C.NOISE_DISTRIBUTION, default=NoiseDistribution.NORMAL
133133
)
@@ -175,7 +175,7 @@ def _sympify(cls, v):
175175
class ObservablesTable(BaseModel):
176176
"""PEtab observables table."""
177177

178-
#: List of observables
178+
#: List of observables.
179179
observables: list[Observable]
180180

181181
def __getitem__(self, observable_id: str) -> Observable:
@@ -252,11 +252,11 @@ class Change(BaseModel):
252252
target_value=10.0000000000000)
253253
"""
254254

255-
#: The ID of the target entity to change
255+
#: The ID of the target entity to change.
256256
target_id: str | None = Field(alias=C.TARGET_ID, default=None)
257257
# TODO: remove?!
258258
operation_type: OperationType = Field(alias=C.OPERATION_TYPE)
259-
#: The value to set the target entity to
259+
#: The value to set the target entity to.
260260
target_value: sp.Basic | None = Field(alias=C.TARGET_VALUE, default=None)
261261

262262
#: :meta private:
@@ -311,9 +311,9 @@ class ChangeSet(BaseModel):
311311
operation_type='setCurrentValue', target_value=10.0000000000000)])
312312
"""
313313

314-
#: The condition ID
314+
#: The condition ID.
315315
id: str = Field(alias=C.CONDITION_ID)
316-
#: The changes associated with this condition
316+
#: The changes associated with this condition.
317317
changes: list[Change]
318318

319319
#: :meta private:
@@ -345,7 +345,7 @@ def __iadd__(self, other: Change) -> ChangeSet:
345345
class ConditionsTable(BaseModel):
346346
"""PEtab conditions table."""
347347

348-
#: List of conditions
348+
#: List of conditions.
349349
conditions: list[ChangeSet] = []
350350

351351
def __getitem__(self, condition_id: str) -> ChangeSet:
@@ -409,9 +409,9 @@ class ExperimentPeriod(BaseModel):
409409
This corresponds to a row of the PEtab experiments table.
410410
"""
411411

412-
#: The start time of the period
412+
#: The start time of the period in time units as defined in the model.
413413
start: float = Field(alias=C.TIME)
414-
#: The ID of the condition to be applied at the start time
414+
#: The ID of the condition to be applied at the start time.
415415
condition_id: str = Field(alias=C.CONDITION_ID)
416416

417417
#: :meta private:
@@ -435,9 +435,9 @@ class Experiment(BaseModel):
435435
experiment ID.
436436
"""
437437

438-
#: The experiment ID
438+
#: The experiment ID.
439439
id: str = Field(alias=C.EXPERIMENT_ID)
440-
#: The periods of the experiment
440+
#: The periods of the experiment.
441441
periods: list[ExperimentPeriod] = []
442442

443443
#: :meta private:
@@ -471,7 +471,7 @@ def __iadd__(self, other: ExperimentPeriod) -> Experiment:
471471
class ExperimentsTable(BaseModel):
472472
"""PEtab experiments table."""
473473

474-
#: List of experiments
474+
#: List of experiments.
475475
experiments: list[Experiment]
476476

477477
@classmethod
@@ -528,13 +528,19 @@ class Measurement(BaseModel):
528528
experiment.
529529
"""
530530

531+
#: The observable ID.
531532
observable_id: str = Field(alias=C.OBSERVABLE_ID)
533+
#: The experiment ID.
532534
experiment_id: str | None = Field(alias=C.EXPERIMENT_ID, default=None)
535+
#: The time point of the measurement in time units as defined in the model.
533536
time: float = Field(alias=C.TIME)
537+
#: The measurement value.
534538
measurement: float = Field(alias=C.MEASUREMENT)
539+
#: Values for placeholder parameters in the observable formula.
535540
observable_parameters: list[sp.Basic] = Field(
536541
alias=C.OBSERVABLE_PARAMETERS, default_factory=list
537542
)
543+
#: Values for placeholder parameters in the noise formula.
538544
noise_parameters: list[sp.Basic] = Field(
539545
alias=C.NOISE_PARAMETERS, default_factory=list
540546
)
@@ -584,6 +590,7 @@ def _sympify_list(cls, v):
584590
class MeasurementTable(BaseModel):
585591
"""PEtab measurement table."""
586592

593+
#: List of measurements.
587594
measurements: list[Measurement]
588595

589596
@classmethod
@@ -636,9 +643,9 @@ def __iadd__(self, other: Measurement) -> MeasurementTable:
636643
class Mapping(BaseModel):
637644
"""Mapping PEtab entities to model entities."""
638645

639-
#: PEtab entity ID
646+
#: PEtab entity ID.
640647
petab_id: str = Field(alias=C.PETAB_ENTITY_ID)
641-
#: Model entity ID
648+
#: Model entity ID.
642649
model_id: str = Field(alias=C.MODEL_ENTITY_ID)
643650

644651
#: :meta private:
@@ -659,7 +666,7 @@ def _validate_id(cls, v):
659666
class MappingTable(BaseModel):
660667
"""PEtab mapping table."""
661668

662-
#: List of mappings
669+
#: List of mappings.
663670
mappings: list[Mapping]
664671

665672
@classmethod
@@ -706,15 +713,15 @@ def __iadd__(self, other: Mapping) -> MappingTable:
706713
class Parameter(BaseModel):
707714
"""Parameter definition."""
708715

709-
#: Parameter ID
716+
#: Parameter ID.
710717
id: str = Field(alias=C.PARAMETER_ID)
711-
#: Lower bound
718+
#: Lower bound.
712719
lb: float | None = Field(alias=C.LOWER_BOUND, default=None)
713-
#: Upper bound
720+
#: Upper bound.
714721
ub: float | None = Field(alias=C.UPPER_BOUND, default=None)
715-
#: Nominal value
722+
#: Nominal value.
716723
nominal_value: float | None = Field(alias=C.NOMINAL_VALUE, default=None)
717-
#: Parameter scale
724+
#: Parameter scale.
718725
scale: ParameterScale = Field(
719726
alias=C.PARAMETER_SCALE, default=ParameterScale.LIN
720727
)
@@ -749,7 +756,7 @@ def _convert_nan_to_none(cls, v):
749756
class ParameterTable(BaseModel):
750757
"""PEtab parameter table."""
751758

752-
#: List of parameters
759+
#: List of parameters.
753760
parameters: list[Parameter]
754761

755762
@classmethod

0 commit comments

Comments
 (0)