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

"Time is not optional any more: already in the proposal" #49

Closed
ypid opened this issue Aug 21, 2014 · 2 comments
Closed

"Time is not optional any more: already in the proposal" #49

ypid opened this issue Aug 21, 2014 · 2 comments
Assignees
Labels
type: bug A confirmed report of unexpected behavior.
Milestone

Comments

@ypid
Copy link
Member

ypid commented Aug 21, 2014

See: https://wiki.openstreetmap.org/wiki/Talk:Proposed_features/Time_domains#Existing_implementation

Give at least a warning if no time selector is present in a rule which evaluates to open.

@ypid ypid added this to the All problems solved. milestone Aug 21, 2014
@ypid ypid added the bug label Aug 21, 2014
@ypid ypid self-assigned this Aug 21, 2014
@ypid ypid closed this as completed in 0620e55 Aug 23, 2014
@ypid
Copy link
Member Author

ypid commented Aug 23, 2014

Increased number of warnings by one percent. I hope this improves data quality.

Before:

Parsing opening_hours (ignoring: fixme, FIXME) …
  80164/ 303249 (94.6 %, with warnings:  5.4 %), only different values:  11611/ 15000 (77.4 %) tests passed.   15000 values in  4167 ms (3599.7 n/sec).
  99545/ 303249 (95.5 %, with warnings:  4.5 %), only different values:  26474/ 30000 (88.2 %) tests passed.   30000 values in  9084 ms (3302.5 n/sec).
 151454/ 303249 (96.9 %, with warnings:  3.2 %), only different values:  41344/ 45000 (91.9 %) tests passed.   45000 values in 13041 ms (3450.7 n/sec).
 188276/ 303249 (97.4 %, with warnings:  2.8 %), only different values:  56098/ 60000 (93.5 %) tests passed.   60000 values in 17034 ms (3522.4 n/sec).
 250358/ 303249 (97.9 %, with warnings:  2.3 %), only different values:  70857/ 75000 (94.5 %) tests passed.   75000 values in 20926 ms (3584.1 n/sec).
 270340/ 303249 (97.6 %, with warnings:  2.8 %), only different values:  84598/ 90000 (94.0 %) tests passed.   90000 values in 28013 ms (3212.8 n/sec).
 291250/ 303249 (97.4 %, with warnings:  2.8 %), only different values:  98717/105000 (94.0 %) tests passed.  105000 values in 32159 ms (3265.0 n/sec).

 294724/ 303249 (97.2 %, not pretty: 21.3 %, with warnings:  2.9 %), only different values:  99929/106847 (93.5 %) tests passed.  303249 values in 32588 ms (9305.5 n/sec).

After:

Parsing opening_hours (ignoring: fixme, FIXME) …
  80137/ 303249 (94.6 %, with warnings:  6.4 %), only different values:  11585/ 15000 (77.2 %) tests passed.   15000 values in  4581 ms (3274.4 n/sec).
  99517/ 303249 (95.5 %, with warnings:  5.5 %), only different values:  26447/ 30000 (88.2 %) tests passed.   30000 values in  9575 ms (3133.2 n/sec).
 151425/ 303249 (96.9 %, with warnings:  3.8 %), only different values:  41316/ 45000 (91.8 %) tests passed.   45000 values in 13535 ms (3324.7 n/sec).
 188243/ 303249 (97.3 %, with warnings:  3.5 %), only different values:  56066/ 60000 (93.4 %) tests passed.   60000 values in 17618 ms (3405.6 n/sec).
 250325/ 303249 (97.9 %, with warnings:  3.0 %), only different values:  70825/ 75000 (94.4 %) tests passed.   75000 values in 21638 ms (3466.1 n/sec).
 270304/ 303249 (97.6 %, with warnings:  3.5 %), only different values:  84563/ 90000 (94.0 %) tests passed.   90000 values in 29143 ms (3088.2 n/sec).
 291212/ 303249 (97.4 %, with warnings:  3.6 %), only different values:  98680/105000 (94.0 %) tests passed.  105000 values in 33612 ms (3123.9 n/sec).

 294685/ 303249 (97.2 %, not pretty: 21.3 %, with warnings:  3.8 %), only different values:  99891/106847 (93.5 %) tests passed.  303249 values in 34078 ms (8898.7 n/sec).

An observant reader might notice the difference in the passing tests. This is not directly related to this check (issue #50).

@ypid
Copy link
Member Author

ypid commented Aug 29, 2014

The logic is a bit more complicated to avoid false positives. For example, if a rule only consists of 24/7 or if a rule uses a <rule_modifier> like closed or unknown (or a comment). In those cases no warning is generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed report of unexpected behavior.
Projects
None yet
Development

No branches or pull requests

1 participant