Skip to content
Snippets Groups Projects
Commit 71cceec4 authored by cramakri's avatar cramakri
Browse files

CCS-9 SP-304 : Modified script that retrieves data from Chicago to write to a...

CCS-9 SP-304 : Modified script that retrieves data from Chicago to write to a tmp file and then mv the tmp file to the correct location.

SVN: 27114
parent 1b38d872
No related branches found
No related tags found
No related merge requests found
...@@ -517,4 +517,3 @@ JJS-MGP201,False,True ...@@ -517,4 +517,3 @@ JJS-MGP201,False,True
JJS-MGP163,False,True JJS-MGP163,False,True
JJS-MGP108,False,True JJS-MGP108,False,True
JJS-MGP043,False,True JJS-MGP043,False,True
JJS-MGP999,False,True
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import urllib import urllib
import json import json
import csv import csv
import shutil
FIELD_ID = 'id' FIELD_ID = 'id'
FIELD_PREDICTIONS = 'predictions' FIELD_PREDICTIONS = 'predictions'
...@@ -48,5 +49,6 @@ def writeDataToFile(filePath, dataList): ...@@ -48,5 +49,6 @@ def writeDataToFile(filePath, dataList):
file.close() file.close()
data = loadDataFromServer('http://pubseed.theseed.org/model-prod/StrainServer.cgi?user=reviewer&pass=reviewer&method=getAllPhenotypesAndPredictions&encoding=json') data = loadDataFromServer('http://pubseed.theseed.org/model-prod/StrainServer.cgi?user=reviewer&pass=reviewer&method=getAllPhenotypesAndPredictions&encoding=json')
writeDataToFile('data-from-server.csv', convertData(data)) writeDataToFile('data-from-server.csv.tmp', convertData(data))
shutil.move('data-from-server.csv.tmp', 'data-from-server.csv')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment