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
better deal with bad OSM data for OH #3719
Conversation
fixes streetcomplete#3718 and fixes streetcomplete#2712 now old opening hours will be asked only when on objects eligible for new opening hours and for some additional limited cases when opening hours are tagged already and become old such as parks, barriers, toilets
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursTest.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.
Sticking my comment in a more useful place, I think this wants applying to CheckOpeningHoursSigned too, which could have the same issues.
https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt has far less complex filtering Not sure is such elaborate filter useful there. |
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
Overall, I am somewhat "meh" about this PR. In #3718 @Strubbl clearly stated that the opening hours quest would only be shown in error if the map data is actually wrong. So if the quest asks if the opening hours for that disused shop are still correct, the user can simply answer "doesn't exist anymore" and StreetComplete will just fix the problem by tagging the disused shop as a disused shop, removing opening hours etc. |
While I agree that in general StreetComplete is allowed to fail in case of invalid data as it is impossible to handle all possible cases of how data can be broken, I think it is fine to filter out some of such cases. And this case the change seems to be worth it. In such cases survey with SC is a pure waste of time - of SC mapper and by whoever is processing notes. As person who is really involved in processing notes - such notes are quite irritating. Technically there is some minimal benefit as it results in removal of And time of SC mapper is definitely wasted as this problem can be trivially detected automatically.
I just tested with https://www.openstreetmap.org/node/3087666570 and SC simply started opening a note rather than retag anything (which may be a separate issue) Note that this problem happens for disused shops when user has "is this shop still vacant" below opening hours or when it is disabled. So it happens only in cases when user:
I have not yet reviewed code suggestions, if basic idea of PR is rejected then polishing code makes no sense. |
Oh right, because the app first checks if the node in question is some kind of shop, and a |
But would you be acceptable to merge it (as long as ugly code issues are solved)? |
Yes, because #3719 (comment) |
Hmm, unless we treat disused shops and amenities as "some kind of shop" only for the intent of replacing a shop. Would make sense too |
|
I think it may be useful in general, maybe with some exceptions. Correctly tagged |
Yes, although the flip side of that is it's currently only showing the quest for: Line 36 in 6aa3fb1
It would be nice to also cover the leisure and other amenities from here too.
The more practical thing may be that there only seem to be 50 odd disused things tagged with opening_hours:signed: |
This comment was marked as resolved.
This comment was marked as resolved.
disused shops that re correctly tagged are useful for orientation disused shops that incorrectly tagged may be also present but - it may cause user to report issue in OSM data - SC is not supporting invalid data (like disused:shop=* used when there is no trace of shop anymore) discussed in streetcomplete#3719
…_hours/AddOpeningHours.kt
…_hours/AddOpeningHours.kt
app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt
Outdated
Show resolved
Hide resolved
…_hours/AddOpeningHours.kt Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>
it appears that noticeable amount of them is outdoors fixes streetcomplete#3734
…ngly complicated mocks
...in/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt
Outdated
Show resolved
Hide resolved
…_hours_signed/CheckOpeningHoursSigned.kt
Done, thanks! |
and (name or brand or noname = yes or name:signed = no or amenity = recycling) | ||
and ( | ||
name or brand or noname = yes or name:signed = no | ||
or amenity = recycling|toilets|bicycle_rental or leisure=park or barrier |
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.
Shouldn't we drop recycling from here too?
Also should this either be ~
, or can the one in AddOpeningHours be =
too?
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.
Good catches!
Fixed =
vs ~
in 0848d98
amenity = recycling and recycling_type = centre
should be either added to name quest or allowed to have no name in opening hours quest, not checked which would be preferable.
Or maybe in addition also removed from opening hours quest, is there distinction between recycling centres that allow walk ins and ones that are factories closed to typical people?
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.
amenity = recycling and recycling_type = centre
should be either added to name quest or allowed to have no name in opening hours quest, not checked which would be preferable.
The recycling_type = centre
bit isn't in the CheckOpeningHoursSigned code though.
I'm guessing you meant "rather than not checked"?
Or maybe in addition also removed from opening hours quest, is there distinction between recycling centres that allow walk ins and ones that are factories closed to typical people?
The recycling centres near me which allow walk/drive in from the public are normally council things which also accept waste too, would they be tagged like that not as something else? We used to call them a dump or tip, but they didn't used to recycle quite so much.
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.
The recycling_type = centre bit isn't in the CheckOpeningHoursSigned code though.
Yes, but asking for extremely rare cases where this tag was manually placed on containers is also fine
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.
https://wiki.openstreetmap.org/wiki/Tag:recycling_type%3Dcentre
a public recycling centre
So asking for opening hours is fine
fixes #3718 and fixes #2712
now old opening hours will be asked only when on objects eligible for new opening hours
and for some additional limited cases when opening hours are tagged already and become old such as parks, barriers, toilets
opening PR as I have feeling that it could be implemented in a bit better way