Closed shankari closed 1 year ago
Pulled data for the partner; they do not have any composite trips. Checked the database, there are only 20 composite trips
>>> edb.get_analysis_timeseries_db().count_documents({"metadata.key": "analysis/composite_trip"})
20
Checking the logs...
ok so this is because all the confirmed trip recreation has been failing with the error
Error while creating composite objects, timestamp is unchanged
Traceback (most recent call last):
File "/Users/kshankar/e-mission/gis_branch_tests/emission/analysis/plotting/composite_trip_creation.py", line 139, in create_composite_objects
last_done_ts = create_composite_trip(ts, t)
File "/Users/kshankar/e-mission/gis_branch_tests/emission/analysis/plotting/composite_trip_creation.py", line 36, in create_composite_trip
elif "additions" in ct["data"] and ["trip_addition"] in ct["data"]:
TypeError: unhashable type: 'list'
not sure how this has even been working after the updated UI. They should not even be seeing any trips. Are they even seeing any trips?
Ah, the trips show up in the diary. Not sure we have tested diary code after all the survey/label changes since we are currently focusing on the label screen. Should check to confirm that they are only using the label screen.
The fix for this is simple enough - we just need to change to
elif "additions" in ct["data"] and "trip_addition" in ct["data"]:
But before we "pull the trigger", let's make sure that we do in fact have intermediate style trips.
So we supposedly have 133 of these
>>> edb.get_analysis_timeseries_db().count_documents({"metadata.key": "analysis/confirmed_trip", "data.additions": {"$exists": True}, "data.trip_addition": {"$exists": True}})
133
The one that failed was
{'_id': ObjectId('641e110681ae368818a4994a'),
which is the first of these intermediate style trips. The last is from May 3rd, which is consistent with:
Looking at different types of confirmed trips:
Ok so all that makes sense. The composite trip migration worked for old-style programs (e.g. masscec) and will not be needed for new-style programs (e.g. vail). This only affects intermediate-style programs, which should only be UPRM NICR and smart commute.
After moving past that issue, I ran into another issue that I noticed with my own trips. I have asked my family and they indicated that this wasn't happening for their trips, which is why I was planning to wait to investigate it.
For me, and for this test user, but apparently not for the rest of my family, the yellow trips don't show up in the label screen but they do show up in the diary screen for the same trips.
@JGreenlee, can you take a look?
Thu May 11 trips in the diary have yellow labels | Thu May 11 trips in the label screen do not have yellow labels |
---|---|
Reopen to test and fix the label display in the UI
As long as I have worked on OpenPATH, I have never seen yellow buttons on the label screen. I didn't know we were expecting to.
I believed this was one of the features from the diary screen that was not yet implemented on the label screen.
Since my current task is unifying the two screens anyway, I will take a look and see if I can get the yellow labels to show.
As long as I have worked on OpenPATH, I have never seen yellow buttons on the label screen. I didn't know we were expecting to.
The yellow labels were originally only on the label screen. Its only after I converted the buttons into a directive that they were available on the diary screen. But of course, that was before you joined the project, so you were missing that context....
https://github.com/e-mission/e-mission-phone/pull/972 fixes the discrepancy between diary and label screens.
Report from a partner