annotate test-data/test.py @ 1:e3a7995dce75 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
author iuc
date Fri, 20 Nov 2020 18:21:33 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
1 import json
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
2
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
3 with open("meta.json") as jh:
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
4 data = json.load(jh)
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
5
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
6 print("ID\tcollection_date\tcountry\tstate\tlocality")
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
7 for k in data:
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
8 collection_date = data[k]['collected']
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
9 location = data[k]['location']
e3a7995dce75 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff changeset
10 print("%s\t%s\t%s\t%s\t%s" % (k, collection_date, location['country'], location['state'], location['locality']))