GothenburgBitFactory / taskchampion

Personal task-tracking library
MIT License
70 stars 15 forks source link

Taskchampion Python bindings #385

Open illya-laifu opened 2 months ago

illya-laifu commented 2 months ago

Hello,

Really appreciate your work on taskwarrior/taskchampion!

With the release of a new way to interact with the app (via the rust library), python bindings are needed. It's a big request, so I come bearing gifts - a fork with a POC barebones attempt to connect with an existing database instance and task creation here.

It's very much a barebones POC, with two methods, to get the impression of the workload needed; right now the code lives in the py-lib directory, and can be assembled via maturin.

Here's the demo in python console as an easy test: Screenshot_20240504_160351

Guess I am volunteering to work on this?

djmitche commented 2 months ago

That's fantastic! And, I think this approach looks good: interfacing directly from Python into the taskchampion crate. The taskchampion-lib crate was a bit of a mistake (soon to be replaced with use of CXX from Taskwarrior), so I'm glad you didn't choose to use that.

A few questions toward finding a way to make progress here;

Maybe a good next step is to get something that works into a PR and get that merged, with multiple TODO's scattered about. That can include README describing the intended implementation, and indicating that it's not yet stable or ready for use. Then we can get a few more issues filed and perhaps a few people can work on separate aspects in parallel.

illya-laifu commented 2 months ago

To answer your questions:

illya-laifu commented 2 months ago

As per your suggestion, I will continue work in the forked repository, so we can possibly PR. This can be pulled into its own, separate repository later on, if need arises.

djmitche commented 2 months ago

Sounds good!

illya-laifu commented 2 months ago

Ok, I think I have the the core. I'll create PR in a bit, documenting the install/test process.

Currently implemented and tested:

Implemented but not tested:

TODO:

djmitche commented 2 months ago

This is really cool! I will try to take a look, but I've been quite busy so I invite anyone else following along to also jump in and offer feedback.

illya-laifu commented 2 months ago

Quick update on the todo items -- adding signature stub files is quite simple, just a bit tedious.

image