Code Monkey home page Code Monkey logo

taskchampion's Introduction

TaskChampion

TaskChampion implements the task storage and synchronization behind Taskwarrior. It includes an implementation with Rust and C APIs, allowing any application to maintain and manipulate its own replica. It also includes a specification for tasks and how they are synchronized, inviting alternative implementations of replicas or task servers.

See the documentation for more!

Structure

There are two crates here:

  • taskchampion - the core of the tool
  • xtask (private) - implementation of the cargo xtask msrv command

Rust API

The Rust API, as defined in the docs, supports simple creation and manipulation of replicas and the tasks they contain.

The Rust API follows semantic versioning. As this is still in the 0.x phase, so breaking changes may occur but will be indicated with a change to the minor version.

taskchampion's People

Contributors

pbeckingham avatar djmitche avatar tbabej avatar unode avatar dependabot[bot] avatar recollir avatar wbsch avatar jschlatow avatar dbr avatar mrossinek avatar rudis avatar elliot-forty-two avatar neheb avatar nocejo avatar danielshahaf avatar ryneeverett avatar tinloaf avatar danielmowitz avatar pjf avatar quantumbjump avatar gahr avatar savchenko avatar doronbehar avatar gravityvi avatar dathanb avatar ddeimeke avatar jwilk avatar smemsh avatar mathstuf avatar kraai avatar

Stargazers

Nicolas Marshall avatar  avatar Kevin James O'Dea avatar Verneri Åberg avatar Sreedev Kodichath avatar  avatar BenTriByte avatar Jose R. avatar Mohamed Laradji avatar Izel Nakri | izelnakri.eth avatar Dani Hodovic avatar srestegosaurio avatar TornaxO7 avatar Gabe Meikle avatar Ján Bočínec avatar ohmycloud avatar A.s. avatar Zappone Federico avatar Kyle L. Davis avatar  avatar Isaac Wyatt avatar Ismael C avatar Juri Hahn avatar  avatar David Grajal avatar Vadim Velicodnii avatar Dave Poltorak avatar Missu avatar Mapalo  Mwape Chibwe avatar  avatar Pavel Atanasov avatar Bruno Bigras avatar Miguel Duarte avatar Nishant Andoriya avatar Brady Trainor avatar Smiles Davis avatar  avatar Andrew Sutherland avatar Jiří Altman avatar Tomáš Janoušek avatar Kieran Coldron avatar Zhao Xiaohong avatar (◕ᴥ◕) avatar Quack Quack avatar  avatar Diego Asterio de Zaballa avatar Pablo Baeyens avatar Franz Maikäfer avatar Vladimir Rusinov avatar  avatar Kangwook Lee (이강욱) avatar Arty Stable avatar  avatar  avatar Christian Röder avatar Brian Wisti avatar Arne  Christian Beer avatar Robert Yi avatar Joshua Pritikin avatar Brian Hulette avatar ngortheone avatar  avatar Andrejus Kostarevas avatar Simon Fraser avatar Cal Bryant avatar ellis avatar Mebus avatar  avatar Mivort avatar

Watchers

 avatar Lucian avatar Don Harper avatar Vladimir Rusinov avatar James Cloos avatar Dave Poltorak avatar Izel Nakri | izelnakri.eth avatar David J Patrick avatar  avatar  avatar  avatar Irina Rapoport avatar  avatar Mapalo  Mwape Chibwe avatar manu avatar

taskchampion's Issues

Getting started guide

A quick walkthrough of adding a task, listing, starting, finishing, modifying, syncing.

Allow short numbers for tasks

Instead of always requiring a uuid, allow small numbers, similar to how taskwarrior does it.

I think this is already partially implemented with the "working set" concept.

remove taskwarrior-compatibility work

I spent some time working on a TDB2 implementation and trying to port the TW command-line parser (uncovering some fun bugs in the process). I don't think we should keep that! I'll move it to a branch and put that in a closed PR, just to keep a pointer to it.

Publicize this effort

Once there's an MVP for this project, we'll want to get people in to start using it and start hacking on it. That means talking about it in public.

  • Blog post highlighting it
  • Posts on Reddit?
  • Posts on Twitter?
  • Posts on Hackernews?
  • Posts on .. whatever?

I can do the blog post, but I'm not a big participant in the social corners of software engineering, and I'm not on any of the social apps listed above. So I will need some help here!

Use hawk to sign requests to the server

Hawk is a holder-of-key authorization system that signs requests. Canonical implementation is https://github.com/mozilla/hawk and there is a rust implementation as well.

Disclaimer: I didn't write Hawk, but as a major user of the protocol at work have kind of inherited its maintenance. It's well-suited to this purpose and I'm pretty familiar with it, so I think it's a good choice here.

Another alternative would be API keys, but as those don't sign requests or payloads I consider them a little less reliable.

Automatically run `task gc` after sync

Sync can potentially change the set of pending tasks, so it should update the working set. It's also the point where we know the replica's data is backed up, so it seems like a good time for garbage collection.

Refactor working set API in Replica

In most cases, we want to either list tasks annotated with their working set ID, or get a single task by its working set ID. Let's refactor a bit.

At least, let's use usize for indexes.

Implement snapshot requests

As described in the development docs: server requests a snapshot from the client, client produces one

Progress

  • server side
  • client side
  • include all of this in integration tests

Implement 'done' and 'delete' commands

These should stop the task and change its status. Depends on #7.

While I'm at it, I'll remove the delete_task method from Replica -- deletion should be handled through the as-yet un-implemented expiration process.

Set up release process, release 0.2

  • Written process for making a release, what to upload to GH, what to Crates.io, etc.
  • Push book to a github pages account
  • Distribute the version number from top-level Cargo.toml to each crate using build.rs

Switch from clap to a nom-based command-line parser

The TaskWarrior CLI is pretty expressive, in a non-traditional way:

# multi-word inputs:
task add this is my new task
# some commands take a task prefix, that can be either an id or a partial uuid
task 1 info
task b41508f5-e713-478f-927d-110715d65947 info
task b41508f5 info
# tags have a + prefix, and can either filter or specify
task +next list
task 1 modify +next

The clap library is not built for that sort of thing. It's also not terribly friendly about distributing the syntax for subcommands over lots of modules.

Let's build a better solution that uses an actual parsing library that can express the similarities and differences between subcommands without too much redundancy.

assign types to properties in Replica

  • db / operation model is just k/v, but formatted names can be used for
    structure:
    • dependencies: dependency.<uuid> = ""
    • annotations: annotation.<epoch time> = "annotation"
    • tags: tags.<tag> = ""

Implement synthetic tags

TaskWarrior has a bunch of synthetic tags like +WAITING and +PENDING. We could do the same thing pretty easily. They should be synthesized entirely within the replica, rather than stored in the task DB.

Build a RemoteServer class.

This will be a peer to LocalServer that interfaces with the remote web server defined in #56.

This might be a good time to add taskchampion::sync that can handle the intermediate signing bits instead of putting those in TaskDB.

Implement backups of the server

In this design, the server is little more than an authenticated storage for encrypted blobs provided by the client. To allow for failure or data loss on the server, clients are expected to cache these blobs locally for a short time (a week), along with a server-provided HMAC signature. When data loss is detected -- such as when a client expects the server to have a version N or higher, and the server only has N-1, the client can send those blobs to the server. The server can validate the HMAC and, if successful, add the blobs to its datastore.

(updated to include the proposal directly, instead of via a link)

Design reliable expiration

The sync model is such that there's a point in the list of operations that is committed. That can be used to determine when to delete an expired task -- basically, when an op after its expiration time has been committed.

That might need to be recorded as an operation? Needs a bit more thought.

Support reading config from parent directories

(from #11)

Sort of like git will find a .git directory by going upward toward the fs root, let's look for .taskchampion.yml files up the directory hierarchy, and apply them in reverse order.

This will let folks apply defaults to specific subdirectories, e.g., if I'm in ~/my-novel then the default report might just show tasks tagged with +novel.

make a sync server framework

This should be similar to taskchampion::taskstorage, but specialized to store the data expected of a server as described in #34.

Aside from various management methods, this should have an add_version method that satisfies the necessary atomicity guarantees.

The intent is that the server should be able to store data in a variety of backends.

Restructure into a monorepo of crates

Something like

  • taskchampion-replica -- task storage, taskdb, and client-side sync mechanics
  • taskchampion-sync-server -- the sync server
  • taskchampion-cli -- the command-line tool

Add sync configuration

One point here is that a lot of operations depend on sync, especially expiration. So we'll need to find a way to make a standalone instance "sync" with itself anyway. That might also serve as a good, if local, backup. This is something to think about in the design, but not necessarily implement just yet.

Support a `task info` command

..defaulting to it when given a task number or uuid.

It should show all fields of the task, not just those in the columnar report.

Fix error handling

There's a lot of unwrap() and panic! going on, emulating the unsafe bits of the Taskwarrior code. Let's do that the right way.

Implement client-side encryption

The first pass on a client-server protocol can just use cleartext, but the real thing should use encryption on the client side, so that the data is not readable on the server.

Add a get_working_set_uuid function

Add this to TaskStorage and to TaskDB.

Currently, Replica must fetch the full working set on every operation. At least some storage backends can probably do better.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.