From 943bee4887ac1d4ad3e9067fccfd00591b192324 Mon Sep 17 00:00:00 2001 From: Billy Ashmall Date: Tue, 11 Jun 2024 12:39:10 -0500 Subject: [PATCH] new line issue fixed --- climateserv/api.py | 12 ++---------- meta.yaml | 4 ++-- setup.py | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/climateserv/api.py b/climateserv/api.py index 48f6877..42ac044 100644 --- a/climateserv/api.py +++ b/climateserv/api.py @@ -18,14 +18,6 @@ def print_me(message): pass -def get_request_data_url(base_url, job_id): - return base_url + "getDataFromRequest?a=3&id=" + str(job_id) - - -def get_file_for_job_id_url(base_url, job_id): - return base_url + "getFileForJobID?a=4&id=" + str(job_id) - - def get_server_response(the_url): try: time.sleep(1) @@ -275,7 +267,7 @@ def process_job_controller(config_obj): # If file download job, generate the file download link. download_link = "NA" if job_operation_id == 6 or job_operation_id == 7: - download_link = get_file_for_job_id_url(config_obj['base_url'], the_job_id) + download_link = config_obj['base_url'] + "getFileForJobID?a=4&id=" + str(the_job_id) return { "ServerJobID": the_job_id, @@ -403,7 +395,7 @@ def request_data(data_set_type, my_csv_file_name = request_config['outfile'] - the_file = open(my_csv_file_name, 'a') + the_file = open(my_csv_file_name, 'a', newline='') f = csv.writer(the_file) f.writerow(job_header_info) f.writerow(row_headings) diff --git a/meta.yaml b/meta.yaml index 972154c..f651f1f 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,9 +1,9 @@ package: name: "climateserv" - version: "1.0.5" + version: "1.0.6" source: - git_rev: v1.0.5 + git_rev: v1.0.7 git_url: https://github.com/SERVIR/ClimateSERVpy build: diff --git a/setup.py b/setup.py index 365124e..8f458e6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="climateserv", # Replace with your own username - version="1.0.5", + version="1.0.6", author="Billy Ashmall", author_email="billy.ashmall@nasa.gov", description="This is a package to access the ClimateSERV API](https://climateserv.servirglobal.net/) ",