Skip to content

Commit 35081ef

Browse files
committed
fix tests
1 parent 3c2447c commit 35081ef

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

store/neurostore/models/data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ class PipelineRunResult(BaseMixin, db.Model):
582582
db.Text, db.ForeignKey("pipeline_runs.id", ondelete="CASCADE"), index=True
583583
)
584584
base_study_id = db.Column(db.Text, db.ForeignKey("base_studies.id"), index=True)
585+
date_executed = db.Column(db.DateTime(timezone=True))
585586
data = db.Column(JSONB)
586587
file_inputs = db.Column(JSONB)
587588
# feature_index = db.Column(db.Integer) # the same categories of information can be extracted multiple times from a single paper (e.g., multiple demographic groups, multiple software packages, etc)

store/neurostore/tests/conftest.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,14 @@ def create_demographic_features(session, ingest_neurosynth, tmp_path):
622622
study_dir = output_dir / study.id
623623
study_dir.mkdir(exist_ok=True, parents=True)
624624
with open(study_dir / "results.json", "w") as f:
625-
for entry in study_data:
626-
json.dump(entry, f)
627-
f.write('\n')
625+
json.dump({"predictions": study_data}, f)
626+
with open(study_dir / "info.json", "w") as f:
627+
json.dump(
628+
{
629+
"inputs": {f"/path/to/input/{study.id}.txt": f"md5{random.randint(0, 100)}"},
630+
"date": f"2021-01-{random.randint(1, 30)}",
631+
}, f
632+
)
628633

629634
return output_dir
630635

0 commit comments

Comments
 (0)