-
Notifications
You must be signed in to change notification settings - Fork 0
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
[ADDED] Semantic timeline parser testing. Updated nullable
properties.
#37
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4dba706
[ADDED] Semantic timeline parser testing. Updated `nullable` properties.
hossain-khan 2d9078a
Merge branch 'main' into feat/use-semantic-timeline
hossain-khan f83cfae
[ADDED] Location data source enum
hossain-khan 51c205a
Merge branch 'feat/use-semantic-timeline' of github.com:hossain-khan/…
hossain-khan a03de47
[MINOR] Format kotlin
hossain-khan a047f0f
[ADDED] Record location source
hossain-khan e0a8889
[ADDED] 2 more enums to record location source
hossain-khan 3821b57
[FIXED] Tests
hossain-khan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ data class ActivitySegment( | |
* Example: "IN_BUS" | ||
*/ | ||
@Json(name = "activityType") | ||
val activityType: String, | ||
val activityType: String?, | ||
/** | ||
* List of all the considered candidate activity types and their probabilities. The sum of all the probabilities is always <= 100. | ||
* Example: [Activity(activityType = "IN_BUS", probability = 85.6847882270813), Activity(activityType = "WALKING", probability = 8.418431878089905)] | ||
|
@@ -66,7 +66,7 @@ data class ActivitySegment( | |
* Example: "HIGH" | ||
*/ | ||
@Json(name = "confidence") | ||
val confidence: String, | ||
val confidence: String?, | ||
@Json(name = "waypointPath") | ||
val waypointPath: WaypointPath?, | ||
/** The simplified raw path of the activity */ | ||
|
@@ -142,12 +142,12 @@ data class Location( | |
* Latitude coordinate of the location. Degrees multiplied by 10^7 and rounded to the nearest integer. | ||
* Example: 414216106 | ||
*/ | ||
@Json(name = "latitudeE7") val latitudeE7: Int, | ||
@Json(name = "latitudeE7") val latitudeE7: Int?, | ||
/** | ||
* Longitude coordinate of the location. Degrees multiplied by 10^7 and rounded to the nearest integer. | ||
* Example: 21684775 | ||
*/ | ||
@Json(name = "longitudeE7") val longitudeE7: Int, | ||
@Json(name = "longitudeE7") val longitudeE7: Int?, | ||
/** | ||
* Google Maps Place ID of the location. | ||
* Example: "ChIJk_s92NyipBIRUMnDG8Kq2Js" | ||
|
@@ -236,6 +236,13 @@ enum class SemanticType(val title: String, val description: String, val extraCol | |
"The place has been given a private label by the user.", | ||
"#03a9f4", | ||
), | ||
|
||
@Json(name = "TYPE_UNKNOWN") | ||
TYPE_UNKNOWN( | ||
"Type Unknown", | ||
"The place has not been categorized.", | ||
"#03a9f4", | ||
), | ||
Comment on lines
+240
to
+245
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to be ported back to spec. |
||
} | ||
|
||
/** | ||
|
@@ -270,43 +277,43 @@ data class PlaceVisit( | |
* Example: 414216106 | ||
*/ | ||
@Json(name = "centerLatE7") | ||
val centerLatE7: Int, | ||
val centerLatE7: Int?, | ||
/** | ||
* Longitude coordinate of the location. Degrees multiplied by 10^7 and rounded to the nearest integer, in the range -1800000000 to +1800000000 (divide value by 10^7 for the usual range -180° to +180°). | ||
* Example: 21684775 | ||
*/ | ||
@Json(name = "centerLngE7") | ||
val centerLngE7: Int, | ||
val centerLngE7: Int?, | ||
/** | ||
* Duration of the place visit | ||
* Example: Duration(startTimestamp = "2022-03-06T14:13:11.092Z", endTimestamp = "2022-03-06T15:13:11.092Z") | ||
*/ | ||
@Json(name = "duration") | ||
val duration: Duration, | ||
val duration: Duration?, | ||
/** | ||
* Categorized confidence for this place visit. One of: `LOW_CONFIDENCE`, `MEDIUM_CONFIDENCE`, `HIGH_CONFIDENCE` or `USER_CONFIRMED`. | ||
* Example: "HIGH" | ||
*/ | ||
@Json(name = "placeConfidence") | ||
val placeConfidence: String, | ||
val placeConfidence: String?, | ||
/** | ||
* Visit confidence for this place visit | ||
* Example: 95 | ||
*/ | ||
@Json(name = "visitConfidence") | ||
val visitConfidence: Int, | ||
val visitConfidence: Int?, | ||
/** | ||
* Location confidence for this place visit | ||
* Example: 71 | ||
*/ | ||
@Json(name = "locationConfidence") | ||
val locationConfidence: Int, | ||
val locationConfidence: Int?, | ||
/** | ||
* Other candidate locations for this place visit | ||
* Example: [Location(latitudeE7 = 414216106, longitudeE7 = 21684775, placeId = "ChIJk_s92NyipBIRUMnDG8Kq2Js")] | ||
*/ | ||
@Json(name = "otherCandidateLocations") | ||
val otherCandidateLocations: List<Location>, | ||
val otherCandidateLocations: List<Location> = emptyList(), | ||
/** | ||
* Child visits for this place visit | ||
* Example: [PlaceVisit(location = Location(latitudeE7 = 414216106, longitudeE7 = 21684775, placeId = "ChIJk_s92NyipBIRUMnDG8Kq2Js"), centerLatE7 = 414216106, centerLngE7 = 21684775, duration = Duration(startTimestamp = "2022-03-06T14:13:11.092Z", endTimestamp = "2022-03-06T15:13:11.092Z"), placeConfidence = "HIGH", visitConfidence = 95, locationConfidence = 71, otherCandidateLocations = [Location(latitudeE7 = 414216106, longitudeE7 = 21684775, placeId = "ChIJk_s92NyipBIRUMnDG8Kq2Js")])] | ||
|
@@ -353,7 +360,7 @@ data class PlaceVisit( | |
* Example: "SINGLE_PLACE" | ||
*/ | ||
@Json(name = "placeVisitType") | ||
val placeVisitType: String, | ||
val placeVisitType: String?, | ||
/** | ||
* Place Visit Importance for this place visit. One of `MAIN` or `TRANSITIONAL`. | ||
* Example: "MAIN" | ||
|
@@ -439,30 +446,30 @@ data class TransitPath( | |
* Example: "ChIJQVEUoLuipBIRJO37wI4yyBs" | ||
*/ | ||
@Json(name = "linePlaceId") | ||
val linePlaceId: String, | ||
val linePlaceId: String?, | ||
/** | ||
* Time information (departure and arrival times, both real and scheduled) for each transit stop used. | ||
*/ | ||
@Json(name = "stopTimesInfo") | ||
val stopTimesInfo: List<StopTimeInfo>, | ||
val stopTimesInfo: List<StopTimeInfo> = emptyList(), | ||
/** | ||
* Source of the location data of the transit path. Either `BACKFILLED` or `INFERRED`. | ||
* Example: "INFERRED" | ||
*/ | ||
@Json(name = "source") | ||
val source: String, | ||
val source: DataSource?, | ||
/** | ||
* Confidence level of the transit path data. Ranges from 0 to 1. | ||
* Example: 0.9155850640140931 | ||
*/ | ||
@Json(name = "confidence") | ||
val confidence: Double, | ||
val confidence: Double?, | ||
/** | ||
* Distance traveled with the transit path, in meters. | ||
* Example: 2341.0 | ||
*/ | ||
@Json(name = "distanceMeters") | ||
val distanceMeters: Double, | ||
val distanceMeters: Double?, | ||
) | ||
|
||
@JsonClass(generateAdapter = true) | ||
|
@@ -549,6 +556,27 @@ enum class LocationSource { | |
UNKNOWN, | ||
} | ||
|
||
/** | ||
* Represents the source of the location data of the path. | ||
* Example: "INFERRED" | ||
*/ | ||
enum class DataSource { | ||
/** | ||
* Indicates the location data of the path is backfilled. | ||
*/ | ||
BACKFILLED, | ||
|
||
/** | ||
* Indicates the location data of the path is inferred. | ||
*/ | ||
INFERRED, | ||
|
||
/** | ||
* Indicates the location data of the path is resnapped for edit. | ||
*/ | ||
RESNAPPED_FOR_EDIT, | ||
} | ||
|
||
/** | ||
* Represents the edit action metadata. | ||
*/ | ||
|
@@ -614,10 +642,10 @@ data class OriginalCandidates( | |
data class Checkin( | ||
/** The timestamp of the checkin */ | ||
@Json(name = "timestamp") | ||
val timestamp: String, | ||
val timestamp: String?, | ||
/** The place ID of the checkin */ | ||
@Json(name = "placeId") | ||
val placeId: String, | ||
val placeId: String?, | ||
) | ||
|
||
/** | ||
|
@@ -660,25 +688,25 @@ data class WaypointPath( | |
* Example: "INFERRED" | ||
*/ | ||
@Json(name = "source") | ||
val source: String, | ||
val source: DataSource?, | ||
/** | ||
* Total distance of the path, in meters. | ||
* Example: 396.34176716755843 | ||
*/ | ||
@Json(name = "distanceMeters") | ||
val distanceMeters: Double, | ||
val distanceMeters: Double?, | ||
/** | ||
* Travel mode of the path. Can be `WALK`, `DRIVE`, or `BICYCLE`. | ||
* Example: "WALK" | ||
*/ | ||
@Json(name = "travelMode") | ||
val travelMode: String, | ||
val travelMode: String?, | ||
/** | ||
* Confidence of the path. | ||
* Example: 0.7986568220419046 | ||
*/ | ||
@Json(name = "confidence") | ||
val confidence: Double, | ||
val confidence: Double?, | ||
/** | ||
* Road segments of the path. | ||
* Example: [RoadSegment(duration = "8s", placeId = "ChIJk_s92NyipBIRUMnDG8Kq2Js")] | ||
|
@@ -694,7 +722,7 @@ data class RoadSegment( | |
* Example: "8s" | ||
*/ | ||
@Json(name = "duration") | ||
val duration: String, | ||
val duration: String?, | ||
/** | ||
* Google Maps Place ID of the location. | ||
* Example: "ChIJk_s92NyipBIRUMnDG8Kq2Js" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two also needs to be added back to the spec.