From 0e41f294a764deb4bce2d822cccf1f8a9f1ee1a5 Mon Sep 17 00:00:00 2001 From: kkaris Date: Fri, 13 Sep 2024 12:39:42 -0700 Subject: [PATCH] Remove unnecessary kwarg for getting S3 client --- emmaa/model.py | 8 ++++---- emmaa/model_tests.py | 4 ++-- emmaa/util.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/emmaa/model.py b/emmaa/model.py index aa45d940..fbb4e4eb 100644 --- a/emmaa/model.py +++ b/emmaa/model.py @@ -573,7 +573,7 @@ def assemble_pysb(self, mode='local', bucket=EMMAA_BUCKET_NAME): fname = f'{exp_f}_{self.date_str}.{exp_f}' pa.export_model(exp_f, fname) logger.info(f'Uploading {fname}') - client = get_s3_client(unsigned=False) + client = get_s3_client() client.upload_file(fname, bucket, f'exports/{self.name}/{fname}') return pysb_model @@ -588,7 +588,7 @@ def assemble_pybel(self, mode='local', bucket=EMMAA_BUCKET_NAME): fname = f'pybel_{self.date_str}.bel.nodelink.json.gz' pybel.dump(pybel_model, fname) logger.info(f'Uploading {fname}') - client = get_s3_client(unsigned=False) + client = get_s3_client() client.upload_file(fname, bucket, f'exports/{self.name}/{fname}') return pybel_model @@ -609,7 +609,7 @@ def assemble_signed_graph(self, mode='local', bucket=EMMAA_BUCKET_NAME): df = ia.make_df() df.to_csv(fname, sep='\t', index=False) logger.info(f'Uploading {fname}') - client = get_s3_client(unsigned=False) + client = get_s3_client() client.upload_file(fname, bucket, f'exports/{self.name}/{fname}') return signed_graph @@ -647,7 +647,7 @@ def assemble_dynamic_pysb(self, mode='local', bucket=EMMAA_BUCKET_NAME): pysb_to_gromet(pysb_model, self.name, self.dynamic_assembled_stmts, fname) logger.info(f'Uploading {fname}') - client = get_s3_client(unsigned=False) + client = get_s3_client() client.upload_file(fname, bucket, f'exports/{self.name}/{fname}') except Exception as e: diff --git a/emmaa/model_tests.py b/emmaa/model_tests.py index 455e9827..8bca8410 100644 --- a/emmaa/model_tests.py +++ b/emmaa/model_tests.py @@ -368,7 +368,7 @@ def answer_dynamic_query(self, query, bucket=EMMAA_BUCKET_NAME): s3_key = (f'query_images/{self.model.name}/{fig_name}_' f'{date_str}{ext}') s3_path = f'https://{bucket}.s3.amazonaws.com/{s3_key}' - client = get_s3_client(unsigned=False) + client = get_s3_client() logger.info(f'Uploading image to {s3_path}') client.upload_file(fig_path, Bucket=bucket, Key=s3_key) fig_path = s3_path @@ -397,7 +397,7 @@ def answer_intervention_query(self, query, bucket=EMMAA_BUCKET_NAME): s3_key = (f'query_images/{self.model.name}/{fig_name}_' f'{date_str}{ext}') s3_path = f'https://{bucket}.s3.amazonaws.com/{s3_key}' - client = get_s3_client(unsigned=False) + client = get_s3_client() logger.info(f'Uploading image to {s3_path}') client.upload_file(fig_path, Bucket=bucket, Key=s3_key) fig_path = s3_path diff --git a/emmaa/util.py b/emmaa/util.py index 42829c9a..5852b062 100644 --- a/emmaa/util.py +++ b/emmaa/util.py @@ -209,7 +209,7 @@ def find_latest_emails(email_type, time_delta=None, w_dt=False): def get_email_content(key): - s3 = get_s3_client(unsigned=False) + s3 = get_s3_client() email_obj = s3.get_object(Bucket=email_bucket, Key=key) return email_obj['Body'].read().decode()