[Rebuild] Status of the remaining failing tests
Andy Allan
gravitystorm at gmail.com
Fri Jun 29 16:01:38 BST 2012
Hi All,
There's two remaining tests in the test suite that are currently failing.
I'm posting this here to solicit discussion about how big a problem you
think they will be in the real world. On one hand, it's nice to have
everything working perfectly, but on the other hand it might not be worth
holding up the whole process for rare events - we can always fix small
numbers of problems later, and add extra redactions if needs be.
I've written some commentary with the two cases, as well as trying to show
the output clearly from the bot. Apologies if it's destroyed by line
wrapping. An unwrapped version is at https://gist.github.com/3018460
Cheers,
Andy
A) Test Way Name Swap
There is an edge case in deciding significance of names. In Russia, "Foo
Street" and "Street Foo" are the same, and so if a decliner adds a street
name and reversed by an agreer, the name should be removed. Currently the
bot treats "Street Foo" as a distinct name, and so keeps it.
history = [OSM::Way[[1,2,3], :id=>1, :changeset=>1, :version=>1,
"highway"=>"residental"], # created by agreer
OSM::Way[[1,2,3], :id=>1, :changeset=>3, :version=>2,
"highway"=>"residental", "name"=>"ул. Гая"], # name added by decliner
OSM::Way[[1,2,3], :id=>1, :changeset=>2, :version=>3,
"highway"=>"residental", "name"=>"Гая ул."]] # name swapped around by agreer
Expected
[Edit[obj=OSM::Way[[1, 2,
3],:element_id=>1,:changeset_id=>-1,:timestamp=>,:visible=>true,:version=>3,"highway"=>"residental"]],
Redact[klass=OSM::Way,element_id=1,version=2,mode=:hidden],
Redact[klass=OSM::Way,element_id=1,version=3,mode=:visible]],
not
[Redact[klass=OSM::Way,element_id=1,version=2,mode=:hidden]].
B) Test Way Reversed By Decliner
The geometry processing needed to figure out what state to leave a road in
(after figuring out what nodes need expunging) is complex and doesn't
handle every situation. Matt recently re-wrote it fully, and it now covers
all situations bar one. In this case, the order of the outputted nodes
isn't ideal - the "unreversing" of the way is being done to the nodes that
were in the way at the time it was reversed, ignoring the later node. Matt
reckons fixing this could involve a considerable about of work - adding a
fourth type of geometry processing to the three the bot already recognises.
history = [OSM::Way[[1,2 ], :id=>1, :changeset=>1, :version=>1,
"oneway"=>"-1"], # created by agreer
OSM::Way[[2,1 ], :id=>1, :changeset=>3, :version=>2,
"oneway"=>"yes"], # way reversed by decliner
OSM::Way[[3,2,1], :id=>1, :changeset=>2, :version=>3,
"oneway"=>"yes"]] # node added by agreer
Expected
[Edit[obj=OSM::Way[[1, 2,
3],:element_id=>1,:changeset_id=>-1,:timestamp=>,:visible=>true,:version=>3,"oneway"=>"-1"]],
Redact[klass=OSM::Way,element_id=1,version=2,mode=:hidden],
Redact[klass=OSM::Way,element_id=1,version=3,mode=:visible]],
not
[Edit[obj=OSM::Way[[3, 1,
2],:element_id=>1,:changeset_id=>-1,:timestamp=>,:visible=>true,:version=>3,"oneway"=>"-1"]],
Redact[klass=OSM::Way,element_id=1,version=2,mode=:hidden],
Redact[klass=OSM::Way,element_id=1,version=3,mode=:visible]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rebuild/attachments/20120629/8225ad23/attachment.html>
More information about the Rebuild
mailing list