{ "info": { "author": "Walter Moreira", "author_email": "wmoreira@auntbertha.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# ASTdiff\n\nCompare two commits in a git repository to guarantee that there are no semantic changes.\n\nUse this tool to corroborate that formatting tools don't change the code. If `astdiff` returns 0, the Abstract Syntax \nTree of the files changed in the commits is the same.\n\n\n## Installation\n\nUsing `pip`:\n\n```shell\npip install astdiff\n```\n\n\n### Development Installation\n\nTo audit the code, or to modify it, install `astdiff` in development mode. The tool uses [poetry](https://poetry.eustace.io/) to manage dependencies\nand to build `pip` installable packages. \n\n```bash\n$ git clone https://github.com/auntbertha/astdiff.git\n$ cd astdiff\n$ poetry develop\n$ poetry run pytest\n```\n\nTo build new packages:\n\n```bash\n$ poetry build\n```\n\nand distribute the wheel or tarball from the directory `dist/`.\n\n\n## Usage\n\nThe most basic use of `astdiff` is to check that a reformatting tool didn't change the meaning of the code. When it's\ncalled with no arguments `astdiff` compares the working tree against the HEAD of the current branch:\n\n```bash\n$ astdiff\nRunning: git diff --name-only 9d3219ba027d5a56040d23eb9ee3d23f7a410ad5\nChecking astdiff/astdiff.py ... ok\n\u2728 All files are equivalent! \u2728\n$ echo $?\n0\n```\n\n`astdiff` returns 0 if the ASTs are the same, and returns 1 otherwise. The messages are printed to standard error.\n\n`astdiff` can also check a given commit, a given commit and the working tree, or any pair of commits. It accepts the\nnames of the commits in the same way that `git` does.\n\nUse `-h` or `--help` to get help:\n\n```bash\n$ astdiff -h\nUsage: astdiff.py [OPTIONS] [COMMITS]...\n\n Compare the AST of all changed files between commits.\n\n With no arguments, compare between HEAD and the working tree.\n With one argument COMMIT, compare between COMMIT~1 and COMMIT.\n With two arguments, COMMIT1 and COMMIT2, compare between those two.\n\n (COMMIT2 can be a dot '.' to compare between COMMIT1 and the working tree)\n\nOptions:\n -h, --help Show this message and exit.\n```\n\n\n## Algorithm\n\nThe comparison of the ASTs is a very simple recursive function that traverses the trees in a pre-order depth-first \nsearch. It can be audited to verify its correctness: `astdiff.compare_ast`.\n\n\n## LICENSE\n\n### The MIT License (MIT)\n\nCopyright \u00a9 2018 Aunt Bertha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/auntbertha/ASTdiff", "keywords": "", "license": "MIT", "maintainer": "Walter Moreira", "maintainer_email": "wmoreira@auntbertha.com", "name": "astdiff", "package_url": "https://pypi.org/project/astdiff/", "platform": "", "project_url": "https://pypi.org/project/astdiff/", "project_urls": { "Homepage": "https://github.com/auntbertha/ASTdiff", "Repository": "https://github.com/auntbertha/ASTdiff" }, "release_url": "https://pypi.org/project/astdiff/0.2.5/", "requires_dist": [ "six (>=1.11,<2.0)", "click (>=7.0,<8.0)", "colorful (>=0.4.1,<0.5.0)", "typing (>=3.6,<4.0)" ], "requires_python": "", "summary": "Ensure the invariance of the Abstract Syntax Tree across commits.", "version": "0.2.5" }, "last_serial": 4648823, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d19f837bc8fded717f286d2d93202cb5", "sha256": "9e67f2533356bd38cdc937a74fe8225cf3030802f86b8ab3cd3ebb6499c3b1bb" }, "downloads": -1, "filename": "astdiff-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d19f837bc8fded717f286d2d93202cb5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10579, "upload_time": "2018-10-16T20:12:08", "url": "https://files.pythonhosted.org/packages/aa/3e/838e8873b5d74a6578353382e890b9aa662e95f19df2dedb4794a1bac19a/astdiff-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "245d60af77c9898c0da1b5644d52533a", "sha256": "07840c55c23f27da08da059817ff1e1642022731eff0cf06530f179eb356fcd7" }, "downloads": -1, "filename": "astdiff-0.1.0.tar.gz", "has_sig": false, "md5_digest": "245d60af77c9898c0da1b5644d52533a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4310, "upload_time": "2018-10-16T20:12:09", "url": "https://files.pythonhosted.org/packages/0b/33/e163f726b3277534918b07c7d56ce7e810951714c03b96498ded5d2ce9bc/astdiff-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3c6f6847d5b5c0de2d0cf76d5214770c", "sha256": "81605bd86c6e55cd058488c7f2270c68453eee21c0ca8a0b4339d458538bbfca" }, "downloads": -1, "filename": "astdiff-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3c6f6847d5b5c0de2d0cf76d5214770c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12246, "upload_time": "2018-10-16T20:24:03", "url": "https://files.pythonhosted.org/packages/f6/1e/f0f5560481e5cae69dd4bd83dca9813188bb0a402f68c8aa94f6d8f2771d/astdiff-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cdf4f24e5dbc48802369bda3321680c3", "sha256": "ff8fb31fd4e5b9d213c35331746d2b789f323ce3b2744f36dc127eb3999eb4c2" }, "downloads": -1, "filename": "astdiff-0.2.0.tar.gz", "has_sig": false, "md5_digest": "cdf4f24e5dbc48802369bda3321680c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5500, "upload_time": "2018-10-16T20:24:04", "url": "https://files.pythonhosted.org/packages/01/5e/6c143b647ded55134648599f35aff34969b53f61e19a1fee5ba04625e841/astdiff-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b62baee8b3e16edec64c0ebdf9e14fc9", "sha256": "706bdfcff14af071a5375cb1d429c705fdb98f3a1cec8d67ef65696dcf12a056" }, "downloads": -1, "filename": "astdiff-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b62baee8b3e16edec64c0ebdf9e14fc9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12242, "upload_time": "2018-10-17T01:55:29", "url": "https://files.pythonhosted.org/packages/19/4f/ffc64ee190f1b5f6ff54a8a258e6d0a6ae06fddb455f70c0d0116f4f9595/astdiff-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfedfee2caec652adbd36490c6d10e26", "sha256": "dc4d409fb9c24dbf792d2e46c9ec843b99e63cc658e8fbab2128b64edad64941" }, "downloads": -1, "filename": "astdiff-0.2.1.tar.gz", "has_sig": false, "md5_digest": "dfedfee2caec652adbd36490c6d10e26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5513, "upload_time": "2018-10-17T01:55:30", "url": "https://files.pythonhosted.org/packages/f9/fe/74b74d773efaba88877a4376fdc4f101f38b3480fdf331bbab0702427757/astdiff-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "9a410f665b0f5ccf21229fcda5ff1543", "sha256": "081eae8c24c7a64fba13c9729321922f440588ad2d52a9c34771244895c78a64" }, "downloads": -1, "filename": "astdiff-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a410f665b0f5ccf21229fcda5ff1543", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12244, "upload_time": "2018-10-17T14:34:44", "url": "https://files.pythonhosted.org/packages/0b/1d/da11e81cb3fd343e32ec1255ef1c1081dd9fc27106cf677e921acc2c8771/astdiff-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d51a31e034f1c481fa10beea8a724a71", "sha256": "22cb94a268ed72ccdbe18e8aad91286075e31e3c4f30e3b7e41f282bc754ffcc" }, "downloads": -1, "filename": "astdiff-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d51a31e034f1c481fa10beea8a724a71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5512, "upload_time": "2018-10-17T14:34:46", "url": "https://files.pythonhosted.org/packages/f1/f1/d044630f97bc566477ca7fcc355930091844436bd028ef6f80ae65c4ddd7/astdiff-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "6b6181dd184884eb063855ed221c0bac", "sha256": "473df15b0a7be366dc147f3c39acb701b64d1b52109d407b280eefe6eff59e88" }, "downloads": -1, "filename": "astdiff-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b6181dd184884eb063855ed221c0bac", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12767, "upload_time": "2018-12-23T19:06:46", "url": "https://files.pythonhosted.org/packages/af/2b/bf1365cd69cf44ece29e11bde6eca8083521e3dfb87e8f492b01e9564ff5/astdiff-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e11ef7978e7b31b8e6b06f0fce95bf89", "sha256": "6675f1ce944616c66d30ba1ed59deb540e835f726009f9573aa84426bdbe02f5" }, "downloads": -1, "filename": "astdiff-0.2.3.tar.gz", "has_sig": false, "md5_digest": "e11ef7978e7b31b8e6b06f0fce95bf89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5626, "upload_time": "2018-12-23T19:06:48", "url": "https://files.pythonhosted.org/packages/bf/d1/3e7d9077a24904b91939afdce84b1f2c4f2e3f8fc2481a32668d4b078f3f/astdiff-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "04ba501b1b8ee1a01ca55235b0972fae", "sha256": "9c5840ef7bcc4b9e955927793b8342f6e78d926e47bb1121849fd9b1e4185daa" }, "downloads": -1, "filename": "astdiff-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "04ba501b1b8ee1a01ca55235b0972fae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12769, "upload_time": "2018-12-31T19:56:12", "url": "https://files.pythonhosted.org/packages/6f/e8/b7456909704571cd8b8bdafdf2dbfd6f734fea6b58bb3fb8acb943d70608/astdiff-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1153974e8540c7da4093fd04e0e8b33", "sha256": "89d390bf12d5fb02f0bbf7af35e5705dd56811163b78f7679254eefeadce7dc1" }, "downloads": -1, "filename": "astdiff-0.2.4.tar.gz", "has_sig": false, "md5_digest": "b1153974e8540c7da4093fd04e0e8b33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5649, "upload_time": "2018-12-31T19:56:13", "url": "https://files.pythonhosted.org/packages/a2/a3/b667e56c286c68a08edf2d6f2a61b831ef0348e97af6e7565c427a2746f1/astdiff-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "e4f93b2f06abb21f05caff1e4944ec96", "sha256": "e72622d782e87fb83a724d0428c9293d1c8f2acda390b6852f677b2c58be04eb" }, "downloads": -1, "filename": "astdiff-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4f93b2f06abb21f05caff1e4944ec96", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12751, "upload_time": "2018-12-31T20:23:55", "url": "https://files.pythonhosted.org/packages/b9/cb/8c99dea62dae707aaba8b80ed6c47d20cf1762f68e2fdaef8a3bb0b93428/astdiff-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4c6d48d47b543c571869a3bb2729c1b", "sha256": "e836602625b4cf24f85adee5109659e372cf6113ffd7432f42827c34e6d994c0" }, "downloads": -1, "filename": "astdiff-0.2.5.tar.gz", "has_sig": false, "md5_digest": "e4c6d48d47b543c571869a3bb2729c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5639, "upload_time": "2018-12-31T20:23:56", "url": "https://files.pythonhosted.org/packages/9a/45/b078cadd5cdd9fd2c4f2ee30724c50cf076e4d10f0c9ecf8eb1a1ba1bdcb/astdiff-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e4f93b2f06abb21f05caff1e4944ec96", "sha256": "e72622d782e87fb83a724d0428c9293d1c8f2acda390b6852f677b2c58be04eb" }, "downloads": -1, "filename": "astdiff-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4f93b2f06abb21f05caff1e4944ec96", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12751, "upload_time": "2018-12-31T20:23:55", "url": "https://files.pythonhosted.org/packages/b9/cb/8c99dea62dae707aaba8b80ed6c47d20cf1762f68e2fdaef8a3bb0b93428/astdiff-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4c6d48d47b543c571869a3bb2729c1b", "sha256": "e836602625b4cf24f85adee5109659e372cf6113ffd7432f42827c34e6d994c0" }, "downloads": -1, "filename": "astdiff-0.2.5.tar.gz", "has_sig": false, "md5_digest": "e4c6d48d47b543c571869a3bb2729c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5639, "upload_time": "2018-12-31T20:23:56", "url": "https://files.pythonhosted.org/packages/9a/45/b078cadd5cdd9fd2c4f2ee30724c50cf076e4d10f0c9ecf8eb1a1ba1bdcb/astdiff-0.2.5.tar.gz" } ] }