Skip to content

Commit

Permalink
CELE-46 Code dust
Browse files Browse the repository at this point in the history
  • Loading branch information
dvcorreia committed Aug 20, 2024
1 parent 605011a commit 519b6a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions applications/visualizer/backend/ingestion/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Dataset(BaseModel):
id: str
name: str
type: DatasetType
time: float # TODO: should be gte than 0?
visualTime: float # TODO: should be gte than 0?
time: float # TODO: should add validation gte than 0?
visualTime: float # TODO: should add validation gte than 0?
description: str
axes: Optional[List[Axe]] = Field(
default=None, description="different axes and their representation"
Expand Down Expand Up @@ -94,7 +94,7 @@ class Data(BaseModel):
datasets: List[Dataset]
connections: Dict[str, List[Connection]] = {}
annotations: Dict[
Literal["head", "complete"], Annotation # TODO: should 'tail' be included
Literal["head", "complete"], Annotation # TODO: should 'tail' be included?
] = {}

@model_validator(mode="after")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class DatasetTc(NamedTuple):
"id": "witvliet_2020_1",
"name": "Witvliet et al., 2020, Dataset 1 (L1)",
"type": "head",
"time": 0,
"time": 0.62,
"visualTime": 0.5,
"description": "~0 hours after birth",
"axes": [
Expand All @@ -133,7 +133,7 @@ class DatasetTc(NamedTuple):
id="witvliet_2020_1",
name="Witvliet et al., 2020, Dataset 1 (L1)",
type=DatasetType.HEAD,
time=0,
time=0.62,
visualTime=0.5,
description="~0 hours after birth",
axes=[
Expand Down Expand Up @@ -237,14 +237,14 @@ def test__valid_connection(data: JSON, expected: Connection):
"post": "ADAR",
"post_tid": [9576727],
"pre": "ADAL",
"pre_tid": [9577831], # not same length as ids
"pre_tid": [9577831], # should be the same length as ids
"syn": [1],
"typ": 2,
},
{
"ids": [9583833],
"post": "ADAR",
"post_tid": [9576727, 9583834, 9583834], # not same length as ids
"post_tid": [9576727, 9583834, 9583834], # should be the same length as ids
"pre": "ADAL",
"pre_tid": [9577831],
"syn": [1],
Expand Down

0 comments on commit 519b6a7

Please sign in to comment.