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

prod deploy #169

Merged
merged 7 commits into from Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -20,9 +20,9 @@ env:
- FUNCTION=send_email TOPIC=emails TIMEOUT=60 MEMORY=256
- FUNCTION=store_auth0_logs TOPIC=daily_cron TIMEOUT=120 MEMORY=256
- FUNCTION=disable_inactive_users TOPIC=daily_cron TIMEOUT=120 MEMORY=256
- FUNCTION=vis_preprocessing TOPIC=artifact_upload TIMEOUT=120 MEMORY=512
- FUNCTION=vis_preprocessing TOPIC=artifact_upload TIMEOUT=540 MEMORY=1024
- FUNCTION=derive_files_from_manifest_upload TOPIC=patient_sample_update TIMEOUT=60 MEMORY=256
- FUNCTION=derive_files_from_assay_or_analysis_upload TOPIC=assay_or_analysis_upload_complete TIMEOUT=60 MEMORY=1024
- FUNCTION=derive_files_from_assay_or_analysis_upload TOPIC=assay_or_analysis_upload_complete TIMEOUT=540 MEMORY=1024
before_install:
# Install and configure the gcloud SDK. Values for these environment
# variables must be set in the Travis CI console for this to work:
Expand Down
6 changes: 6 additions & 0 deletions functions/visualizations.py
Expand Up @@ -238,6 +238,12 @@ def _metadata_to_categories(metadata_df: pd.DataFrame) -> list:
columns = sorted(columns, key=lambda c: len(metadata_df[c].unique()))
metadata_df = metadata_df[columns]

if "Disease progression" in columns:
columns[columns.index("Disease progression")] = "Disease prog"
if "RECIST clinical benefit status" in columns:
columns[columns.index("RECIST clinical benefit status")] = "Clin benefit"
metadata_df.columns = columns

# build the output str in ClusterGrammer compatible format
categories = []
for idx, row in metadata_df.iterrows():
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -10,4 +10,4 @@ scikit-learn==0.21.3 # clustergrammer dependency
six~=1.13.0

# The cidc_api_modules package
cidc-api-modules~=0.20.6
cidc-api-modules~=0.22.0
13 changes: 5 additions & 8 deletions tests/functions/test_visualizations.py
Expand Up @@ -34,10 +34,7 @@ def metadata_df():
"Arm_A",
"Arm_A",
], # kept no matter cardinality; -> CG 'Cohort'
"collection_event_name": [
"Event1",
"Event2",
], # -> CG 'RECIST clinical benefit status'
"collection_event_name": ["Event1", "Event2"], # -> CG 'Clin benefit'
}
)
metadata_df.set_index("cimac_id", inplace=True)
Expand Down Expand Up @@ -293,31 +290,31 @@ def test_metadata_to_categories():
"Treatment: False",
"Collection Event: c",
"Cohort: b",
"RECIST clinical benefit status: z",
"Clin benefit: z",
"Participant Id: a",
),
(
"CIMAC Id: CT2",
"Treatment: True",
"Collection Event: f",
"Cohort: e",
"RECIST clinical benefit status: y",
"Clin benefit: y",
"Participant Id: d",
),
(
"CIMAC Id: CT3",
"Treatment: True",
"Collection Event: i",
"Cohort: h",
"RECIST clinical benefit status: x",
"Clin benefit: x",
"Participant Id: g",
),
(
"CIMAC Id: CT4",
"Treatment: False",
"Collection Event: c",
"Cohort: e",
"RECIST clinical benefit status: x",
"Clin benefit: x",
"Participant Id: j",
),
]
Expand Down