Commit Graph

14 Commits

Author SHA1 Message Date
contrapunctus f3e78c1fde [literate] Update other `require` calls 2021-02-15 13:40:35 +05:30
contrapunctus 010b828dbc Fix lone paren; add ERT tests 2020-11-07 10:53:44 +05:30
contrapunctus 8b16cfbe1f Fix indentation of plist keyword after a plist as value; update tests 2020-11-06 14:06:26 +05:30
contrapunctus 557780afb5 plist-pp - add tests, TODO items 2020-09-08 11:05:33 +05:30
contrapunctus 7a2b491a3c key-history-populate - change signature
Move description of key-history from the docstring of
key-history-populate to that of key-history.
2020-08-29 14:14:58 +05:30
contrapunctus 8e61cff721 value-history-populate - change signature and return value; add test
Local variables have also been renamed, to describe their purpose and
not so much their type.

ht-history-prep now returns the new value of the hash table.
2020-08-29 00:37:35 +05:30
contrapunctus 872825a571 tags-history-populate - change signature, return value; add tests 2020-08-28 19:30:53 +05:30
contrapunctus ee85d171e4 Fix key history bug where only one item was being stored; add tests
1. We were using gethash on chronometrist-events rather than
   chronometrist-key-history 🤦‍♀
2. If an event has more than one key, determining the value of
   old-keys in the outer loop meant that the first key would be
   replaced by the second.

We also rename local variables so they tell us what objects they
represent, and reindent the code so it is more condensed.
2020-06-26 16:18:55 +05:30
contrapunctus 2a6829c0d3 Fix byte compiler errors; add tests for task-time-one-day 2020-05-21 01:44:11 +05:30
contrapunctus c190ced000 Replace time values with integer seconds
1. chronometrist-events->time-list -> chronometrist-events->ts-pairs,
now returns a list of ts pairs. Rewritten using cl-loop.
2. chronometrist-time-list->sum-of-intervals ->
chronometrist-ts-pairs->durations, now returns a list of durations in
integer seconds.
3. A critical bug in chronometrist-iso-timestamp->ts was discovered -
we were passing the output of encode-time (via
parse-iso8601-time-string) to (make-ts :unix ...) - the latter expects
a number, not a list.
4. Both chronometrist-task-time-one-day and
chronometrist-events->ts-pairs were checking if a task was still
ongoing. Removed the redundant checking from the former.
5. Updated docstring of chronometrist-active-time-one-day
6. chronometrist-statistics-count-average-time-spent rewritten using
cl-loop

Also, when trying to write tests, I realized that
chronometrist-events-clean has long been removed. Removed a reference
to it from the manual and a docstring.
2020-05-20 16:45:29 +05:30
contrapunctus 98627c12f6 Rename tests for renamed function iso-date->ts 2020-05-19 15:33:42 +05:30
contrapunctus fd4dc7008b Create make-ts-date
The tests for previous-week-start now pass.
2020-05-17 09:49:14 +05:30
contrapunctus bfddc66ff6 Rename chronometrist-sexp -> chronometrist-key-values
-sexp will be used for the current backend.
2020-05-14 07:32:49 +05:30
contrapunctus b3bf2bf8ed Scratch code for new s-exp format 2019-09-04 09:44:08 +05:30