Commit graph

2948 commits

Author SHA1 Message Date
Thomas Lauf
fc618636aa Prepare for release 1.4.3
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 13:04:33 +02:00
Thomas Lauf
3441b2ed93 Update example en-US holiday file
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 12:24:35 +02:00
Thomas Lauf
7dc8c910d5 Add Asciidoctor to build requirements in INSTALL
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 11:46:30 +02:00
Thomas Lauf
67ced9da56 Fix versions for C++14 support
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 23:08:17 +02:00
Thomas Lauf
2372770f6a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:50:52 +02:00
Thomas Lauf
0b74e850fb Fix pyenv setup
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:02:02 +02:00
Thomas Lauf
75d3e879d6 Fix always true comparison
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
29d3043f29 Update copyright ranges
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
379959e017 Optimize imports
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:31 +02:00
Shaun Ruffell
e170e344af test/modify: Remove a few unused variables
I left some unused varaibles in a new test functions after copy-paste.

This addresses @laufts comments on #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Shaun Ruffell
3ea086dcff Allow getTracked to match intervals that intersect with filter
It is not sufficient to stop looking for matching intervals if the
interval start time is before the filter. We really want to make sure
that we pick up any intervals that intersect with the filter.

Fixes bug introduced in (a98bd14 "Simplify getIntervalsById and
getTracked") as part of #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Thomas Lauf
d133d88247 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 22:18:42 +02:00
Thomas Lauf
0edef6eda4 Use more efficient overload with character
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
f185589f47 Remove note about tests in tarballs
- As mentioned in #380, tarballs will also contain tests so package maintainers can run them

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
63cd94b5c1 Add Asciidoctor to build requirements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
44a386ef9a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Shaun Ruffell
a98bd14d66 Simplify getIntervalsById and getTracked
The intent here is to make similar the implementations of
getIntervalsById and getTracked, since they are both gathering a
collection of intervals from the database, but they are just using a
different criteria for which ones to pull.

This also eliminates the use of std::deque.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
92697cc1ad test:opensuse1500: Update asciidoctor to 2.0.15
This also installs asciidoctor 2.0.15 explicitly so that if the latest
is changed upstream the update-alternatives line will not break.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
73970b3755 Do not delete and then re-add the latest interval when flattening Database
Eliminates extra noise in the debug output. I.e. from #422 the original
report contained:

  >> 2021-05.data: Deleted inc 20210511T161243Z # "TRACKER-6145"
  >> 2021-05.data: Added inc 20210511T161243Z # "TRACKER-6145"

Which isn't doing anything.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
bba56cc633 getIntervalsById: Only add truly synthetic intervals to synthetic vector
This fixes an error where the latest interval, a non-synthetic interval,
is added to the synthetic array (and marked synthetic) if flatten() is
otherwise not able to convert it to a group of synthetic intervals.

When modify was attempting to edit this interval, it would fail since
synthetic intervals should not be written to the database unless the
database is being flattened and timewarrior believed the interval to be
modified was synthetic.

Closes #422

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
3e5aa0d7ec Trivial: Fix indentation in getIntervalsById
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
939491d060 Dump intervals in serialization check
The Interval::dump() method will show if intervals are synthetic or not,
which can be useful when trying to determine why a comparison is
failing.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Thomas Lauf
4c8ccd99c3 Add Fedora 33 test image
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:15:30 +02:00
Thomas Lauf
29e213eefc Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:04:34 +02:00
Thomas Lauf
a2507be7ea Add assertion for interval count
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:04:20 +02:00
Shaun Ruffell
0460656afe Allow tags to be enclosed in double quotes
Closes #159

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
fd6d57dbc2 Use json::{encode|decode} for reading / writing JSON.
The JSON library in libshared has functions to esacpe JSON's special
characters, but they are not used by default.

Closes #416
Related to #261

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
2897379b14 test:summary.t: Single digit week test should use logical or
The bitwise or, `|` had higher precendence than the `>` test. Fixes the
following error:

  not ok 4 - summary.t: Summary should work with :all hint
  # FAIL: AssertionError on file test/summary.t line 213 in test_with_all_hint: 'self.assertIn("""':
  #       '
  # Wk Date       Day ID Tags    Start      End    Time   Total
  # -- ---------- --- -- ---- -------- -------- ------- -------
  # W13 2021-04-04 Sun @3 FOO  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-05 Mon @2 BAR  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-06 Tue @1 BAZ  10:00:00 11:00:00 1:00:00 1:00:00
  #
  #                                                     3:00:00
  # ' not found in '
  # Wk  Date       Day ID Tags    Start      End    Time   Total
  # --- ---------- --- -- ---- -------- -------- ------- -------
  # W13 2021-04-04 Sun @3 FOO  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-05 Mon @2 BAR  10:00:00 11:00:00 1:00:00 1:00:00
  # W14 2021-04-06 Tue @1 BAZ  10:00:00 11:00:00 1:00:00 1:00:00
  #
  #                                                      3:00:00
  #
  # '

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
d92ce2110f test: The tests depend on the documentation.
The help.t test wants to verify that some of the man pages exist.
Therefore we need to make sure the documentation is built, otherwise:

  $ git clean -ffdx .
  $ cmake -DCMAKE_BUILD_TYPE=Debug .
  $ make test

Will fail some of the help.t tests.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Thomas Lauf
c83d45bc0d Replace Travis CI badge with Github Actions badge
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-28 21:13:53 +01:00
Thomas Lauf
b189ccb020 Replace roff man pages with asciidoctor
This replaces the generation of man pages on project setup
by a on-demand generation via asciidoctor.
An exception are the man pages for the commands `day`, `month`, and `week`
which are simply redirects to the man page `timew-chart.1`. Those are now
static files in the Timewarrior repository.

A CMake find module to detect asciidoctor was added.
If asciidoctor is found, the targets `doc`, `man1`, and `man7` are created.
Those targets are also added to the default build target.

If asciidoctor is not available, the target `doc` is available, but it only
emits a message to install asciidoctor first.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-21 20:58:30 +01:00
Thomas Lauf
65ef38658b Increase minimal CMake version
Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
According to our test images all supported distributions have CMake > 3

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-12 10:50:39 +01:00
Thomas Lauf
b0e5ad6bc5 Replace Travis CI with Github Workflow
Closes #411

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-09 22:16:42 +01:00
Thomas Lauf
813754144c Remove Gentoo from test zoo
See #380. We will include the test suite in the release tarball so the Gentoo maintainers can run it and report back.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-02-07 17:16:26 +01:00
Thomas Lauf
0fb7a88159 Ensure Ubuntu 16.04 docker image compiles Timewarrior with gcc >6
- libshared now requires C++14

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-26 13:36:54 +01:00
Thomas Lauf
ab240419df Ensure CentOS 7 docker image compiles Timewarrior with gcc >6
- libshared now requires C++14

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-26 13:36:03 +01:00
Thomas Lauf
2cfeef1aa2 Update libshared to c1760be8686ce0b2f778832aaa1e2f98eed2ffc1
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-25 14:31:00 +01:00
Thomas Lauf
1a6c30b93a Fix test summary.t for single-digit weeks
If summary is called during a single digit week, the respective column is only 2 characters wide

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-25 13:49:56 +01:00
Thomas Lauf
b7882fd71f Move license URL up, so Github detects the license type correctly
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-01-22 17:53:03 +01:00
Tomas Babej
e5870380a4
doc: Update copyright to 2021 2021-01-02 02:52:39 -05:00
Tomas Babej
572c29e7dd
ChangeLog: Add entry about Unicode support 2020-12-20 15:34:28 -05:00
Tomas Babej
2babc52dc5
build: Update libshared to version supporting Unicode 11 2020-12-20 15:34:04 -05:00
Peter
c9b212ce15 Update dark_blue.theme
fixed the description
2020-11-23 12:46:39 +01:00
Shaun Ruffell
ce021a87e3 test: Thread.isAlive() -> Thread.is_alive()
Python added Thread.is_alive() in 2.6 and removed Thread.isAlive() in
3.9.

This change is needed to run the tests with Python 3.9.

https://bugs.python.org/issue37804
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-11-21 15:34:04 +01:00
Thomas Lauf
ace5cbe876 Update libshared to 9d4a44f877611484233bab42fd9e5af3ef47b26c
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-11-09 21:50:47 +01:00
Thomas Lauf
532d1b4e91 Add test for get dom.tracked.tags with a tag with quotes
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 09:20:22 +02:00
Thomas Lauf
dafca6662d Accommodate tests for missing space at end of line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 09:07:32 +02:00
Thomas Lauf
a8b4055ad5 Quote tags if needed when outputting them on one line
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 08:36:46 +02:00
Thomas Lauf
5b1deaab59 Do not overwrite interval index when parsing DOM reference
- Closes #390

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-10-02 08:36:46 +02:00
Joerg Kastning
d90eab17a0 Fixed URL for tarball download 2020-09-15 14:17:57 +02:00