{ "info": { "author": "Andrew Gryaznov", "author_email": "realgrandrew@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": "Unix: |Unix Build Status| Windows: |Windows Build Status|\\ Metrics:\n|Coverage Status| |Scrutinizer Code Quality|\\ Usage: |PyPI Version|\n\n|example screencast|\n\nRationale\n=========\n\nIt's **[whatever current year]** and still most of the tasks/project\nmanagement tools lack support for any means of automated planning. This\nlibrary helps to integrate automated planner that's been available for\nover a decade, with a shot of suporting different front-ends, complex\nscheduling strategies and potentially different planners.\n\n|example logic plan|\n\nRealize your craziest time management dreams!\n\n- Current focus is on personal planning and small teams (hence no\n support for multiple resource yet)\n- No configuration is required to start\n- Utility airtable API example provided with advanced planning strategy\n (see below)\n\nOverview\n========\n\n``python_taskjuggler`` module provides python interfaces to TaskJuggler\n3 planner. It is a set of base classes that provide object abstractions\nthat TaskJuggler internally uses. The module comes with example\nimplementation of JSON project description parser.\n\nIt is still work in progress and currently supports:\n\n- generating taskjuggler project file\n- runnig the planner\n- importing task bookings\n- working with single default resource ``\"me\"``\n\n| The package comes with an example command line utility ``tjp-client``\n that provides automatic planning for\n| tasks defined as records in `airtable `__ table.\n| Working with google sheets, jira, trello, todoist, smartsheet and\n others could be implemented the same way.\n\nThe utility allows to immediately re-schedule to reflect any changes to\nthe plans that may arise due to new fixed appointments, dependencies,\npriority amendments or required efforts re-evaluation.\n\nCommand-line utility usage:\n---------------------------\n\n::\n\n $ tjp-client -a airtable -k -b -t -v \n\nPreparation\n~~~~~~~~~~~\n\n#. Create an `airtable `__ database by copying\n `this example base `__ or\n create a new database with table named \"Tasks\" with the following\n columns (**case sensitive**):\n\n::\n\n\n 1. id - the integer (number) field used as task ID. \"Auto Number\" type recommended.\n 2. summary - single line text: task summary / title\n 3. effort - integer number: task effort duration measured in hours. Default value of 1 recommended\n 4. priority - single select: field with values \"CRITICAL\", \"High\", \"Low\", \"info\"\n 5. preference - integer number: optional additional number 0-99 for higher granularity of priorities\n 6. depends - single line text: with dependencies listed as id's, like: 2,3,4\n 7. appointment - date field with time: the fixed tasks or appointments that can not be moved\n 8. deadline - date: the desired deadline value. Current strategy will use it to emphasize priority if missed.\n 9. booking - date+time: this is where output will be written to. Sort your table by this column\n\n Other columns are just ignored.\n\n You can add nice calculations to the table like time difference between deadline and calculated booking.\n\n#. Create a view called ``Work`` with all the tasks with status \"Done\"\n filtered out *(it is left as an exercize for the reader to create a\n new column and a filter for it)*\n#. Create a calendar view with ``booking`` field\n#. Add some tasks and appointments. Beware not to add impossible\n scenarios - those are not supported yet (see console output to check)\n#. Get ``API key``, ``database ID``, note your table name and view name\n should be ``Tasks`` and ``Work`` respectively\n#. Execute in terminal (change base name and key respectively):\n\n.. code:: sh\n\n $ tjp-client -a airtable -k keyAnIuVcuhhkeAkc -b appA8ZtLosVV7HGXy -t Tasks -v Work\n\n#. Enjoy the show of ``taskjuggler_python`` moving your tasks around!\n\nNow try changing priorities, adding appointments and re-scheduling the\nplan.\n\nSetup\n=====\n\nRequirements\n------------\n\n- Python 2.7+\n- TaskJuggler 3.6+\n\nInstallation\n------------\n\nInstall TaskJuggler with gem:\n\n.. code:: sh\n\n $ gem install taskjuggler\n\nInstall taskjuggler\\_python with pip:\n\n.. code:: sh\n\n $ pip install taskjuggler_python\n\nor directly from the source code:\n\n.. code:: sh\n\n $ git clone https://github.com/grandrew/taskjuggler-python.git\n $ cd taskjuggler-python\n $ python setup.py install\n\nUsage\n=====\n\nBasic usage concepts include:\n\n#. A ``Task``, referred to as ``issue`` throughout the code\n\n #. Task's ``id`` which is used to identify and map the tasks - a\n property of ``JugglerTask`` instance\n #. Task's ``effort`` measured in units set as ``UNIT`` class\n attribute of ``JugglerTaskEffort``\n #. Task's dependencies\n #. Task's ``start`` date (a.k.a. fixed appointment)\n #. Task's ``priority`` measured as interger ``0-1000`` to set\n scheduling preference. No priority is scheduled always first.\n\n#. Bookings - the taskjuggler execution result written as\n ``JugglerTask``'s property object(s)\n\nThe minimal invocation will look like:\n\n.. code:: python\n\n >>> from taskjuggler_python import juggler\n >>> jg = juggler.GenericJuggler()\n >>> t = juggler.JugglerTask()\n >>> t.set_property(juggler.JugglerTaskEffort(1)) # hours by default\n >>> jg.add_task(t)\n >>> jg.run()\n >>> t.walk(juggler.JugglerBooking)[0].decode()\n [datetime.datetime(2017, 10, 12, 13, 0, tzinfo=), datetime.datetime(2017, 10, 12, 14, 0, tzinfo=)]\n\nJSON tasks loading:\n-------------------\n\n.. code:: sh\n\n $ python\n >>> from taskjuggler_python import jsonjuggler\n >>> my_tasks = \"\"\"[\n {\n \"id\": 2,\n \"depends\": [\n 1\n ],\n \"allocate\": \"me\",\n \"effort\": 1.2\n },\n {\n \"id\": 1,\n \"effort\": 3,\n \"allocate\": \"me\",\n \"summary\": \"test\"\n }\n ]\"\"\"\n >>> jg = jsonjuggler.JsonJuggler(my_tasks)\n >>> jg.run()\n >>> jg.toJSON()\n [\n {\n \"allocate\": \"me\",\n \"booking\": \"2017-10-10T11:00:00+00:00\",\n \"depends\": [\n 1\n ],\n \"effort\": 1.2,\n \"id\": 2\n },\n {\n \"allocate\": \"me\",\n \"booking\": \"2017-10-10T08:00:00+00:00\",\n \"effort\": 3,\n \"id\": 1,\n \"summary\": \"test\"\n }\n ]\n\nPython interface usage example\n------------------------------\n\n| As an example, let's create interface to automatically schedule tasks\n that are defined as airtable records\n| using `Airtable API\n wrapper `__:\n\n| We are using the fact that airtable's API already emits nicely\n formatted JSON in ``fields`` field.\n| We only have to name the table columns with correct field names that\n `jsonjuggler `__\n example wrapper expects\n\n.. code:: python\n\n from airtable import Airtable\n from taskjuggler_python import juggler, jsonjuggler\n\n airtable = Airtable(\"appA8ZtLosVV7HGXy\", \"Tasks\", api_key=\"keyAnIuVcuhhkeAkc\")\n\n # use DictJuggler example wrapper from jsonjuggler module, directly feed what the API emits in \"fields\"\n JUGGLER = jsonjuggler.DictJuggler([x[\"fields\"] for x in airtable.get_all(view=\"Work\")])\n\n # run taskjuggler and calculate bookings\n JUGGLER.run() \n\n # walk through all tasks objects\n for t in JUGGLER.walk(juggler.JugglerTask): \n airtable.update_by_field(\"id\", t.get_id(), \n {\"booking\": t.walk(juggler.JugglerBooking)[0].decode()[0].isoformat()})\n # the last line finds first booking in this task, decodes it to datatime list and encodes to isoformat\n\n| After executing this code you should have time assigned to all of your\n tasks, none of them overlapping,\n| respecting dependencies, taking into account default time shifts,\n appointments and no overwork allowed.\n\nAdvanced booking strategies example\n-----------------------------------\n\n| Imagine that you want your older tasks to increase their percieved\n priority so that every task with\n| any priority level gets a chance to be scheduled in the foreseeable\n future:\n\n.. code:: python\n\n # recalculate JSON issue priorities based on deadlines\n\n for rec in json_issues:\n if \"priority\" in rec and \"deadline\" in rec and not rec[\"priority\"] >= 300:\n\n diff_days = (datetime.datetime.now() - dateutil.parser.parse(rec[\"deadline\"])).days\n\n if diff_days < 0: diff_days = 0 # deny lowering priority\n rec[\"priority\"] += diff_days * 3 # after 30 days priority is up by 90\n if rec[\"priority\"] >= 250: # limit maximum percieved priority\n rec[\"priority\"] = 250 # > 300 is critical in our strategy\n\nYou can find the fully working example\n`here `__.\n\nWriting your own interface\n--------------------------\n\nSee code for more examples of how to use the interfaces.\n\nTODO\n====\n\n- **documentation!!**\n\nTaskJuggler support\n-------------------\n\n- general error reporting support (capture stderr and decode id's)\n- emit warnings if e.g. unable to start appointed event due to slipped\n schedule\n- working hours, shifts\n- exporting of tjp file; generating reports, gantt charts, etc.\n- *deadline (date) - is a check that the task is not scheduled after\n this date [not in planner - this is a check and can not be enforced]*\n- task grouping\n- limits dailymax, etc.\n- fixed stat time/end time (ALAP/ASAP strats)\n\n - period for appointments\n\n- non-splittable tasks (``X = effort; limits { maximum Xh }`` ??),\n split punishing\n- extensive timezone support\n- mark tasks as done / decouple depends\n\nGeneral enhancements\n--------------------\n\n- Enable pylint with configuration that allows the check to pass\n (pylint.ini)\n- Loading scheduling results\n\n - export back to json\n\n- Make ID management transparent in the API\n- Extensive testing including safe strings checks\n- TaskJuggler task identifier full path, subtask and validation\n- Bookings and timesheets support\n- Monte-carlo simulations\n- Provide JSONEncoder and JSONDecoder interfaces for jsonjuggler module\n\n - https://stackoverflow.com/questions/3768895/how-to-make-a-class-json-serializable\n\n- Data collection, analytics and prediction (e.g. average task error)\n\n - Store bookings and do automatic progress analytics\n\n- Different backend support (e.g. OptaPlanner/Drools; rename to\n ``python-planner`` package?)\n\n - produce multivariare pareto-optimal solutions\n - export to MiniZinc / FlatZinc for generic CP solvers\n - GPU-accelerated CP solvers?\n - QCL (Quantum Computation Language) export\n\nThoughts\n--------\n\n- Use logging to predict average performance per day\n- Create a universal API middleware with human interface to help with\n life planning and performance measurements\n\n - Solve more advanded problems\n\n - like \"allocate some time during the day to low-priority tasks\n if no critical-priority task exist\"\n - or \"adjust (increase) priority of low-priority tasks according\n to their age\"\n\n.. |Unix Build Status| image:: https://img.shields.io/travis/grandrew/taskjuggler-python/master.svg\n :target: https://travis-ci.org/grandrew/taskjuggler-python\n.. |Windows Build Status| image:: https://img.shields.io/appveyor/ci/grandrew/taskjuggler-python/master.svg\n :target: https://ci.appveyor.com/project/grandrew/taskjuggler-python\n.. |Coverage Status| image:: https://img.shields.io/coveralls/grandrew/taskjuggler-python/master.svg\n :target: https://coveralls.io/r/grandrew/taskjuggler-python\n.. |Scrutinizer Code Quality| image:: https://img.shields.io/scrutinizer/g/grandrew/taskjuggler-python.svg\n :target: https://scrutinizer-ci.com/g/grandrew/taskjuggler-python/?branch=master\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/taskjuggler_python.svg\n :target: https://pypi.python.org/pypi/taskjuggler_python\n.. |example screencast| image:: assets/at_example.gif\n.. |example logic plan| image:: assets/plan_logic.png\n\n\nRevision History\n================\n\n0.0.0 (YYYY/MM/DD)\n------------------\n\n- TBD\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/grandrew/taskjuggler-python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "taskjuggler-python", "package_url": "https://pypi.org/project/taskjuggler-python/", "platform": "", "project_url": "https://pypi.org/project/taskjuggler-python/", "project_urls": { "Homepage": "https://github.com/grandrew/taskjuggler-python" }, "release_url": "https://pypi.org/project/taskjuggler-python/0.0.2/", "requires_dist": [ "icalendar (>=3.11)", "airtable-python-wrapper (>=0.8)", "python-dateutil (>=2.6)" ], "requires_python": "", "summary": "Python interfaces to TaskJuggler 3 planner", "version": "0.0.2" }, "last_serial": 3253386, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "8f3a15296154858fdd92ebfdc15afba1", "sha256": "26d4d660950da9fabff437b5c22aa02f77769a61d0ab36b3ddb9f9572ad32156" }, "downloads": -1, "filename": "taskjuggler_python-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "8f3a15296154858fdd92ebfdc15afba1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 25543, "upload_time": "2017-10-12T20:34:12", "url": "https://files.pythonhosted.org/packages/4b/ff/3f849bc37b035ffacb78d879e54ddd9ec80f33bd5657eb19d6c495ad006f/taskjuggler_python-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3afe4ab6dc16a6fac373231aae0b79d3", "sha256": "8d139663dabf18fddf56fe1a7edca5dd9ecca4cfbe6bc088840aef7dc3dea41c" }, "downloads": -1, "filename": "taskjuggler_python-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3afe4ab6dc16a6fac373231aae0b79d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25894, "upload_time": "2017-10-12T20:34:13", "url": "https://files.pythonhosted.org/packages/f0/08/75dcb4a59f7a3013dd849425e80b51f9abc82da56a7b4798ce317b3540db/taskjuggler_python-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8f3a15296154858fdd92ebfdc15afba1", "sha256": "26d4d660950da9fabff437b5c22aa02f77769a61d0ab36b3ddb9f9572ad32156" }, "downloads": -1, "filename": "taskjuggler_python-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "8f3a15296154858fdd92ebfdc15afba1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 25543, "upload_time": "2017-10-12T20:34:12", "url": "https://files.pythonhosted.org/packages/4b/ff/3f849bc37b035ffacb78d879e54ddd9ec80f33bd5657eb19d6c495ad006f/taskjuggler_python-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3afe4ab6dc16a6fac373231aae0b79d3", "sha256": "8d139663dabf18fddf56fe1a7edca5dd9ecca4cfbe6bc088840aef7dc3dea41c" }, "downloads": -1, "filename": "taskjuggler_python-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3afe4ab6dc16a6fac373231aae0b79d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25894, "upload_time": "2017-10-12T20:34:13", "url": "https://files.pythonhosted.org/packages/f0/08/75dcb4a59f7a3013dd849425e80b51f9abc82da56a7b4798ce317b3540db/taskjuggler_python-0.0.2.tar.gz" } ] }