Event merge from different buckets

Open
#78 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 10 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start with aw_transform/filter_period_intersect.py at the referenced union implementation and read the warning about stripping event data. Compare that behavior with the proposed aw_transform.merge_events(*all_events) entry point and determine how events from multiple buckets should retain their data. Done means the intended merge behavior is defined and verified without losing event data.

Written by the indexing model from the issue text.

Description

I'm guessing this has come up many times, so apologies for not finding related issue. The closest one is in ActivityWatch but it's not exactly that :(

I found code that does the union on events but it has a note WARNING: This function strips all data from events as it cannot keep it consistent. Do you know/remember why is that?

What I'd like to do is to have a list of events that contain all data from all buckets. Something like:

buckets = aw_client.get_buckets()
all_events = [aw_client.get_events(bucket['id']) for bucket in buckets]
merged_events = aw_transform.merge_events(*all_events)

I need this, so if there's no such functionality, I'm happy to contribute, but maybe you already have one?

Dominant language
Python
Stars
65
Forks
74
Avg merge
7d 7h
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ActivityWatch/aw-core

All issues in ActivityWatch/aw-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.