{ "info": { "author": "Ben Mather", "author_email": "bwhmather@bwhmather.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========\nPython DUG\n==========\n\n|build-status| |coverage|\n\nA python memoisation framework.\n\nUnlike other well known examples, uses run time tracing instead of parsing or meta-evaluation to build up a directed acyclic graph of function dependencies.\n\nUnloading values from the cache must be done explicitly but is made easier by support for nested cache contexts.\n\nDug supports manually changing the return value of tracked functions for certain parameters.\n\nDug stands for directed un-cyclic graph. I know un-cyclic isn't a real word.\n\nInstallation\n============\n\nDug can be installed from pypi\n\n\nGetting started\n===============\n\n\n\n\n\nComponents\n==========\nCache:\n - Created on entering a context\n - Populated with tweaks from the owning context\n - No support for rebuilding on top of a parent cache, must be recreated from tweaks stored in the context.\n - Should not forward changes on to parent cache. Nodes in parent cache that have different values from what they would in the child cache should be marked as masked.\n\n \nIdentifying nodes\n=================\n\nNode identifiers must be serializable.\nIt probably makes sense for node identifiers to just hold a reference to the function and rely on pickle or whatever to deal with the wire format.\n\n\nStacked contexts, tweaking, and cache invalidation\n--------------------------------------------------\n\nThe rules:\nTweaked nodes are masked.\nNodes depending on masked nodes are also masked.\nNodes marked as masked should not be fetched from the parent context.\nThe results of nodes marked as masked should be stored in the current context's cache.\nNodes can be marked as masked and stored in the cache.\nNodes can be marked as masked and not stored in the cache.\n\n\nTweaking a node:\n\nWhen tweaking a node it is necessary to mark all of its descendants as masked.\nThis can be done recursively.\nOn encountering a node that is already marked as masked, it can be assumed that all of its descendants are also marked as masked. This means that it is not necessary to recurse past it.\n\n\nRe-entering a context:\n\nIt is possible that on re-entering a context, the parent context will have changed. It will probably always be necessary to re-tweak all nodes in the context.\n\nSome part of the cache will have to be invalidated to account for changes in the new parent.\nIt might be possible to invalidate only the parts marked masked in the parent context.\nIt might make sense to always clear the cache on exiting the context no matter what. This would allow contexts to be used as a way to avoid excessive caching.\n\n\nGarbage collection\n==================\n\nIt has been suggested that garbage collection is probably not actually necessary. Instead rely on discarding contexts to get granular control over what stuff to keep.\n\n\n\nQuestions\n=========\n\n - Is there a way to split tweaking from caching?\n\n\n.. |build-status| image:: https://travis-ci.org/bwhmather/python-dug.png?branch=develop\n :target: https://travis-ci.org/bwhmather/python-dug\n :alt: Build Status\n.. |coverage| image:: https://coveralls.io/repos/bwhmather/python-dug/badge.png?branch=develop\n :target: https://coveralls.io/r/bwhmather/python-dug?branch=develop\n :alt: Coverage\n.. _warner/python-dug: https://github.com/warner/python-dug\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/bwhmather/python-dug", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "dug", "package_url": "https://pypi.org/project/dug/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dug/", "project_urls": { "Homepage": "https://github.com/bwhmather/python-dug" }, "release_url": "https://pypi.org/project/dug/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A python memoisation framework", "version": "0.1.0" }, "last_serial": 2124385, "releases": { "0.0.1": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "d721724014c4fd185dea611b904429e6", "sha256": "1446438f5ac8dde1cc40b56420c57548dc620a2547ed8a44eb606a61456d7b4c" }, "downloads": -1, "filename": "dug-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d721724014c4fd185dea611b904429e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4895, "upload_time": "2016-05-19T21:35:48", "url": "https://files.pythonhosted.org/packages/bf/dd/edafeed7429eebd7e45b87465be90b027715f426319195a5b86c9a907a51/dug-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d721724014c4fd185dea611b904429e6", "sha256": "1446438f5ac8dde1cc40b56420c57548dc620a2547ed8a44eb606a61456d7b4c" }, "downloads": -1, "filename": "dug-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d721724014c4fd185dea611b904429e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4895, "upload_time": "2016-05-19T21:35:48", "url": "https://files.pythonhosted.org/packages/bf/dd/edafeed7429eebd7e45b87465be90b027715f426319195a5b86c9a907a51/dug-0.1.0.tar.gz" } ] }