Skip to content

Commit

Permalink
Feat 77: add metadata_dir field to excel template and validated jobs …
Browse files Browse the repository at this point in the history
…table (#88)

* Feat 77: add metadata_dir field to excel template and validated jobs table

* add metadata_dir to xlsx template in test/resources
  • Loading branch information
helen-m-lin authored Apr 5, 2024
1 parent ba2b607 commit f5a8457
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/aind_data_transfer_service/configs/job_upload_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class JobUploadTemplate:
"platform",
"acq_datetime",
"subject_id",
"metadata_dir",
"modality0",
"modality0.source",
"modality1",
Expand All @@ -31,6 +32,7 @@ class JobUploadTemplate:
Platform.BEHAVIOR.abbreviation,
datetime.datetime(2023, 10, 4, 4, 0, 0),
"123456",
"/allen/aind/stage/fake/metadata_dir",
Modality.BEHAVIOR_VIDEOS.abbreviation,
"/allen/aind/stage/fake/dir",
Modality.BEHAVIOR.abbreviation,
Expand All @@ -40,13 +42,15 @@ class JobUploadTemplate:
Platform.SMARTSPIM.abbreviation,
datetime.datetime(2023, 3, 4, 16, 30, 0),
"654321",
"/allen/aind/stage/fake/Config",
Modality.SPIM.abbreviation,
"/allen/aind/stage/fake/dir",
],
[
Platform.ECEPHYS.abbreviation,
datetime.datetime(2023, 1, 30, 19, 1, 0),
"654321",
None,
Modality.ECEPHYS.abbreviation,
"/allen/aind/stage/fake/dir",
Modality.BEHAVIOR_VIDEOS.abbreviation,
Expand Down
3 changes: 2 additions & 1 deletion src/aind_data_transfer_service/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h2>Submit Jobs</h2>
let jobsLength = jobs.length;
var table = document.createElement('table'), tr, td, row;
addTableRow(
[ "s3_bucket", "platform", "subject_id", "acq_datetime", "modality", "modality.source" ],
[ "s3_bucket", "platform", "subject_id", "acq_datetime", "metadata_dir", "modality", "modality.source" ],
table, tr, td, true
);
for (row = 0; row < jobsLength; row++) {
Expand All @@ -151,6 +151,7 @@ <h2>Submit Jobs</h2>
{ value: job.platform.abbreviation, rowspan: modalitiesLength },
{ value: job.subject_id, rowspan: modalitiesLength },
{ value: job.acq_datetime, rowspan: modalitiesLength },
{ value: job.metadata_dir ?? "", rowspan: modalitiesLength },
modalities ? modalities[0].modality.abbreviation : "",
modalities ? modalities[0].source : ""
], table, tr, td, false
Expand Down
Binary file modified tests/resources/job_upload_template.xlsx
Binary file not shown.

0 comments on commit f5a8457

Please sign in to comment.