Skip to content

Commit

Permalink
new line issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
billyz313 committed Jun 11, 2024
1 parent 6447f39 commit 943bee4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
12 changes: 2 additions & 10 deletions climateserv/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/) ",
Expand Down

0 comments on commit 943bee4

Please sign in to comment.