Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-harper committed Nov 21, 2024
1 parent a6423a6 commit 1c83bdc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/upsert_participants.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ def main(
sample_meta: str,
sample_external_id_column: str,
external_org_name: str,
):
): # pylint: disable=too-many-locals
"""Upsert participants to metamist"""
# Query metamist
project = bucket.split('-')[1] # project name derived from bucket name
project = 'mgrb-dev'
project = bucket.split('-')[1] # project name derived from bucket name
data_response = get_sample_data(project)
project_id = data_response.get('project')['id']

Expand Down Expand Up @@ -163,12 +162,16 @@ def main(
if peid not in participant_sample_map:
participant_sample_map[peid] = []
participant_sex_map[peid] = sex
participant_sample_map[peid].append(create_sample(project_id, seid, siid, external_org_name))
participant_sample_map[peid].append(
create_sample(project_id, seid, siid, external_org_name)
)

participant_upserts = []
for peid, sample_upserts in participant_sample_map.items():
participant_upserts.append(
create_participant(sample_upserts, peid, participant_sex_map[peid], external_org_name)
create_participant(
sample_upserts, peid, participant_sex_map[peid], external_org_name
)
)

# Upsert participants
Expand Down

0 comments on commit 1c83bdc

Please sign in to comment.