Skip to main content

Schedules Todos into your Calendar

Project description

Melon Task Scheduler + UI

A CalDav Todo-List (/ Task-Scheduling) Application that uses Markov chain Monte-Carlo to optimise a task schedule. It also features a User Interface written with Qt6.

To start the GUI:

from melongui.main import main
main() # to start the GUI

which launches a User Interface such as the one depicted in Figure 1. To load todos from a remote calendar, as specified in the configuration file, and schedule them, use the following code-snippet:

from melon.melon import Melon
from melon.scheduler.rust import RustyMCMCScheduler
melon = Melon()
melon.autoInit()
melon.scheduleAllAndExport("task-schedule.ics", Scheduler=RustyMCMCScheduler)

Creation of and interaction with \texttt{Todo}s in the calendar can be simple:

from melon.melon import Melon

melon = Melon()  # loads the config and initialises
melon.autoInit()  # initiates a network connection to the server
matches = list(melon.findTask("Submit report"))
matches[0].complete()  # marks the todo as complete and syncs

calendar = melon.calendars["My Calendar"]
calendar.sync()  # fetches updates from the server
todo = calendar.createTodo("New Todo")
todo.dueDate = datetime.date.today()
todo.save()  # saves the todo to the server

In order to run the scheduler on demonstration data, please run

from melon.scheduler.rust import RustyMCMCScheduler
tasks = generateManyDemoTasks(N=80)
scheduler = RustyMCMCScheduler(tasks)
result = scheduler.schedule()

If not specified in the initialiser, Melon loads a configuration file located in the user’s home configuration directory, so on Linux ~/.config/melon/config.toml. The file uses Tom’s Obvious, Minimal Language (TOML) format and has the following contents:

[client]
url = "https://my-caldav-server.org:2023/dav/user/calendars/"
username = "user"
password = "password"

Melon is a Python package on a Markov chain Monte-Carlo (MCMC), using Metropolis-Hastings with Simulated Annealing, optimisation of task scheduling. The idea would be to automatically schedule a set of tasks into a calendar based on due date, duration estimate (perhaps dynamically updated), task priority, associated project affiliation and most importantly, location. State permutations would be generated randomly according to a probability distribution, starting from a good initial guess of ordering tasks by due date and priority.

One can then define multiple optimisation metrics, based on the number of performed tasks weighted by priority and the need to switch locations. So in some sense, reducing the need for commute to e.g. work and scheduling hybrid / on-site tasks according to that (resembling the travelling-salesman problem). One could also make that very context dependent using project affiliations or certain keywords, automating the process. All of this should be done keeping the due date in mind. Another challenge is to encode task dependencies i.e. task B requiring the completion of task A beforehand.

Coding-wise this will include the algorithm itself, appropriate configuration and furthermore, I would like to integrate the system with a CalDAV endpoint for use with my personal calendar, making it accessible through a GUI (separated from the Python interface, so that one would be able to run the algorithm without). Of course there will be tests and documentation on how to set things up, use the library on its own and how to install the GUI application. An extension would be for the scheduler to learn about task properties based on user behaviour when rescheduling, etc. (detecting procrastination of an important task) and perhaps optimising suggestions based on that.

As performance might become an issue for MCMC, we will attempt the use of low-level languages such as C++ in combination with tools such as pybind11, to outsource short performance-critical code sections away from Python to another language?

The task check icon is the logo of the \textit{Tasks.org} Free and Open Source Android App, which may be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

melon_scheduler-0.2.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

melon_scheduler-0.2.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file melon_scheduler-0.2.0.tar.gz.

File metadata

  • Download URL: melon_scheduler-0.2.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-73-generic

File hashes

Hashes for melon_scheduler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b365d699de0651991aee9b31ca93f25c9f0352d82dd8de2a520f6cd9c9bc0ac3
MD5 752b334caa809f38dd235fbc999cc9fe
BLAKE2b-256 592730d15abba23858b171901a397b16302aca86769902500ca8f82b3fddc9ee

See more details on using hashes here.

File details

Details for the file melon_scheduler-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: melon_scheduler-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-73-generic

File hashes

Hashes for melon_scheduler-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4878190094187f643407af5f3ec89be181fae02c15f99d12e3fc80769f330bc
MD5 316340b901d046838a2e9db3c407882c
BLAKE2b-256 050ea2d7145c9ee9d6ccfd6612aed29ab695ee083043749c6750520143276191

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page