Skip to content

Commit

Permalink
Merge remote-tracking branch 'frodrigo/master'
Browse files Browse the repository at this point in the history
* frodrigo/master:
  mapcss: regenerated after mapcss2osmose fix #725
  mapcss: fix on !:closed #725
  Merge requirements-dev-python3.txt into requirements-dev.txt
  Revert Move merge_power_substation_minor_FR to France subpart to avoid hash conflict #560
  Better 'Already up to date' support
  • Loading branch information
jocelynj committed Jan 2, 2020
2 parents 893a658 + fdeef4d commit 87b133d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ addons:
- pkg-config
- protobuf-compiler
install:
- pip install -r requirements.txt -r requirements-dev.txt -r requirements-dev-python3.txt
- pip install -r requirements.txt -r requirements-dev.txt
before_script:
# configure database
- psql -c 'CREATE USER osmose;' -U postgres
Expand Down
2 changes: 1 addition & 1 deletion mapcss/mapcss2osmose.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def to_p(t):
return ("not " if t['not'] else "") + to_p(t['predicate']) + (" in ('yes', 'true', '1')" if t['question_mark'] else "")
elif t['type'] == 'pseudo_class':
if t['pseudo_class'] in ('closed', 'closed2'):
return "nds[0] == nds[-1]"
return "nds[0] != nds[-1]" if t['not_class'] else "nds[0] == nds[-1]"
else:
raise NotImplementedError(t)
elif t['type'] == 'declaration':
Expand Down
2 changes: 1 addition & 1 deletion osmose_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ class gen(default_country):
'osmosis_highway_motorway',
'osmosis_highway_zone',
'merge_shop_FR',
'merge_power_substation_minor_FR',
], **{'addr:city-admin_level': '8,9'})

france_departement("alsace/bas_rhin", 7415, "FR-67", include=[
Expand Down Expand Up @@ -562,6 +561,7 @@ class gen(default_country):
france_local_db.analyser["merge_power_substation_FR"] = "xxx"
france_local_db.analyser["merge_power_tower_FR"] = "xxx"
france_local_db.analyser["merge_restriction_motorway_FR"] = "xxx"
france_local_db.analyser["merge_power_substation_minor_FR"] = "xxx"
france_local_db.analyser["merge_wastewater_plant_FR"] = "xxx"
france_local_db.analyser["merge_museum_FR"] = "xxx"
france_local_db.analyser["merge_radio_support_FR"] = "xxx"
Expand Down
6 changes: 3 additions & 3 deletions osmose_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ def execc(conf, logger, options, osmosis_manager):
logger.sub().sub().sub().err('got an HTTP timeout status')
else:
dt = r.text.strip()
logger.sub().sub().sub().err((u"UPDATE ERROR %s/%s : %s\n"%(country, analyser_name, dt)).encode("utf8"))
if was_on_timeout and dt == "FAIL: Already up to date":
logger.sub().sub().sub().err(u"UPDATE ERROR %s/%s : %s\n"%(country, analyser_name, dt))
if dt == "FAIL: Already up to date":
update_finished = True
else:
if not was_on_timeout:
err_code |= 4
except Exception as e:
if isinstance(e, requests.exceptions.ConnectTimeout):
Expand Down
2 changes: 1 addition & 1 deletion plugins/Josm_combinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ def way(self, data, tags, nds):
match = False
if not match:
capture_tags = {}
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_521b2098, u'water|bay|strait'), mapcss._tag_capture(capture_tags, 1, tags, u'natural')) and mapcss._tag_capture(capture_tags, 2, tags, u'water') != mapcss._value_const_capture(capture_tags, 2, u'intermittent', u'intermittent') and mapcss._tag_capture(capture_tags, 3, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 3, u'lavoir', u'lavoir') and nds[0] == nds[-1])
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'water') and not mapcss.regexp_test(mapcss._value_const_capture(capture_tags, 1, self.re_521b2098, u'water|bay|strait'), mapcss._tag_capture(capture_tags, 1, tags, u'natural')) and mapcss._tag_capture(capture_tags, 2, tags, u'water') != mapcss._value_const_capture(capture_tags, 2, u'intermittent', u'intermittent') and mapcss._tag_capture(capture_tags, 3, tags, u'amenity') != mapcss._value_const_capture(capture_tags, 3, u'lavoir', u'lavoir') and nds[0] != nds[-1])
except mapcss.RuleAbort: pass
if match:
# group:tr("missing tag")
Expand Down
4 changes: 2 additions & 2 deletions plugins/Josm_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def way(self, data, tags, nds):
except mapcss.RuleAbort: pass
if not match:
capture_tags = {}
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'tower') and nds[0] == nds[-1])
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'power') == mapcss._value_capture(capture_tags, 0, u'tower') and nds[0] != nds[-1])
except mapcss.RuleAbort: pass
if not match:
capture_tags = {}
Expand Down Expand Up @@ -641,7 +641,7 @@ def way(self, data, tags, nds):
match = False
if not match:
capture_tags = {}
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'island') and nds[0] == nds[-1])
try: match = (mapcss._tag_capture(capture_tags, 0, tags, u'place') == mapcss._value_capture(capture_tags, 0, u'island') and nds[0] != nds[-1])
except mapcss.RuleAbort: pass
if match:
# throwError:tr("Way with {0} not closed.","{0.tag}")
Expand Down
2 changes: 0 additions & 2 deletions requirements-dev-python3.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest
xmltodict
termcolor
antlr4-python3-runtime

0 comments on commit 87b133d

Please sign in to comment.