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

Hillsborough County Open311 test fails #826

Closed
barbeau opened this issue Dec 21, 2017 · 7 comments
Closed

Hillsborough County Open311 test fails #826

barbeau opened this issue Dec 21, 2017 · 7 comments
Assignees
Labels
Milestone

Comments

@barbeau
Copy link
Member

barbeau commented Dec 21, 2017

Summary:

If you run the unit tests, ReportProblemOpen311Test.testHillsboroughCounty() fails with:

junit.framework.AssertionFailedError
at org.onebusaway.android.io.test.ReportProblemOpen311Test.testHillsboroughCounty(ReportProblemOpen311Test.java:103)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:198)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:183)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:560)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2102)

It looks like HART changed their Open311 service types (i.e., issue categories) so now only 3 are identified as "transit-related" based on heuristic keyword matching (a word-around because SeeClickFix doesn't support explicit groups or keywords in their Open311 API). Our threshold for identifying deployments like HART where all services are transit-related is 4 (defined in ReportConstants.NUM_TRANSIT_SERVICES_THRESHOLD).

Steps to reproduce:

Run the unit tests

Expected behavior:

All tests should pass

Observed behavior:

ReportProblemOpen311Test.testHillsboroughCounty() fails

Device and Android version:

Reprod on Samsung Galaxy S8+ with Android 8.0 beta

@barbeau barbeau added the bug label Dec 21, 2017
@barbeau barbeau added this to the v2.3.x milestone Dec 21, 2017
@barbeau barbeau self-assigned this Dec 21, 2017
@barbeau
Copy link
Member Author

barbeau commented Dec 21, 2017

Best solution at this point seems to be to adapt our transit heuristics matching to include the word passenger. That brings our count of transit-related issues back up to be equal to the threshold at 4. See below for the current list of HART services (i.e., issue categories).

image

@barbeau barbeau changed the title HillsboroughCounty Open311 test fails Hillsborough County Open311 test fails Dec 21, 2017
@barbeau
Copy link
Member Author

barbeau commented Dec 21, 2017

For the record - this bug manifested in the app for HART service area with some issue categories being split into a "Transit" category, and other issues being split into an "Other" category in the issue category drop-down spinner list. Because HART has their own SeeClickFix account and controls all the issue categories, all categories should show up under the "Transit" category.

acrown-msft added a commit to acrown-msft/onebusaway-android that referenced this issue Jan 4, 2018
* Be more explicit in build variant to select

* Display the pin feed as a fragment rather than as an activity

* Fix OneBusAway#404 - Add social functionality via Embedded Social (OneBusAway#744)

The Microsoft Embedded Social SDK (which OneBusAway now links to as part of this patch) falls under the MIT license:

~~~
The MIT License (MIT)

Copyright (c) 2016 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
~~~

* Update "What's New" to prepare for release

* Bump version to prepare for release

* Fix OneBusAway#826 - Add "passenger" as transit-related heuristic for Open311 services

* Update "What's New" to include bug fixes

* Add link to Open311 implementation details description

* Display the popular and recent activity feeds as fragments rather than activities

* Replace the NavDrawer with an Up arrow in the SignIn activity

* Reorder and refactor references to the Popular Feed fragment
@barbeau
Copy link
Member Author

barbeau commented Jan 31, 2018

I'm seeing this again - looks like number of heuristic-matched transit-services for HART dipped to 3 again:

image

@barbeau barbeau reopened this Jan 31, 2018
@barbeau
Copy link
Member Author

barbeau commented Oct 16, 2018

Re-opening - this test is failing again.

@barbeau
Copy link
Member Author

barbeau commented Nov 27, 2018

Heuristic matching is a headache. Looks like HART is prefixing all of it's issues with "HART" now, so let's use that in the heuristic:

image

However, looks like the heuristic isn't picking up the arrival time record, as this test is failing too:

// There should only be one arrival times (trip) request type, because we treat that differently (show arrivals to pick from)
assertTrue(countDynamicTrip == 1);

@barbeau
Copy link
Member Author

barbeau commented Nov 27, 2018

Actually, if we use "HART" in the stop heuristic, then it won't pick up the arrival time heuristic (hence the above), so that doesn't work...

@barbeau
Copy link
Member Author

barbeau commented Nov 27, 2018

I'm just going to drop NUM_TRANSIT_SERVICES_THRESHOLD from 4 to 3. We seem to consistently have at least 3 transit-related services for Hillsborough County, and not that many for Pinellas County, so 3 still works as a threshold and likely won't generate as many false negatives when looking for all transit properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant