3
3
from __future__ import annotations
4
4
5
5
from enum import Enum
6
- from typing import Optional , Generic , TypeVar
6
+ from typing import Generic , Optional , TypeVar
7
7
from uuid import uuid4
8
8
9
- from pydantic import BaseModel , Field , ConfigDict
9
+ from pydantic import BaseModel , ConfigDict , Field
10
10
11
11
# Filter Wrapper definition used to filter a list of objects
12
12
# based on their attributes
@@ -1737,23 +1737,23 @@ def add_to_species_data(
1737
1737
species_id : str ,
1738
1738
initial : float ,
1739
1739
data_unit : UnitDefinition ,
1740
- time_unit : UnitDefinition ,
1741
1740
data_type : DataTypes ,
1742
1741
prepared : Optional [float ] = None ,
1743
1742
data : list [float ] = [],
1744
1743
time : list [float ] = [],
1744
+ time_unit : Optional [UnitDefinition ] = None ,
1745
1745
is_simulated : bool = False ,
1746
1746
** kwargs ,
1747
1747
):
1748
1748
params = {
1749
1749
"species_id" : species_id ,
1750
1750
"initial" : initial ,
1751
1751
"data_unit" : data_unit ,
1752
- "time_unit" : time_unit ,
1753
1752
"data_type" : data_type ,
1754
1753
"prepared" : prepared ,
1755
1754
"data" : data ,
1756
1755
"time" : time ,
1756
+ "time_unit" : time_unit ,
1757
1757
"is_simulated" : is_simulated ,
1758
1758
}
1759
1759
@@ -1773,11 +1773,11 @@ class MeasurementData(BaseModel):
1773
1773
species_id : str
1774
1774
initial : float
1775
1775
data_unit : UnitDefinition
1776
- time_unit : UnitDefinition
1777
1776
data_type : DataTypes
1778
1777
prepared : Optional [float ] = Field (default = None )
1779
1778
data : list [float ] = Field (default_factory = list )
1780
1779
time : list [float ] = Field (default_factory = list )
1780
+ time_unit : Optional [UnitDefinition ] = Field (default = None )
1781
1781
is_simulated : bool = False
1782
1782
1783
1783
# JSON-LD fields
0 commit comments