Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #996

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/upsert_participants.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,24 @@ def read_files_from_gcs(bucket_name: str, file_path: str):
@click.option('--participant-meta', help='Path to participant metadata CSV.')
@click.option('--sample-meta', help='Path to sample metadata CSV.')
@click.option('--sample-external-id-column', help='Column name for sample external ID.')
@click.option('--external-org-name', help='External organization name.')
@click.option('--external-org-name', required=False, help='External organization name.')
def main(
bucket: str,
participant_meta: str,
sample_meta: str,
sample_external_id_column: str,
external_org_name: str,
external_org_name: str | None = None,
): # pylint: disable=too-many-locals
"""Upsert participants to metamist"""
# Query metamist
project = bucket.split('-')[1] # project name derived from bucket name
data_response = get_sample_data(project)
project_id = data_response.get('project')['id']

# allow empty external_org_name for backwards compatibility
if external_org_name is None:
external_org_name = ''

sample_eid_mapping = map_sample_eid_to_sample_data(data_response)

# Set up logging
Expand Down
Loading