-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Survey incomplete sidewalk tagging #3821
Survey incomplete sidewalk tagging #3821
Conversation
Would be wrong anyway. That filter would always return true if e.g. only |
app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt
Outdated
Show resolved
Hide resolved
Now branched from #3735 - sidewalk surface quest Thanks for the tip, I've now done the filters here in a similar way to Runs as expected, and all tests pass. |
Something is wrong, the diff also includes changes from your other PR even though it is merged now |
It seems that's a bug in Github I've sorted it now |
app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk/SidewalkParser.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you! I find it very important though to have a test for SidewalkParser
app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk/SidewalkParser.kt
Show resolved
Hide resolved
app/src/test/java/de/westnordost/streetcomplete/quests/AddSidewalkTest.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt
Outdated
Show resolved
Hide resolved
Tests added (and fixed a couple of edge cases whilst at it). When using only one of I'm not sure if this matters, I didn't change it because it would mean adding a check for any side being |
Cool, you even found some bugs with that! The tests are really easy to read, well done!
Hmm, I think this is fair. It would be OK either way. The important part is that the app asks the user to complete the information if it is incomplete / ambiguous this way. So, whatever you think is best. |
Some places only have
sidewalk:left
orsidewalk:right
. I think this will usually imply that the other side has none, but I think it still counts as incomplete data (and would block #3735 - sidewalk surface quest).This adds a bit more complexity than I'd hoped to the sidewalk filter, I wanted to do
and !sidewalk and !sidewalk:both and !(sidewalk:left and sidewalk:right)
but the NOT operator doesn't seem to work with brackets (it complained I'd closed too many brackets).
I wasn't about to get into rewriting the filter code, and maybe this filter is more readable than the above anyway.
Tested and works as expected, and all tests pass.
(I don't think this will have merge issues with #3735 but I'm happy to sort them if it does)