-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added schemas for raw and interval userale logs * Added polymorphic UserAleSchema and some tests * Small changes based on review --------- Co-authored-by: jlhitzeman <[email protected]> Co-authored-by: rthenhaus <rthenhaus>
- Loading branch information
1 parent
c127bc9
commit 5048552
Showing
7 changed files
with
129 additions
and
56 deletions.
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
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 |
---|---|---|
@@ -1,22 +1,27 @@ | ||
from typing import Union, List, Dict | ||
from typing import Dict, List, Union | ||
|
||
from pydantic.type_adapter import TypeAdapter | ||
from typing_extensions import TypeAliasType | ||
|
||
from distill.schemas.userale import UserAleRawSchema, UserAleIntervalSchema | ||
|
||
# TypeAliasType is necessary to avoid recursion error when validating this | ||
# type with Pydantic | ||
JSONSerializable = TypeAliasType( | ||
"JSONSerializable", | ||
Union[str, | ||
int, | ||
float, | ||
bool, | ||
None, | ||
List['JSONSerializable'], | ||
Dict[str, 'JSONSerializable'] | ||
Union[ | ||
str, | ||
int, | ||
float, | ||
bool, | ||
None, | ||
List["JSONSerializable"], | ||
Dict[str, "JSONSerializable"], | ||
], | ||
) | ||
|
||
JsonDict = Dict[str, 'JSONSerializable'] | ||
JsonDict = Dict[str, "JSONSerializable"] | ||
|
||
Timestamp = Union[str, int, float] | ||
|
||
|
||
UserAleSchema = TypeAdapter(Union[UserAleRawSchema, UserAleIntervalSchema]) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"target": "nav.navigation-bar-desktop", "path": ["nav.navigation-bar-desktop","body.body","html.no-js","#document","Window"], "pageUrl": "https://beam.apache.org/case-studies/", "pageTitle": "Case Studies", "pageReferrer": "https://beam.apache.org/", "browser": {"browser": "chrome","version": "114.0.0"}, "count": 1, "duration": 129, "startTime": 1708447014463, "endTime": 1708447014592, "type": "mouseover", "logType": "interval", "targetChange": true, "typeChange": false, "userAction": false, "userId": "MD", "toolVersion": "", "toolName": "", "useraleVersion": "2.4.0", "sessionId": "session_1708446947239", "httpSessionId": "72798a8ad776417183b1aa14e03c3132", "browserSessionId": "06b0db1ab30e8e92819ba3d4091b83bc"} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"target": "#document","path": [ "Window" ], "pageUrl": "https://github.com/apache/flagon/tree/master/docker", "pageTitle": "flagon/docker at master · apache/flagon · GitHub", "pageReferrer": "https://gov.teams.microsoft.us/", "browser": { "browser": "chrome", "version": "116.0.0" }, "clientTime": 1719530111079, "microTime": 0,"location": { "x": null, "y": null }, "scrnRes": { "width": 1349, "height":954 }, "type": "load", "logType": "raw", "userAction": true, "details": {"window": true }, "userId": "nobody", "toolVersion": null, "toolName":"test_app", "useraleVersion": "2.3.0", "sessionId":"session_1719530074303"} | ||
{"target": "#document","path": [ "Window" ], "pageUrl": "https://github.com/apache/flagon/tree/master/docker", "pageTitle": "flagon/docker at master · apache/flagon · GitHub", "pageReferrer": "https://gov.teams.microsoft.us/", "browser": { "browser": "chrome", "version": "116.0.0" }, "clientTime": 1719530111079, "microTime": 0,"location": { "x": null, "y": null }, "scrnRes": { "width": 1349, "height":954 }, "type": "load", "logType": "raw", "userAction": true, "details": {"window": true }, "userId": "nobody", "toolVersion": null, "toolName":"test_app", "useraleVersion": "2.3.0", "sessionId":"session_1719530074303", "httpSessionId": "72798a8ad776417183b1aa14e03c3132", "browserSessionId": "06b0db1ab30e8e92819ba3d4091b83bc"} |
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