-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
resurveying opening hours #1676
Conversation
date.isWeekDayOffsetPositive is default even in cases with no offset at all
I suspect that it is not intentional, but I want to check. Why For example rules about Monday, Monday, Tuesday will be merged by this function. Rules about Monday, Tuesday, Monday will not be merged by this function and may be partially merged in the next step (if time is not overlapping). see matkoniecz@d6f6151 for some tests documenting this behavior I plan to switch it to always merging rule in this step, if I ask as OH have plenty of weird behavior, code had some parts that seemed to be unneeded complications and turned out to be necessary. I finally had time today to do some SC coding and nearly eliminated I started going through and removing also I plan to keep It would allow to keep one depth of function within an object, ending with |
Because the opening hours should be WYSISWG. If the user explicitly did not add them below each other, he will have had a reason for that and thus probably not want that the rules are optimized in the background. The reason could be that this is how the opening hours are written on the sign. Especially looking at resurveying these opening hours, it is easier if the opening hours are organized in the app like on the sign. Note that the opening hours adapter omits the weekdays from displaying for every row with same weekdays except the first. |
I don't understand this decision right now, but maybe later when I see the big picture. |
new tag builder is confirmed to work like the old one
could you document:
|
Just some comment on this: |
So I will take this over in frame of the microgrant |
FYI I am currently working on it, but cherry-picked some changes of yours into an own branch because it was not clear what was already done and what not (many |
Would you be available to review my implementation then? There is a lot of complexity while I want to reduce the likelihood of mistakes as much as possible. |
Yes, I would be happy to do this! Especially as I really want to see it finally implemented. |
Wonderful, I will post the first part later today. Teaser, I wrote a script which checks how many % of opening hours strings are supported. This is the output (for
You don't happen to have a list of all opening hours of the world? |
https://taginfo.openstreetmap.org/keys/opening_hours#values used to create matkoniecz@7245406 with list in https://raw.githubusercontent.com/matkoniecz/Zazolc/7245406f9538c9a880a0b8805df348f347f21baa/app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/all_oh_values.txt (though it is without popularity info) |
This is obsolete now, new PR #2045 |
see #1676 (comment) for things requiring fixes
fixes #1651, fixes part of #1112
It is a quite big PR, pulling in a new parsing dependency, quite complex checker of a parsed object whatever it fits SC requirements and the first resurvey quest.
Icon is the same as for AddOpeningHours, at least for now. I though whatever and how to distinguish icons for resurvey quests from normal quests. I think that exactly the same icon for the normal quest and a resurvey quest should be OK. I am unsure how to handle disabling/enabling resurvey quests.
This one is added like any other quest, I would leave potential changing this for a future. Enable/disable silently following normal quest, making impossible to disable resurvey quests? Have them on the list of quest types as a separate entry like this one? Have a global setting „disable resurvey quests?”)
Note that opening hours may be reformatted, without changing structure. I think that it is OK, example changes are documented as tests. Reformatting would apply on user solving quest.
For example
Tu-Su 10:30 - 18:00
toTu-Su 10:30-18:00
. OrTu-Su 10:30-28:00
toTu-Su 10:30-04:00
. OrMo 9-19
toMo 9:00-19:00
.I think that it would be a good idea to start the code review from looking through tests added in this PR. Some decisions, like handling of cosmetic changes, are kind of subjective and maybe a different decision should be taken.
There are some opening hours displayable with SC (like ones with an open end) that are not handled for now to reduce complexity of this PR. It should be fairly easy to add them in the future as a separate PRs.
My work on this pull request and UX testing was sponsored by a NGI Zero Discovery grant