Skip to content

Python challenge: merge user events into sessions with deep meta merge, ordered type counts, and Dockerized tests.

Notifications You must be signed in to change notification settings

codedpro/user-event-sessions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Event Sessions

Implementation of merge_user_events(events) with sessioning, deep meta merge, and ordered type counts.

Quickstart

Local run:

python3 test_main.py

Docker:

docker build -t rayka-challenge .
docker run --rm rayka-challenge

Docker Compose:

docker compose up --build --abort-on-container-exit

Behavior

  • Events are grouped per user_id and split into sessions when adjacent events are more than 600 seconds apart.
  • types uses first-seen order with counts to preserve frequency while removing duplicates.
  • meta is deep-merged with earliest non-dict values winning conflicts.

Files

  • main.py implementation
  • test_main.py minimal tests
  • Dockerfile, docker-compose.yml, requirements.txt

About

Python challenge: merge user events into sessions with deep meta merge, ordered type counts, and Dockerized tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published