Skip to content

Commit dbd7e04

Browse files
authored
v2: Observable/conditions/experiments/... objects (#345)
Implement an object model for the various PEtab entities as an alternative to working with the plain DataFrames. Related to #337. Object names are very likely to change. This is more of a proof of concept. Also adapt to recent changes in PEtab-dev/PEtab#581
1 parent 98b0115 commit dbd7e04

File tree

6 files changed

+835
-44
lines changed

6 files changed

+835
-44
lines changed

petab/v2/C.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -130,30 +130,23 @@
130130
CONDITION_NAME = "conditionName"
131131
#: Column in the condition table with the ID of an entity that is changed
132132
TARGET_ID = "targetId"
133-
#: Column in the condition table with the type of value that is changed
134-
VALUE_TYPE = "valueType"
133+
#: Column in the condition table with the operation type
134+
OPERATION_TYPE = "operationType"
135135
#: Column in the condition table with the new value of the target entity
136136
TARGET_VALUE = "targetValue"
137-
# value types:
138-
VT_CONSTANT = "constant"
139-
VT_INITIAL = "initial"
140-
VT_RATE = "rate"
141-
VT_ASSIGNMENT = "assignment"
142-
VT_RELATIVE_RATE = "relativeRate"
143-
VT_RELATIVE_ASSIGNMENT = "relativeAssignment"
144-
VALUE_TYPES = [
145-
VT_CONSTANT,
146-
VT_INITIAL,
147-
VT_RATE,
148-
VT_ASSIGNMENT,
149-
VT_RELATIVE_RATE,
150-
VT_RELATIVE_ASSIGNMENT,
137+
# operation types:
138+
OT_CUR_VAL = "setCurrentValue"
139+
OT_NO_CHANGE = "noChange"
140+
141+
OPERATION_TYPES = [
142+
OT_CUR_VAL,
143+
OT_NO_CHANGE,
151144
]
152145

153146
CONDITION_DF_COLS = [
154147
CONDITION_ID,
155148
TARGET_ID,
156-
VALUE_TYPE,
149+
OPERATION_TYPE,
157150
TARGET_VALUE,
158151
]
159152

0 commit comments

Comments
 (0)