From f5a84575bed6fa38cd1c77ced5cc2b92983e6069 Mon Sep 17 00:00:00 2001 From: Helen Lin <46795546+helen-m-lin@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:25:13 -0700 Subject: [PATCH] Feat 77: add metadata_dir field to excel template and validated jobs table (#88) * Feat 77: add metadata_dir field to excel template and validated jobs table * add metadata_dir to xlsx template in test/resources --- .../configs/job_upload_template.py | 4 ++++ .../templates/index.html | 3 ++- tests/resources/job_upload_template.xlsx | Bin 5652 -> 5686 bytes 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/aind_data_transfer_service/configs/job_upload_template.py b/src/aind_data_transfer_service/configs/job_upload_template.py index e2b1f43..f49c946 100644 --- a/src/aind_data_transfer_service/configs/job_upload_template.py +++ b/src/aind_data_transfer_service/configs/job_upload_template.py @@ -21,6 +21,7 @@ class JobUploadTemplate: "platform", "acq_datetime", "subject_id", + "metadata_dir", "modality0", "modality0.source", "modality1", @@ -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, @@ -40,6 +42,7 @@ 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", ], @@ -47,6 +50,7 @@ class JobUploadTemplate: 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, diff --git a/src/aind_data_transfer_service/templates/index.html b/src/aind_data_transfer_service/templates/index.html index de6c6e0..697b075 100644 --- a/src/aind_data_transfer_service/templates/index.html +++ b/src/aind_data_transfer_service/templates/index.html @@ -139,7 +139,7 @@

Submit Jobs

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++) { @@ -151,6 +151,7 @@

Submit Jobs

{ 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 diff --git a/tests/resources/job_upload_template.xlsx b/tests/resources/job_upload_template.xlsx index 7bb211cb45bc3eccc347ba73f3719cc853e4e12d..5c0a8755150f55f01d14871d4c552ebe7e5dd805 100644 GIT binary patch delta 1748 zcmY*ac{J2}AO6i)Gxla&mo8aCnz@#)Z7kE`*rr6umh9?YgUP-m!;OkT7-SzKk}b?I zg^Xk=Ehf!)&4dQyjHOG`0;(Z>+-`dUxa+(1=^CloSjo<0Pp#yEp%BTd>tv;E}8FOVzIEIQ*R` zGh5}gOj>=S;%n%cZxkPUxv)D6r&ezeSBKwZD8d%kRyOo?h*U!|*(NpU4>9pdmXJy3 zOXBTEN!UJ~{&wAoI0Jj>__Y@MM+2Bv_7^2tH(o#~kHLnmSJYcx?mG8Kc}K~J6xu%i zcvsg`h@9lLtAPUjln~`VAPZsHy^L-a(k=!F0)QJoAbEgL3su0iy8atpfrRe3$XocS zBvJ#Ih3>7$<&wxi&X@UW``q$aq30Toqr2b77a36}-J_{oXju4Q=YWa2{I+$!S8t|t zO{bL)TzJd=Rqye$&FpMZ{IUEj`8aUD8k{un_<@aacY{lO!xt;`tOJ9A6 z3jsEM$LR8N&n`V){Lu{Juy^>VN5!ah|!BlM{Eo<}^U9aSk#D=aQC zLDGARz34cLe9PyxH9j2TRs7Bt%2k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