Skip to content

Commit

Permalink
better function name
Browse files Browse the repository at this point in the history
  • Loading branch information
ngreenwald committed May 23, 2020
1 parent 36c8c02 commit 8a55778
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions caliban_toolbox/figure_eight_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ def copy_job(job_id, key):
return new_job_id


def upload_data(csv_path, job_id, key):
"""Add data to an existing Figure 8 job by uploading a CSV file
def upload_log_file(log_file, job_id, key):
"""Upload log file to populate a job for Figure8
Args:
csv_path: full path to csv
log_file: file specifying paths to NPZs included in this job
job_id: ID number of job to upload data to
key: API key to access Figure 8 account
"""
Expand All @@ -142,8 +142,8 @@ def upload_data(csv_path, job_id, key):
csv_data = csv_file.read()

headers = {"Content-Type": "text/csv"}
add_data = requests.put(url, data=log_file, headers=headers)

add_data = requests.put(url, data=csv_data, headers=headers)
if add_data.status_code != 200:
print("Upload_data not successful. Status code: ", add_data.status_code)
else:
Expand Down

0 comments on commit 8a55778

Please sign in to comment.