taskcheck 1.1.0__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taskcheck-1.1.0/taskcheck.egg-info → taskcheck-1.1.2}/PKG-INFO +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/pyproject.toml +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/common.py +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/parallel.py +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/report.py +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2/taskcheck.egg-info}/PKG-INFO +1 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_common.py +19 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_parallel.py +2 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_report.py +14 -1
- {taskcheck-1.1.0 → taskcheck-1.1.2}/LICENSE +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/README.md +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/setup.cfg +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/__main__.py +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/ical.py +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck/install.py +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck.egg-info/SOURCES.txt +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck.egg-info/dependency_links.txt +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck.egg-info/entry_points.txt +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck.egg-info/requires.txt +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/taskcheck.egg-info/top_level.txt +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_ical.py +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_install.py +0 -0
- {taskcheck-1.1.0 → taskcheck-1.1.2}/tests/test_main.py +0 -0
|
@@ -535,7 +535,7 @@ def update_tasks_with_scheduling_info(task_info, verbose, taskrc):
|
|
|
535
535
|
"modify",
|
|
536
536
|
f"scheduled:{start_date}",
|
|
537
537
|
f"completion_date:{end_date}",
|
|
538
|
-
f
|
|
538
|
+
f"scheduling:{scheduling_note.strip()}",
|
|
539
539
|
],
|
|
540
540
|
stdout=subprocess.DEVNULL,
|
|
541
541
|
stderr=subprocess.DEVNULL,
|
|
@@ -304,7 +304,7 @@ def fetch_tasks(taskrc=None):
|
|
|
304
304
|
|
|
305
305
|
env = get_task_env(taskrc)
|
|
306
306
|
tasks = subprocess.run(
|
|
307
|
-
["task", "scheduling~.", "
|
|
307
|
+
["task", "scheduling~.", "+PENDING", "or", "+WAITING", "export"],
|
|
308
308
|
capture_output=True,
|
|
309
309
|
text=True,
|
|
310
310
|
env=env,
|
|
@@ -13,7 +13,8 @@ from taskcheck.common import (
|
|
|
13
13
|
get_long_range_time_map,
|
|
14
14
|
get_tasks,
|
|
15
15
|
get_calendars,
|
|
16
|
-
get_task_env
|
|
16
|
+
get_task_env,
|
|
17
|
+
mark_end_date,
|
|
17
18
|
)
|
|
18
19
|
|
|
19
20
|
|
|
@@ -34,6 +35,23 @@ class TestTimeConversions:
|
|
|
34
35
|
assert time_to_decimal(time(14, 15)) == 14.25
|
|
35
36
|
|
|
36
37
|
|
|
38
|
+
class TestTaskUpdates:
|
|
39
|
+
@patch("taskcheck.common.subprocess.run")
|
|
40
|
+
def test_mark_end_date_passes_unquoted_scheduling_value(self, mock_run):
|
|
41
|
+
mark_end_date(
|
|
42
|
+
None,
|
|
43
|
+
"2026-07-29",
|
|
44
|
+
"2026-07-28",
|
|
45
|
+
"2026-07-28 - PT1H\n2026-07-29 - PT1H",
|
|
46
|
+
1,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
command = mock_run.call_args.args[0]
|
|
50
|
+
assert command[-1] == (
|
|
51
|
+
"scheduling:2026-07-28 - PT1H\n2026-07-29 - PT1H"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
37
55
|
class TestDurationConversions:
|
|
38
56
|
def test_pdth_to_hours(self):
|
|
39
57
|
assert pdth_to_hours("P1H") == 1.0
|
|
@@ -538,4 +538,6 @@ class TestAutoAdjustUrgency:
|
|
|
538
538
|
from taskcheck.parallel import update_tasks_with_scheduling_info
|
|
539
539
|
update_tasks_with_scheduling_info(task_info, verbose=False, taskrc="/tmp/taskrc")
|
|
540
540
|
mock_run.assert_called_once()
|
|
541
|
+
command = mock_run.call_args.args[0]
|
|
542
|
+
assert command[-1] == "scheduling:2023-12-05 - PT2H"
|
|
541
543
|
assert mock_print.called
|
|
@@ -10,7 +10,8 @@ from taskcheck.report import (
|
|
|
10
10
|
generate_report,
|
|
11
11
|
get_task_emoji,
|
|
12
12
|
tostring,
|
|
13
|
-
get_unplanned_tasks
|
|
13
|
+
get_unplanned_tasks,
|
|
14
|
+
fetch_tasks,
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
|
|
@@ -130,6 +131,18 @@ class TestTaskFiltering:
|
|
|
130
131
|
mock_date.assert_called_once_with("30d", taskrc=test_taskrc)
|
|
131
132
|
|
|
132
133
|
|
|
134
|
+
class TestFetchTasks:
|
|
135
|
+
@patch('subprocess.run')
|
|
136
|
+
def test_fetch_tasks_uses_parenthesis_free_filter(self, mock_run, test_taskrc):
|
|
137
|
+
mock_run.return_value = Mock(stdout=json.dumps([]))
|
|
138
|
+
|
|
139
|
+
assert fetch_tasks(test_taskrc) == []
|
|
140
|
+
assert mock_run.call_args.args[0] == [
|
|
141
|
+
"task", "scheduling~.", "+PENDING", "or", "+WAITING", "export"
|
|
142
|
+
]
|
|
143
|
+
assert mock_run.call_args.kwargs["env"]["TASKRC"] == test_taskrc
|
|
144
|
+
|
|
145
|
+
|
|
133
146
|
class TestStringFormatting:
|
|
134
147
|
def test_tostring_boolean(self):
|
|
135
148
|
assert tostring(True) == "Yes"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|