Skip to content
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

Only ask about vegan and vegetarian diet for pubs serving food, not all pubs #3099

Merged
merged 3 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ class AddVegan : OsmFilterQuestType<DietAvailability>() {
override val elementFilter = """
nodes, ways with
(
amenity ~ restaurant|cafe|fast_food|pub and diet:vegetarian ~ yes|only
or amenity = ice_cream
amenity = ice_cream
or diet:vegetarian ~ yes|only and
(
amenity ~ restaurant|cafe|fast_food
or amenity = pub and food != no
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be food=yes, not food != no. Otherwise this is also asked if food is missing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would food and food != no work? There are currently 348 values which aren't no but appear to be positive/true.

Copy link
Member

@westnordost westnordost Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but are you sure that those values are/would be used on amenity=pub? Is maybe the food key also used in another context?

(food and food != no would work from technical perspective)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pizza, which looked like the most popular likely value, has four hits, when I do a query; restaurant has 7. So aren't we better off including them too? Even if they weren't used on pub now, presumably they'd show up in iD and whatever as suggestions when you used the food tag, so they might get added if they weren't present already.

)
)
and name and (
!diet:vegan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChanges
class AddVegetarian : OsmFilterQuestType<DietAvailability>() {

override val elementFilter = """
nodes, ways with amenity ~ restaurant|cafe|fast_food|pub
nodes, ways with
(
amenity ~ restaurant|cafe|fast_food
or amenity = pub and food != no
)
and name and diet:vegan != only and (
!diet:vegetarian
or diet:vegetarian != only and diet:vegetarian older today -2 years
Expand Down