In the spirit of building out the infrastructure before you add the functionality (see the previous installment), there are two new pieces of code here:
proc_add_task()
function in main.py
.AddTask
command to its handler (task_adder()
).The Pytest tests still pass, and manual testing of the application shows that it still works--though if I try to add a task with a nonempty repetition interval, I hit the NotImplementedError
and it fails. That's intended for now.
The application is getting to the size where, at least for me, I'd be getting lost if I hadn't kept things tidy enough. When I think about taking the next step, there's a part of me that thinks: "gee, I've got to figure out how to pass all that information between the coordinator, the task, the front end, and all the repositories." The prospect of loading all that into my short-term memory is intimidating. When I remember that I've got objects and repositories in place, a primitive but reasonable command dispatcher in place, and reasonable (not exhaustive!) test coverage, things seem a lot easier.
So, this is about where my projects would have started to fail, however many years ago. It sneaks up on you. We have reason to be much more optimistic here.
Here's the current commit in the veery/
repository.
Next post: Python task manager from scratch, part 44: Implementing repeating tasks