From 8a9a4b05fc87135f21264bc740aa90417ed6c036 Mon Sep 17 00:00:00 2001 From: Eric Bryant Date: Wed, 2 Jan 2019 11:58:39 -0500 Subject: [PATCH 1/3] Strip `+` from .list labels --- siteupdate/python-teresco/siteupdate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/siteupdate/python-teresco/siteupdate.py b/siteupdate/python-teresco/siteupdate.py index c8c0371e..da1697b1 100755 --- a/siteupdate/python-teresco/siteupdate.py +++ b/siteupdate/python-teresco/siteupdate.py @@ -1042,8 +1042,8 @@ def __init__(self,travelername,route_hash,path="../../../UserData/list_files"): checking_index = 0; for w in r.point_list: lower_label = w.label.lower().strip("+*") - list_label_1 = fields[2].lower().strip("*") - list_label_2 = fields[3].lower().strip("*") + list_label_1 = fields[2].lower().strip("+*") + list_label_2 = fields[3].lower().strip("+*") if list_label_1 == lower_label or list_label_2 == lower_label: canonical_waypoints.append(w) canonical_waypoint_indices.append(checking_index) From e1eddf54cf14af0ef2d64cfa2accd55fdb82363f Mon Sep 17 00:00:00 2001 From: Eric Bryant Date: Thu, 3 Jan 2019 00:52:32 -0500 Subject: [PATCH 2/3] newline fix --- siteupdate/python-teresco/siteupdate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siteupdate/python-teresco/siteupdate.py b/siteupdate/python-teresco/siteupdate.py index da1697b1..5f1626a9 100755 --- a/siteupdate/python-teresco/siteupdate.py +++ b/siteupdate/python-teresco/siteupdate.py @@ -2891,7 +2891,7 @@ def run(self): 'These graphs contain all routes currently plotted in the Travel Mapping project.']) # graphs restricted by place/area - from areagraphs.csv file - print(et.et() + "\nCreating area data graphs.", flush=True) + print("\n" + et.et() + "Creating area data graphs.", flush=True) with open(args.highwaydatapath+"/graphs/areagraphs.csv", "rt",encoding='utf-8') as file: lines = file.readlines() lines.pop(0); # ignore header line From 42e96b63949c2021d3da623ba420ebc99a7e01b8 Mon Sep 17 00:00:00 2001 From: Eric Bryant Date: Thu, 3 Jan 2019 01:19:48 -0500 Subject: [PATCH 3/3] expand LABEL_INVALID_CHAR datacheck to AltLabels --- siteupdate/python-teresco/siteupdate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/siteupdate/python-teresco/siteupdate.py b/siteupdate/python-teresco/siteupdate.py index c8c0371e..7c64f04e 100755 --- a/siteupdate/python-teresco/siteupdate.py +++ b/siteupdate/python-teresco/siteupdate.py @@ -3202,6 +3202,9 @@ def run(self): # look for labels with invalid characters if not re.fullmatch('[a-zA-Z0-9()/\+\*_\-\.]+', w.label): datacheckerrors.append(DatacheckEntry(r,[w.label],'LABEL_INVALID_CHAR')) + for a in w.alt_labels: + if not re.fullmatch('[a-zA-Z0-9()/\+\*_\-\.]+', a): + datacheckerrors.append(DatacheckEntry(r,[a],'LABEL_INVALID_CHAR')) # look for labels with a slash after an underscore if '_' in w.label and '/' in w.label and \