Skip to content

Commit

Permalink
[FIX] Add pipeline_starttime to bagel file (nipoppy#286)
Browse files Browse the repository at this point in the history
* test for model field names

* add `pipeline_starttime` column to bagel
  • Loading branch information
michellewang authored Jul 15, 2024
1 parent f356ada commit 28ed729
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nipoppy_cli/nipoppy/tabular/bagel.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class BagelModel(BaseTabularModel):
pipeline_complete: str = Field(
description="The status of the pipeline run for this participant-visit pair"
)
# this is needed for now for the dashboard for work, but should be removed
# if https://github.com/neurobagel/digest/issues/153 is addressed
# TODO discuss bagel schema
pipeline_starttime: str = Field(default="UNAVAILABLE")

@field_validator("pipeline_complete")
@classmethod
Expand Down
12 changes: 11 additions & 1 deletion nipoppy_cli/tests/test_tabular_bagel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@
],
)
def test_model(data):
BagelModel(**data)
bagel = BagelModel(**data)
assert set(bagel.model_fields.keys()) == {
Bagel.col_participant_id,
Bagel.col_bids_participant,
Bagel.col_session_id,
Bagel.col_pipeline_name,
Bagel.col_pipeline_version,
Bagel.col_pipeline_complete,
"session",
"pipeline_starttime",
}


@pytest.mark.parametrize(
Expand Down

0 comments on commit 28ed729

Please sign in to comment.