1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-20 13:58:33 +00:00
Commit graph

447 commits

Author SHA1 Message Date
David Steele f3dc108d58 Fix tests for test completion test change 2023-08-14 10:25:40 -04:00
David Steele 5d7a742095 Use todo.txt spec for id-ing completed tasks
Topydo was only identifying a task as completed if it included a
completion date (which topydo automatically adds). This affects
compatibility with other todo.txt apps, making archiving unreliable.
2023-08-14 10:14:31 -04:00
David Steele 9373bb4702 Update a test reference ics file
Tests started failing across python versions. Tests disagree on presence
or absense of a "VALUE=..." format-specifying option on a COMPLETED and
DTS-START dates.

Modified the test reference file to match test output. This does not
introduce errors to https://icalendar.org/validator.html.
2022-12-06 15:03:29 -05:00
Daniel J. Perry 7995eed4ba Add ability to remove priorities. 2022-09-30 16:07:13 -04:00
niconfus 7206d6c7ed Respect auto_creation_date when advancing recurring tasks 2021-02-06 21:24:21 -05:00
Jacek Sowiński 2c28d2196f Revert "Fix test_revert_ls test"
This reverts commit 60b0e1beb0.
2020-11-18 11:42:39 -05:00
Jacek Sowiński 423288a764 Mock arrow.now() in the tests
As discovered by @davesteele, `arrow.now()` is not freezed to UTC with
freezegun. We have to mock it so the humanized dates in tests are
calculated properly.
2020-11-18 11:41:37 -05:00
Jacek Sowiński 8f71fffba1 Revert "Fix geo test time errors in tests"
This reverts commit 715a7216b7.
2020-11-18 11:41:37 -05:00
Spencer Taylor 60c072eba0 Set default priority of tasks to 'M' level
Previously, unprioritized tasks were set below all other tasks. This
change sets unprioritized tasks directly in the middle of all task
prioritizations.
2020-10-07 22:27:25 -04:00
David Steele 0bf7b8030e Add auto_delete_whitespace config variable
Make the feature that deletes blank lines on load optional.

Defaults to true, to preserve existing behavior.
2020-10-05 21:32:14 -04:00
Kirill Smelkov 09438df104 edit: Don't move modified todo items to the end of file
Before this patch a `t edit ...` will remove todo items selected by
`...` and then do equivalent of `t add` with input from result of
editing. This works, but has the property that whenever a todo item is
edited, it is always moved till the end of todo.txt file.

This property creates noise and makes synchronization harder to implement for
some of us who uses VCS and different machines to maintain todo.txt .

-> Teach edit to preserve todo items in their places. Adjust existing
tests and add a couple more exercising cases where either new todo
items are added in the editor, or vice versa, removed in the editor.

/cc @mruwek
2020-10-05 20:45:38 -04:00
David Steele a4801840f4 Skip the ical tests if icalendar is not installed
It is listed in setup.py as an extra
2020-10-02 21:07:29 -04:00
David Steele 60b0e1beb0 Fix test_revert_ls test
It was unable to parse the mini-dates in the _handle_ls(). Replace
the dates with the full length strings in the BackupSimulator
commands.
2020-10-02 21:07:29 -04:00
David Steele 715a7216b7 Fix geo test time errors in tests
The freezetime decorator was giving a time of the previous day if
the test was run for time zones west of Greenwich.
2020-10-02 21:07:29 -04:00
David Steele bafbe2ed6b Fix escape deprecation warnings
Starting in Python 3.7, Python emits deprecation warning for normal
strings containing what it considers invalid backslash escapes. In
Python 3.9, this situation will be a syntax error. Fix the reported
instances.

ref https://lwn.net/Articles/795546/
2020-03-04 08:39:37 -05:00
Bram Schoenmakers 18056921a3 Don't treat timestamps in HH:MM format as tags
When you enter a todo item: "Call office at 09:00", the 09:00 would be
seen as a tag-value pair. Because of this, the timestamp would be
removed from the todo text: "Call office at ".

Discussed in issue #211.
2017-11-28 13:16:30 +01:00
Bram Schoenmakers 8ca31100fc Merge remote-tracking branch 'mruwek/revert-subcmds' into style-fixes 2017-08-13 11:12:22 +02:00
Jacek Sowiński bbd03ee491 Update tests for extended revert functionality 2017-07-31 22:37:46 +02:00
Bram Schoenmakers 2c321e689e Remove usage of global variable 2017-07-30 13:18:21 +02:00
Bram Schoenmakers 25228ed06f Remove unused variable 2017-07-30 12:47:32 +02:00
Bram Schoenmakers c13c9fb972 Import from own directory using the dot notation
'test' is not really a library that has to be imported
2017-07-30 12:29:04 +02:00
Bram Schoenmakers 3a52e9dc90 Sorted import statements 2017-07-30 11:34:33 +02:00
Bram Schoenmakers 751105eaac Fixed pylint errors
Among others, moved methods by turning them into (inline) functions or
static methods.
2017-07-30 11:04:51 +02:00
Bram Schoenmakers 75627f3d40 Add tests for configurable alphabet 2017-07-26 14:14:45 +02:00
Bram Schoenmakers 7513e7c26d Merge branch 'master' into config-ids 2017-07-22 22:00:16 +02:00
Bram Schoenmakers 941a8956da Make padding of IDs dependent of todo list length
When using numerical IDs, the ID width is padded to the log10 of the
todo length.

When using textual IDs, todo lists of 466 items or shorter pad to 3
characters, otherwise 4 characters.
2017-07-20 10:02:23 +02:00
Bram Schoenmakers c0e7883202 Fix test for completed items in Dot output 2017-07-20 08:44:10 +02:00
Bram Schoenmakers 8d5f43ba6b Better handling of invalid dates
The postpone subcommand would crash when postponing a todo item with an
invalid due date (e.g. due:2017-06-31).

When postponing, the due date serves as an offset. With an invalid due
date, no proper offset can be found. Instead of (silently) falling back
to today's due date, show an error instead.

Moreover, invalid creation/completion dates are also ignored.
2017-07-10 14:08:52 +02:00
Bram Schoenmakers dca02e2b7a Add %n, %N, %u and %U in the formatting for identifiers
%n: Line number
%N: Padded line number
%u: Text-based ID
%U: Padded text-based ID

Addresses issue #184.
2017-06-28 09:21:39 +02:00
Jacek Sowiński 19cca43a87 Adapt test of do and del for post_archive() 2017-02-24 15:45:40 +01:00
Bram Schoenmakers d0342c585d Apply LimitFilter after HiddenTagFilter
The LimitFilter should be performed at the very last step. Instead of
complicating ExpressionCommand and ListCommand to cough up a well
ordered set of filters, order the filters when updating the view. Each
filter is assigned an order number, where filters with a higher order
are applied later.

This fixes the output when using the ls -n flag, where the truncation
appears before the hide tag filter. This results in possibly less items
to be printed than specified (or worse: nothing is printed).
2017-02-22 09:35:53 +01:00
Bram Schoenmakers 9e13f20be1 Merge pull request #171 from mruwek/fix-config-and-format
Fix config duplicates and catch ListFormatParser errors
2017-02-21 07:30:59 +01:00
Jacek Sowiński 0759b54a6c Don't crash on duplicates in config
Use last definition of an option instead. Section duplicates are also
supported from now.

Example:

'''
[column_keymap]
a = foo
a = bar

[column_keymap]
b = foobar
'''

is equivalent of:

'''
[column_keymap]
a = bar
b = foobar
'''
2017-02-20 20:31:34 +01:00
Jacek Sowiński 8b9e3877bb Show error message when parsing of -F fails 2017-02-20 20:15:22 +01:00
Jacek Sowiński 77abb6c022 Introduce 'before' and 'after' keywords to dep ls
From now on:
`topydo dep ls before 1` gives the same output as `topydo dep ls 1 to`
and:
`topydo dep ls after 1` gives the same output as `topydo dep ls to 1`
2017-02-15 22:22:28 +01:00
Bram Schoenmakers edc11eeb28 Merge branch 'editor' 2017-02-10 15:14:04 +01:00
Bram Schoenmakers f6a38845dd Add tests for editor selection 2017-02-10 15:06:14 +01:00
Bram Schoenmakers 4570a21062 Merge pull request #158 from mruwek/multi-4all
Allow actions on multiple ids without MultiCommand
2017-02-10 08:38:16 +01:00
Jacek Sowiński ffdd292f40 Introduce new method for getting command shortname 2017-02-09 23:44:33 +01:00
Jacek Sowiński 83d1005a95 Fix backup descriptions for column UI transactions
This provides that each backup description will still inform user about
each command that was executed. When transaction of commands was
executed user will get printed list of commands separated by ';'.

Example:

Successfully reverted: append 1 FooBar; append 3 FooBar; append 6 FooBar;
2017-02-09 22:39:45 +01:00
Jacek Sowiński 8797023087 Properly check todo ID validity before transaction 2017-02-09 22:39:36 +01:00
Bram Schoenmakers 5e13411a05 Do not apply ordinal filtering when a tag appears more than once
Suppose we have the todo item:

    (C) Some item key:value1 key:value2

And then I do an ls:

    topydo ls -x key:value2

Before, this would yield an empty result, which is undesired. Therefore,
only apply ordinal tag filtering when a tag appears exactly once in the
todo item. This is a simple approach, and special operators >, >= etc
will not be applicable:

    topydo ls -x key:>value1

will no longer work. The result could be ambiguous: filter out when none of
the tags match, or only some of them?
2017-01-27 12:28:30 +01:00
Jacek Sowiński 9cd39304cb Add test for fix of FileNotFoundError 2017-01-19 15:31:37 +01:00
Bram Schoenmakers 7ba9912cb8 Add -r flag to tag subcommand to enforce relative dates
Relative dates were already interpreted for due and start tags, but you
can also enforce it for other tags by passing the -r flag to the tag
command.
2017-01-12 09:16:29 +01:00
Bram Schoenmakers e91e9cabe6 Escape special characters in HTML like labels in Dot output
Todo items with " & < or > were not properly rendered because they were
not escaped.

Thanks to Jacob Leemaster for the bug report.
2017-01-10 13:01:42 +01:00
Bram Schoenmakers ca331b824c Add some corner cases for groups 2016-12-15 13:04:34 +01:00
Bram Schoenmakers eac37bab39 Add tests for groups 2016-12-06 13:14:34 +01:00
Bram Schoenmakers 6a474492a3 Sort case insensitively on todo texts 2016-11-24 20:47:44 +01:00
Bram Schoenmakers b3d43d19a2 Add tests for 'dep dot' 2016-11-24 13:28:53 +01:00
Bram Schoenmakers 1684f33bb6 Add tests for focus and marked background colors 2016-11-24 08:34:09 +01:00