Skip to content

Commit

Permalink
feat: removes processor_full_name (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyoung84 authored May 6, 2024
1 parent 399e422 commit 2ea8ff2
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 39 deletions.
5 changes: 0 additions & 5 deletions src/aind_data_transfer_service/configs/job_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ class BasicUploadJobConfigs(BaseSettings):

aws_param_store_name: Optional[str] = Field(None)

processor_full_name: str = Field(
...,
description="Name of person uploading data",
title="Processor Full Name",
)
project_name: str = Field(
..., description="Name of project", title="Project Name"
)
Expand Down
4 changes: 0 additions & 4 deletions src/aind_data_transfer_service/configs/job_upload_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class JobUploadTemplate:
NUM_TEMPLATE_ROWS = 20
XLSX_DATETIME_FORMAT = "YYYY-MM-DDTHH:mm:ss"
HEADERS = [
"processor_full_name",
"project_name",
"process_capsule_id",
"platform",
Expand All @@ -33,7 +32,6 @@ class JobUploadTemplate:
]
SAMPLE_JOBS = [
[
"Anna Apple",
"Behavior Platform",
"1f999652-00a0-4c4b-99b5-64c2985ad070",
Platform.BEHAVIOR.abbreviation,
Expand All @@ -46,7 +44,6 @@ class JobUploadTemplate:
"/allen/aind/stage/fake/dir",
],
[
"John Smith",
"Ophys Platform - SLAP2",
None,
Platform.SMARTSPIM.abbreviation,
Expand All @@ -57,7 +54,6 @@ class JobUploadTemplate:
"/allen/aind/stage/fake/dir",
],
[
"Anna Apple",
"Ephys Platform",
None,
Platform.ECEPHYS.abbreviation,
Expand Down
Binary file modified tests/resources/job_upload_template.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/resources/sample.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
processor_full_name, project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Anna Apple, Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
John Smith, Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Anna Apple, Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Binary file modified tests/resources/sample.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/resources/sample_alt_modality_case.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
processor_full_name, project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Anna Apple, Ephys Platform, , ecephys, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
John Smith, Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, behavior-videos, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Anna Apple, Behavior Platform, , behavior-videos, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Ephys Platform, , ecephys, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, behavior-videos, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Behavior Platform, , behavior-videos, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
8 changes: 4 additions & 4 deletions tests/resources/sample_empty_rows.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
processor_full_name, project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Anna Apple, Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
John Smith, Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Anna Apple, Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
,,,,,,
,,,,,,
,,,,,,
Binary file modified tests/resources/sample_empty_rows.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/resources/sample_invalid_ext.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
processor_full_name, project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Anna Apple, Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
John Smith, Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Anna Apple, Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
8 changes: 4 additions & 4 deletions tests/resources/sample_malformed.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
processor_full_name, project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Anna Apple, Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
John Smith, Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, WRONG_MODALITY_HERE, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Anna Apple, Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime
Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, WRONG_MODALITY_HERE, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM
Binary file modified tests/resources/sample_malformed.xlsx
Binary file not shown.
6 changes: 0 additions & 6 deletions tests/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class TestJobConfigs(unittest.TestCase):
expected_job_configs = [
BasicUploadJobConfigs(
aws_param_store_name="/some/param/store",
processor_full_name="Anna Apple",
project_name="Ephys Platform",
process_capsule_id=None,
s3_bucket="private",
Expand All @@ -53,7 +52,6 @@ class TestJobConfigs(unittest.TestCase):
),
BasicUploadJobConfigs(
aws_param_store_name="/some/param/store",
processor_full_name="John Smith",
project_name="Behavior Platform",
process_capsule_id="1f999652-00a0-4c4b-99b5-64c2985ad070",
s3_bucket="open",
Expand Down Expand Up @@ -86,7 +84,6 @@ class TestJobConfigs(unittest.TestCase):
),
BasicUploadJobConfigs(
aws_param_store_name="/some/param/store",
processor_full_name="Anna Apple",
project_name="Behavior Platform",
process_capsule_id=None,
s3_bucket="scratch",
Expand Down Expand Up @@ -158,7 +155,6 @@ def test_parse_csv_file(self):
# not formatted correctly
with self.assertRaises(Exception) as e1:
BasicUploadJobConfigs(
processor_full_name="Anna Apple",
project_name="Behavior Platform",
s3_bucket="",
platform=Platform.BEHAVIOR,
Expand Down Expand Up @@ -225,7 +221,6 @@ def test_malformed_platform(self):
with self.assertRaises(AttributeError) as e:
BasicUploadJobConfigs(
aws_param_store_name="/some/param/store",
processor_full_name="Anna Apple",
project_name="Behavior Platform",
s3_bucket="some_bucket2",
platform="MISSING",
Expand Down Expand Up @@ -321,7 +316,6 @@ def test_from_job_and_server_configs(self):
" python -m aind_data_transfer.jobs.basic_job"
" --json-args ' "
'{"aws_param_store_name":"/some/param/store",'
'"processor_full_name":"Anna Apple",'
'"project_name":"Ephys Platform",'
'"process_capsule_id":null,'
'"s3_bucket":"private",'
Expand Down
6 changes: 2 additions & 4 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ def test_submit_hpc_jobs(
{
"hpc_settings": '{"qos":"production", "name": "job1"}',
"upload_job_settings": (
'{"processor_full_name":"Anna Apple", '
'"project_name":"Ephys Platform", '
'{"project_name":"Ephys Platform", '
'"process_capsule_id":null, '
'"s3_bucket": "private", '
'"platform": {"name": "Behavior platform", '
Expand Down Expand Up @@ -367,8 +366,7 @@ def test_submit_hpc_jobs_open_data(
{
"hpc_settings": '{"qos":"production", "name": "job1"}',
"upload_job_settings": (
'{"processor_full_name":"Anna Apple", '
'"project_name":"Ephys Platform", '
'{"project_name":"Ephys Platform", '
'"process_capsule_id":null, '
'"s3_bucket": "open", '
'"platform": {"name": "Behavior platform", '
Expand Down

0 comments on commit 2ea8ff2

Please sign in to comment.