New interval-database interface

3 views
Skip to first unread message

Thomas Lauf

unread,
Nov 3, 2017, 8:23:38 AM11/3/17
to taskwar...@googlegroups.com
Hello all!

I have a feature branch on a personal fork for TimeWarrior
(https://git.tasktools.org/Lauf.Thomas/timew-lauft/src/feature/IntervalSynthesizer)
I'd like to present: It is an attempt to restructure the database
interfaces, to provide better encapsulation and (unit-)testability of
the code.

Key element is the interface `IntervalProvider` which is currently
implemented by both `LegacyDatabaseWrapper` and `IntervalSynthesizer`.

The `LegacyDatabseWrapper` wraps the current `Database` to be used in
the new construct.

The `IntervalSynthesizer` wraps around a `IntervalProvider` and takes
care of exclusions, i.e. it checks whether exclusions can be applied,
calculates and corrects for id-offsets, flattens intervals,...

Along with this I added googletest as a submodule so I can use
googlemock for proper unit-testing of the `IntervalProvider`.

As a PoC I integrated the new concept into the Start command. So
far the test results are the same as with the current version 1.1.0.

There is still work to do, but I see it as a good start. However, as it
is a big change in timewarriors core I am open for feedback.

Regards
Thomas






signature.asc
Reply all
Reply to author
Forward
0 new messages