{ "info": { "author": "Peter Bengtsson", "author_email": "mail@peterb.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Testing" ], "description": "#####\ngorun\n#####\n\n(c) Peter Bengtsson, mail@peterbe.com, 2009-2012\nLicense: Python\n\n\nUsing (py)inotify to run commands when files change\n===================================================\n\nTired of switching console, arrow-up, Enter, switch console back for\nevery little change you make when you're writing code that has tests?\nRunning with ``gorun.py`` enables you to just save in your editor and\nthe tests are run automatically and immediately.\n\n``gorun.py`` does not use a slow pulling process which keeps taps on\nfiles modification time. Instead it uses the inotify_ which is \"a Linux kernel\nsubsystem that provides file system event notification\".\n\n.. _inotify: http://en.wikipedia.org/wiki/Inotify\n\n\nInstallation\n------------\n\nThis will only work on Linux which has the inotify module enabled in\nthe kernel. (Most modern kernels do)\n\n::\n\n pip install gorun\n\nThis will install pyinotify_.\n\n.. _pyinotify: http://trac.dbzteam.org/pyinotify\n\nThen, create a settings file, which is just a python file that is expected to\ndefine a variable called ``DIRECTORIES``. Here's an example:\n\n::\n\n DIRECTORIES = (\n ('some/place/', './myframework test --dir some/place'),\n ('some/place/unitests.py',\n './myframework test --dir some/place --testclass Unittests'),\n ('/var/log/torrentsdownload.log',\n 'growl downloads --logfile /var/log/torrentsdownload.log'),\n )\n\nSave that file as, for example, ``gorun_settings.py`` and then start it\nlike this:\n\n::\n\n $ gorun.py gorun_settings\n\nConfiguration\n-------------\n\nOnce you've set gorun to monitor a directory it will kick off on any\nfile that changes in that directory. By default things like autosave\nfiles from certain editors are automatically created (e.g. #foo.py# or\nfoo.py~) and these are ignored. If there are other file extensions you\nwant gorun to ignore add this to your settings file:\n\n::\n\n IGNORE_EXTENSIONS = ('log',)\n\nThis will add to the list of already ignored file extensions such as\n``.pyc``.\n\nSimilarly, if there are certain directories that you don't want the\ninotify to notice, you can list them like this:\n\n::\n\n IGNORE_DIRECTORIES = ('xapian_index', '.autosavefiles')\n\nDisclaimer\n----------\n\nThis code hasn't been extensively tested and relies on importing\npython modules so don't let untrusted morons fiddle with your dev\nenvironment.\n\nTodo\n----\n\nWhen doing Django development I often run on single test method over\nand over and over again till I get rid of all errors. When doing this\nI have to change the settings so it just runs one single test and when\nI'm done I go back to set it up so that it runs all tests when adjacent\ncode works.\n\nThis is a nuisance and I might try to solve that one day. If you have\nany tips please let me know.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/peterbe/python-gorun", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "gorun", "package_url": "https://pypi.org/project/gorun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gorun/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/peterbe/python-gorun" }, "release_url": "https://pypi.org/project/gorun/1.7/", "requires_dist": null, "requires_python": null, "summary": "Wrapper on pyinotify for running commands (often tests)", "version": "1.7" }, "last_serial": 792627, "releases": { "1.7": [ { "comment_text": "", "digests": { "md5": "18144234827ceea1da91484cc26b9ff4", "sha256": "ea90999d063d1d6e68c4a47c441aa470c8b8c76144e3822279755d0af3acb6ed" }, "downloads": -1, "filename": "gorun-1.7.tar.gz", "has_sig": false, "md5_digest": "18144234827ceea1da91484cc26b9ff4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5698, "upload_time": "2012-10-19T15:40:31", "url": "https://files.pythonhosted.org/packages/8f/ac/f4e66d81acd8cb4e96d1ce5588d95e75757b80ffa98a2df986f457eb8001/gorun-1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18144234827ceea1da91484cc26b9ff4", "sha256": "ea90999d063d1d6e68c4a47c441aa470c8b8c76144e3822279755d0af3acb6ed" }, "downloads": -1, "filename": "gorun-1.7.tar.gz", "has_sig": false, "md5_digest": "18144234827ceea1da91484cc26b9ff4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5698, "upload_time": "2012-10-19T15:40:31", "url": "https://files.pythonhosted.org/packages/8f/ac/f4e66d81acd8cb4e96d1ce5588d95e75757b80ffa98a2df986f457eb8001/gorun-1.7.tar.gz" } ] }