You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent changes have meant that when a data error slips in, the "ABORTING due to N errors" doesn't happen until after (the time consuming) generation of all the subgraphs. I had gotten used to being able to ignore the site update process once graph generation started. I'd like to see about getting that ABORTING condition moved back earlier so I have a better chance to notice the problem. I just about was calling it a night when I noticed tonight's update had failed. I'll try to check this out soon but wouldn't be sad if @yakra beat me to it.
el.add_error("Could not parse datacheckfps.csv line: "+line)
continue
iffields[4] indatacheck_always_error:
print("datacheckfps.csv line not allowed (always error): "+line)
continue
datacheckfps.append(fields)
# See if we have any errors that should be fatal to the site update process
iflen(el.error_list) >0:
print("ABORTING due to "+str(len(el.error_list)) +" errors:")
foriinrange(len(el.error_list)):
print(str(i+1) +": "+el.error_list[i])
sys.exit(1)
earlier, and just have the info hang around during graph generation until we need it.
(It's a smaller & simpler diff than, say, moving all the subgraph generation to the very end...)
Makes sense to me to move it before
# Build a graph structure out of all highway data in active and
# preview systems
and keep all the graph generation-related code together in one place (as opposed to moving it immediately before subgraph generation, after master graph setup).
If we wanted to move this even earlier in the process, it could go after reading the WPT files (the previous call to el.add_error is here), before sorting waypoints in Quadtree.
I think I prefer moving the code to the later point, just before graph generation, as the more future-proof option, in case we add more el.add_errors later.
being able to ignore the site update process once graph generation started
@jteresco, is this the only/main crucial crucial change here?
Isn't it possible to check whether there is an error and abort after wpt files are read? Most of the errors happen here (caused by csv file errors). The check for errors can be done later again.
Activity
yakra commentedon Jan 6, 2019
The final call to
el.add_erroris after reading datacheckfps.csv, if we're unable to parse a datacheckfps.csv line.We could move
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 3054 to 3080 in 103c84d
earlier, and just have the info hang around during graph generation until we need it.
(It's a smaller & simpler diff than, say, moving all the subgraph generation to the very end...)
Makes sense to me to move it before
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 2863 to 2864 in 103c84d
and keep all the graph generation-related code together in one place (as opposed to moving it immediately before subgraph generation, after master graph setup).
If we wanted to move this even earlier in the process, it could go after reading the WPT files (the previous call to
el.add_erroris here), before sorting waypoints in Quadtree.yakra commentedon Jan 6, 2019
I think I prefer moving the code to the later point, just before graph generation, as the more future-proof option, in case we add more
el.add_errors later.@jteresco, is this the only/main crucial crucial change here?
michihdeu commentedon Jan 6, 2019
Isn't it possible to check whether there is an error and abort after wpt files are read? Most of the errors happen here (caused by csv file errors). The check for errors can be done later again.
jteresco commentedon Jan 6, 2019
Let's put it as late as possible to catch as many current and future unrecoverable errors, so right before graph generation.