wylark
/
infoex-autowx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e7abb7e
)
Touch up a few comments (typos, extraneous, etc.)
author
Alexander Vasarab <alexander@wylark.com>
Wed, 1 Jul 2020 02:06:39 +0000
(19:06 -0700)
committer
Alexander Vasarab <alexander@wylark.com>
Wed, 1 Jul 2020 02:06:39 +0000
(19:06 -0700)
infoex-autowx.py
patch
|
blob
|
history
diff --git
a/infoex-autowx.py
b/infoex-autowx.py
index e4befadd20e8206f1ceb8d216a8c989eac657545..598f24cd765d300b8d49f3e2b1884ebca63e8a41 100755
(executable)
--- a/
infoex-autowx.py
+++ b/
infoex-autowx.py
@@
-180,7
+180,7
@@
except ValueError as exc:
#
# Also note that the current Auto Wx InfoEx documentation shows these
# keys in a graphical table with the "index" beginning at 1, but here we
#
# Also note that the current Auto Wx InfoEx documentation shows these
# keys in a graphical table with the "index" beginning at 1, but here we
-#
are sanely indexing
beginning at 0.
+#
sanely index
beginning at 0.
fmap = {} ; final_data = [None] * 29
fmap['Location UUID'] = 0 ; final_data[0] = infoex['location_uuid']
fmap['obDate'] = 1 ; final_data[1] = None
fmap = {} ; final_data = [None] * 29
fmap['Location UUID'] = 0 ; final_data[0] = infoex['location_uuid']
fmap['obDate'] = 1 ; final_data[1] = None
@@
-323,9
+323,9
@@
elif data['provider'] == 'mesowest':
# sort and isolate the most recent, see note above in NRCS for how and
# why this is done
#
# sort and isolate the most recent, see note above in NRCS for how and
# why this is done
#
- # NOTE: Unlike in the NRCS case, the MesoWest API respon
es
contains all
+ # NOTE: Unlike in the NRCS case, the MesoWest API respon
se
contains all
# data (whereas with NRCS, we have to make a separate request for
# data (whereas with NRCS, we have to make a separate request for
- # each element we want. This is nice for network efficiency but
+ # each element we want
)
. This is nice for network efficiency but
# it means we have to handle this part differently for each.
#
# NOTE: Also unlike NRCS, MesoWest provides more granular data; NRCS
# it means we have to handle this part differently for each.
#
# NOTE: Also unlike NRCS, MesoWest provides more granular data; NRCS
@@
-363,7
+363,7
@@
for elementCd in infoex['wx_data']:
# any possible elementCds we may want are any other data
# type than float.
#
# any possible elementCds we may want are any other data
# type than float.
#
- # Another possibility is to query the API
with
+ # Another possibility is to query the API with
# getStationElements and temporarily store the
# storedUnitCd. But that's pretty network-intensive and
# may not even be worth it if there's only e.g. one or two
# getStationElements and temporarily store the
# storedUnitCd. But that's pretty network-intensive and
# may not even be worth it if there's only e.g. one or two
@@
-381,7
+381,6
@@
with open(infoex['csv_filename'], 'w') as f:
f.close()
if not options.dry_run:
f.close()
if not options.dry_run:
- # not a dry run
with open(infoex['csv_filename'], 'rb') as f:
log.debug("uploading FTP file '%s'" % (infoex['host']))
ftp = FTP(infoex['host'], infoex['uuid'], infoex['api_key'])
with open(infoex['csv_filename'], 'rb') as f:
log.debug("uploading FTP file '%s'" % (infoex['host']))
ftp = FTP(infoex['host'], infoex['uuid'], infoex['api_key'])