{ "info": { "author": "Isotoma Limited", "author_email": "support@isotoma.com", "bugtrack_url": null, "classifiers": [], "description": "# precog\nFor preventing your crimes, before you can commit them.\n\nInstallation\n============\n\nTo install from PyPI, run `pip install precog`. To install the\ngithook, run `precog`. This will try to write to your pre-commit file\n(`.git/hooks/pre-commit`), and will abort if it already exists, so\nmove or remove it if you want to use precog.\n\nUsage\n=====\n\nOnce you have precog installed, your commits will be checked that they\nconform. By default it will abort a commit if any of `flake8`, `isort`\nor `eslint` do not exit cleanly, but will make no effort to fix any\nproblems. The pre-commit file contains the default values for the\noptions, but you can override the behaviour with environment variables\nwhen committing, or if you can edit the defaults in the pre-commit file.\n\nExamples:\n---------\n\nTo skip all checking altogether, eg for a work-in-progress commit:\n```\nSTRICT=\"\" git commit -m \"wip\"\n```\nthis will still print issues, but will let the commit complete.\n\nTo skip just isort:\n```\nISORT_STRICT=\"\" git commit -m \"wip - todo: fix imports\"\n```\n\nThe `ISORT_FORCE` option\n========================\n\nThis one is a bit mad. Because `isort` knows how to fix the problems\nit finds (while `flake8` and `eslint` do not), rather than complaining\nat you, this option tells `precog` to tweak your changed files to\nconform to the `isort` checking. Though this is a bit scary, so is\ndisabled by default.\n\nIn the case where all of a file is staged for commit, this is fairly\nstraight-forward: `precog` will just run `isort` on the file and then\nre-add it to include those changes in the commit. But if only part of\nfile is staged, then we don't want to add the whole file. So we make\nuse of the `-k` option to `git stash` to stash only the unstaged\nchanges. We then run `isort`, add the file, then pop the stash.\n\nThere are almost certainly edge-cases in this, and if it mucks up your\ncommit, then I am sorry. Out of your sadness, a PR/issue can rise to\nmake it not happen again.\n\nIntegration with `eslint`\n=========================\n\nTo lint your JavaScript, precog will invoke eslint on any changed\n`.js` files. Because it is not a Python dependency, installing precog\nmakes no attempt to install eslint, but will try to find it at\n`node_modules/.bin/eslint`. If it doesn't find it, it will assume it\nis installed globally. You can set the `ESLINT_PATH` environment\nvariable if this doesn't find it - if so you may want to set it as a\ndefault in your pre-commit file.\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/isotoma/precog", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "precog", "package_url": "https://pypi.org/project/precog/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/precog/", "project_urls": { "Homepage": "https://github.com/isotoma/precog" }, "release_url": "https://pypi.org/project/precog/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Git-hooks for flake8, isort and eslint", "version": "0.0.2" }, "last_serial": 2327062, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1eb8a4e8f62d6c6970a4038d9b25c73a", "sha256": "34c20383cfc0a3dd3ab3f384ed59dd4d7fb74e58ad12c50c94a3f3bd7a56714f" }, "downloads": -1, "filename": "precog-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1eb8a4e8f62d6c6970a4038d9b25c73a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3823, "upload_time": "2016-06-16T10:09:24", "url": "https://files.pythonhosted.org/packages/97/03/9e5585059b45d3e187475f016d639cd6bdfab5c4ba45ec81cd9fa1eee8b8/precog-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6ba375e3a0e0bf97ecd77a7919d7b667", "sha256": "6393f62ce3a6c6f3358918be814151c2ac36133fab9884bcc159334103167536" }, "downloads": -1, "filename": "precog-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6ba375e3a0e0bf97ecd77a7919d7b667", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10700, "upload_time": "2016-06-16T16:05:51", "url": "https://files.pythonhosted.org/packages/37/44/6280e7fa4b801399afe2ba183b758429e748e9cbcfaed4a9a404c89b50ba/precog-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ba375e3a0e0bf97ecd77a7919d7b667", "sha256": "6393f62ce3a6c6f3358918be814151c2ac36133fab9884bcc159334103167536" }, "downloads": -1, "filename": "precog-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6ba375e3a0e0bf97ecd77a7919d7b667", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10700, "upload_time": "2016-06-16T16:05:51", "url": "https://files.pythonhosted.org/packages/37/44/6280e7fa4b801399afe2ba183b758429e748e9cbcfaed4a9a404c89b50ba/precog-0.0.2.tar.gz" } ] }