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
{{ message }}
Repository navigation
Subset of site update process to verify highway data changes #73
Idea: add an option to the site update program that only does enough to find common mistakes in highway data. No graphs would need to be generated, user list files would not need to be fully processed, and no sql file would need to be generated.
This should read the updates.csv and systemupdates.csv and should generate a datacheck log file or other messages that can be used to find datacheck problems.
Log of Data Errors (without FPs) It would be great if the datacheck log mentioned by Jim would output errors without FPs so that one can directly find the relevant entries caused by one's latest update. The entry order should be alphabetically by region.
Log of Unmatched FPs from datacheckfps.csv
Log of Unprocessed WPTs in the Repository
Graph generation for a specific region The user should be able to enter a region code, e.g. "deu-rp". The output file can be manually load to HDX for checking concurrencies et cetera; I think it should likely be a different command to be run
That means, one must be able to download the file.
Log of Data Errors (without FPs) It would be great if the datacheck log mentioned by Jim would output errors without FPs so that one can directly find the relevant entries caused by one's latest update. The entry order should be alphabetically by region.
Log of Unmatched FPs from datacheckfps.csv Log of Unprocessed WPTs in the Repository
unmatchedfps.log and unprocessedwpts.log are produced by the full siteupdate.py, and stored in siteupdate/python-teresco. This functionality could be preserved in a "siteupdate-lite" program, possibly with a commandline switch to disable if it would result in significant time savings.
Graph generation for a specific region The user should be able to enter a region code, e.g. "deu-rp". The output file can be manually load to HDX for checking concurrencies et cetera; I think it should likely be a different command to be run
I'm more lukewarm on this personally. I think we'd be better off just running the full siteupdate.py here. The process can be sped up by editing systems.csv to only include the systems that would be relevant for such a graph. (E.G., for deu-rp, include only deua, deub, deurpl, & eure.)
We'd just have to be sure to include at least one active and at least one preview system (#16).
This functionality could be preserved in a "siteupdate-lite" program, possibly with a commandline switch to disable if it would result in significant time savings.
From the last update:
[231.8] Performing data checks.
[247.2] Marking datacheck false positives.
[269.0] Writing log of unmatched datacheck FP entries.
[269.0] Creating route hash table for list processing:
37 seconds. Should be an option, e.g. "-d" to include it
The process can be sped up by editing systems.csv to only include the systems that would be relevant for such a graph. (E.G., for deu-rp, include only deua, deub, deurpl, & eure.)
I also thought about this option but I don't like that we have to modify systems.csv because we must remember to undo it again. You can easily forget systems, e.g. of neighboring countries when you've synced wpts at borders. I don't think that it's clever to check data with a modified set of it.
Well, I mean, Jim wrote that he wants to disable graph generation by default. If an option remains to generate (one or all) graphs, it's fine with me.
I've mentioned it because we need an option to download the graph files.
My plan is to have the same information that's in the DB to populate the datacheck page, but produced in a plain text format useful to find the errors quickly.
For a modified systems.csv, there's already an option you can use to limit to your own systems if you want. If you had a deu.csv in the same location as systems.csv, you could add
-s deu.csv
to your command line and it would only process systems listed there.
I expect we'd run into some trouble trying to generate graphs when a small subset of the data is loaded.
I also think it's worth keeping in the user list file processing so points in use and unused alt label logs can be generated. That part of the process looks to take about 25 seconds on my Mac.
Good to know the -s option but again, I don't like it for data check because the result might be falsified if you do something wrong and the check should be used to find exactly these errors.
NMP: I have no strong feeling on this. I currently pay no attention to it because of the difficult FP handling. And I forgot the details meanwhile. I wait for improvement: TravelMapping/Web#187. However, I think it's a very important data check! I partially do it manually now.
Once NMP check will be fully integrated, it will be needed here to avoid broken concurrencies on the site.
If user list file processing remains, only the subsequent things could be skipped to save time (plus graphs which were skipped last time):
[326.3] Creating per-traveler stats log entries and augmenting data structure.
[369.8] Writing traveler list logs.
[370.1] Writing stats csv files.
[370.3] SKIPPING generation of graphs.
[370.3] Writing database file TravelMapping.sql.
[382.7] Processed 292 highway systems.
Since those last ones are fairly quick, I've left them in so far.
What are preferences for datacheck.log? Include matched FPs (labeled as such), put matched FPs in a separate log file, or ignore matched FPs? Right now, I have it generating lines like these:
It's just a log for contributors testing their latest changes. I would exclude FPs to keep it as simple as possible for contributors. Another log file for unmatched FPs.
I'd like to avoid this format -- I foresee pasting datacheck.log into LibreOffice and filtering it. Having the roots in different columns could complicate things a bit.
I think I would prefer the same semicolon-separated format that's used to report FPs.
I'm thinking the generation of the nmp_merged files can be left out for the error checking option on the site update program. Opinions?
I have no use for, and would not miss them. I always check & edit NMPs manually.
I expect we'd run into some trouble trying to generate graphs when a small subset of the data is loaded.
Indeed. When I run siteupdate.py with only usaor & usari in systems.csv, I get:
[10.4] Creating system data graphs.
Traceback (most recent call last):
File "./siteupdate.py", line 3071, in
print(h.systemname + ' ', end="",flush=True)
AttributeError: 'NoneType' object has no attribute 'systemname'
because
# We will create graph data and a graph file for only a few interesting# systems, as many are not useful on their ownforhnamein ['usai', 'usaus', 'cantch', 'eure']: # no usaor or usari hereh=Noneforhsinhighway_systems: # only usaor & usari hereifhs.systemname==hname: # thus systemname never equals hnameh=hs# thus this never happensbreakprint(h.systemname+' ', end="",flush=True) # h still == None
...Maybe something like?:
# We will create graph data and a graph file for only a few interesting# systems, as many are not useful on their ownhnames= ['usai', 'usaus', 'cantch', 'eure']
forhinhighway_systems:
ifh.systemnameinhnames:
print(h.systemname+' ', end="",flush=True)
# et cetera
Does this look right; would it work? I only "learned" Python 4 days ago... :)
"The git pull makes sure you have the latest version of the site update program from the DataProcessing repository, and sh datacheck.sh does the real work."
git pull also automatically updates UserData repository and my HighwayData! Please add it.
datacheck.sh runs well! It's very simple to be executed 🥇 👍
I have some minor issues and requirements:
1. Progress bar
The program sometimes seems to stuck. It would be great to get a progress bar for all steps which can take longer than 3 or 5 seconds. Especially duplicate check at the beginning:
Checking for duplicate list names in routes, roots in routes and connected routes (103s)
Performing data checks (22s)
Marking datacheck fps (33s)
Computing stats (29s)
2. I think there's an output issue:
Augmenting travelers for detected concurrent segments seems to stuck but the final output shows that it stuck with Computing stats.
Line2611: print(et.et() + "Computing stats.")
--> print(et.et() + "Computing stats.",end="",flush=True)
?
3. Output at the end Computing waypoint colocation stats, reporting all with 8 or more colocations
Is this really important here? I think it's too much (useless) data and should be omit. The final line should be something like: Data check done! Congrats!
4. File download
I still don't know how to download the log files. Is there a (simple) way?
More on all of this a bit later, but a quick answer to 4 above. If you want to get familiar with a few more unix commands, you can view them right there on the server. But most likely, you want to install WinSCP, then use it to browse your files on the server. Connect with the same host name, login credentials and port number as you use with PuTTY, but now you will be presented with two panes of files. Your computer on one side, files on noreaster on the other. You can either download or click on remote files to bring them up in a simple editor. I'll update the instructions with this soon.
Activity
jteresco commentedon May 20, 2018
This should read the updates.csv and systemupdates.csv and should generate a datacheck log file or other messages that can be used to find datacheck problems.
michihdeu commentedon May 20, 2018
More requirements:
That means, one must be able to download the file.
yakra commentedon May 20, 2018
Having the log file available to inspect immediately would be useful. I found myself wishing for this a couple times.
http://tm.teresco.org/forum/index.php?topic=325
unmatchedfps.logandunprocessedwpts.logare produced by the full siteupdate.py, and stored insiteupdate/python-teresco. This functionality could be preserved in a "siteupdate-lite" program, possibly with a commandline switch to disable if it would result in significant time savings.I'm more lukewarm on this personally. I think we'd be better off just running the full siteupdate.py here. The process can be sped up by editing systems.csv to only include the systems that would be relevant for such a graph. (E.G., for deu-rp, include only deua, deub, deurpl, & eure.)
We'd just have to be sure to include at least one active and at least one preview system (#16).
michihdeu commentedon May 20, 2018
From the last update:
[231.8] Performing data checks.
[247.2] Marking datacheck false positives.
[269.0] Writing log of unmatched datacheck FP entries.
[269.0] Creating route hash table for list processing:
37 seconds. Should be an option, e.g. "-d" to include it
michihdeu commentedon May 20, 2018
I also thought about this option but I don't like that we have to modify systems.csv because we must remember to undo it again. You can easily forget systems, e.g. of neighboring countries when you've synced wpts at borders. I don't think that it's clever to check data with a modified set of it.
Well, I mean, Jim wrote that he wants to disable graph generation by default. If an option remains to generate (one or all) graphs, it's fine with me.
I've mentioned it because we need an option to download the graph files.
jteresco commentedon May 20, 2018
My plan is to have the same information that's in the DB to populate the datacheck page, but produced in a plain text format useful to find the errors quickly.
michihdeu commentedon May 20, 2018
This!
I think it's wise to avoid redundant data.
jteresco commentedon May 20, 2018
For a modified systems.csv, there's already an option you can use to limit to your own systems if you want. If you had a deu.csv in the same location as systems.csv, you could add
-s deu.csv
to your command line and it would only process systems listed there.
I expect we'd run into some trouble trying to generate graphs when a small subset of the data is loaded.
jteresco commentedon May 20, 2018
I'm thinking the generation of the nmp_merged files can be left out for the error checking option on the site update program. Opinions?
jteresco commentedon May 20, 2018
I also think it's worth keeping in the user list file processing so points in use and unused alt label logs can be generated. That part of the process looks to take about 25 seconds on my Mac.
michihdeu commentedon May 20, 2018
Good to know the -s option but again, I don't like it for data check because the result might be falsified if you do something wrong and the check should be used to find exactly these errors.
NMP: I have no strong feeling on this. I currently pay no attention to it because of the difficult FP handling. And I forgot the details meanwhile. I wait for improvement: TravelMapping/Web#187. However, I think it's a very important data check! I partially do it manually now.
Once NMP check will be fully integrated, it will be needed here to avoid broken concurrencies on the site.
If user list file processing remains, only the subsequent things could be skipped to save time (plus graphs which were skipped last time):
[326.3] Creating per-traveler stats log entries and augmenting data structure.
[369.8] Writing traveler list logs.
[370.1] Writing stats csv files.
[370.3] SKIPPING generation of graphs.
[370.3] Writing database file TravelMapping.sql.
[382.7] Processed 292 highway systems.
jteresco commentedon May 20, 2018
Since those last ones are fairly quick, I've left them in so far.
What are preferences for datacheck.log? Include matched FPs (labeled as such), put matched FPs in a separate log file, or ignore matched FPs? Right now, I have it generating lines like these:
michihdeu commentedon May 20, 2018
It's just a log for contributors testing their latest changes. I would exclude FPs to keep it as simple as possible for contributors. Another log file for unmatched FPs.
Update instructions for new mode. #73
jteresco commentedon May 20, 2018
The first version of the highway data check mode (-e flag) is up. Most often, it will be invoked through the new datacheck.sh script. Details are on an updated version of https://github.com/TravelMapping/DataProcessing/blob/master/RUNNING.md
yakra commentedon May 21, 2018
I see via the forum that FPs are omitted.
I agree with michih that they should be excluded. Keep it simple.
I'd like to avoid this format -- I foresee pasting datacheck.log into LibreOffice and filtering it. Having the roots in different columns could complicate things a bit.
I think I would prefer the same semicolon-separated format that's used to report FPs.
I have no use for, and would not miss them. I always check & edit NMPs manually.
Indeed. When I run siteupdate.py with only usaor & usari in systems.csv, I get:
because
...Maybe something like?:
Does this look right; would it work? I only "learned" Python 4 days ago... :)
michihdeu commentedon May 21, 2018
I guess it's less a matter of Python language but more a matter of programming and data structure. Just by 2c
michihdeu commentedon May 21, 2018
"The git pull makes sure you have the latest version of the site update program from the DataProcessing repository, and sh datacheck.sh does the real work."
git pullalso automatically updates UserData repository and my HighwayData! Please add it.michihdeu commentedon May 21, 2018
datacheck.shruns well! It's very simple to be executed 🥇 👍I have some minor issues and requirements:
1. Progress bar
The program sometimes seems to stuck. It would be great to get a progress bar for all steps which can take longer than 3 or 5 seconds. Especially duplicate check at the beginning:
2. I think there's an output issue:
Augmenting travelers for detected concurrent segments seems to stuck but the final output shows that it stuck with Computing stats.
Line2611:
print(et.et() + "Computing stats.")-->
print(et.et() + "Computing stats.",end="",flush=True)?
3. Output at the end
Computing waypoint colocation stats, reporting all with 8 or more colocationsIs this really important here? I think it's too much (useless) data and should be omit. The final line should be something like:
Data check done! Congrats!4. File download
I still don't know how to download the log files. Is there a (simple) way?
jteresco commentedon May 21, 2018
More on all of this a bit later, but a quick answer to 4 above. If you want to get familiar with a few more unix commands, you can view them right there on the server. But most likely, you want to install WinSCP, then use it to browse your files on the server. Connect with the same host name, login credentials and port number as you use with PuTTY, but now you will be presented with two panes of files. Your computer on one side, files on noreaster on the other. You can either download or click on remote files to bring them up in a simple editor. I'll update the instructions with this soon.
michihdeu commentedon May 21, 2018
Exactly! The current
datacheck.logformat cannot be used to add lines todatacheckfps.csv- the only purpose of the filebtw: WinSCP works fine. Thanks!
Fix indentation mistakes related to #73 implementation.
Addressed many issues raised in #73
jteresco commentedon May 21, 2018
Almost everything above is fixed in the latest version I just pushed. Please give it a try!
jteresco commentedon May 21, 2018
I'm going to close this issue. Please open new ones for problems you find with the highway data test mode.
michihdeu commentedon May 22, 2018
Looks fine. Thanks 👍