{ "info": { "author": "Will Oursler", "author_email": "woursler@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "``orphanblack``: Static Analysis for Software Clone Detection\n=============================================================\n\nCurrently for Python only, with plans to extend to C++, Java and more!\n\nInstallation\n------------\n\nI think things are set up with PyPI such that\n\n::\n\n $ pip install orphanblack\n\nshould work. Because the software is in the early days, and this is my\nfirst python package, please forgive me if there are a few kinks.\n\nUsage\n-----\n\n``orphanblack`` is a complex tool with plenty of settings under the hood\nfor both processing and display. Sensible defaults are used whenever\npossible. To get started, the following will analyse a single python\nmodule for clones.\n\n::\n\n $ cd path/to/your/code\n $ orphanblack scan *.py\n\n ...\n\n $ orphanblack report --verbose\n\n Found 11 clones\n ...\n\nIt is also possible to output results as a webpage. After scanning code,\njust run\n\n::\n\n $ orphanblack html -o results.html\n\nIf no destination is specified, ``orphanblack`` will use ``output.html``\nin the current directory.\n\nAPI\n---\n\nNot yet done, but on the way... for now, check out the Report class\n(``orphanblack/report.py``) which summarizes the results and should be\nfairly stable.\n\nCode Genealogy (How ``orphanblack`` Came To Be)\n-----------------------------------------------\n\n``orphanblack`` is a direct code descendant of a `2008 package called\n``clonedigger`` `__. I first\nstumbled on ``clonedigger`` in 2012 when examining other static analysis\ntools for python like pep8 and pyflakes, and really liked the concept.\nSadly, I found the original code unusable for my purposes. I adapted the\ncode several times in the intervening years, but always with limited\nsuccess because of the convoluted inner workings of the package.\n\nIn the early summer of 2015, I switched to a new computer, inadvertantly\ndeleting many of my modifications. I decided to bite the bullet and\nattempt a total refactor into something I found more palatable. I also\nwanted to create something that could play nicely with Sublime Text; a\ntool that could automatically run on every project -- python or\notherwise -- I worked on. ``orphanblack``, nicknamed after the\nclone-based BBC America series, is the result of my progress towards\nthose goals.\n\nThe CLI and API are both inspired by `the wonderful dynamic analysis\ntool ``coverage.py`` `__, though\nthere is no direct code relationship.\n\nBecause ``clonedigger`` is distributed under GPL3, I am forced to also\nuse GPL3 in place of the MIT or LGPL3 liscences, which I personally\nprefer. I do not consider use of the ``orphanblack`` API to constitute\nincorporation and therefore to the greatest degree possible under the\nlaw I wish to allow the use of the API for even commercial purposes.\n\nA Short and Incomplete List of Improvements:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Use ```Click`` `__ in place of\n ```optparse`` `__ to\n simplify internal code.\n- Use ```Jinja2`` templating `__ to greatly\n simplify the previously ad-hoc production of HTML reports.\n- Replace janky use of ``arguments.py`` globals with the ``Parameters``\n class.\n- Replace CLI with something a little less difficult to understand.\n- Provide persistent, serialiazable results reports (stored in\n ``.orphanblack`` files when a scan is run.).\n- Implement program-wide logging rather than ad-hoc error printouts.\n\nPlanned Features\n^^^^^^^^^^^^^^^^\n\n- Grouping clones! Right now, if three regions of code are all similar\n to each other, three seperate clone reports, corresponding to each\n pair, are generated.\n- An API, allowing integration with other linters and plugins.\n- Other languages: So much of this work is already done. After just a\n little bit of internal rewriting, any language should be able to work\n with ``orphanblack`` just by providing an appropriate AST parser.\n- Total internal rewrite, aiming for a well commented codebase.\n- Diffs based on anti-unification patterns.\n- ASTNode classes with built in anti-unification utilities\n- Ability to handle sequences elegantly (i.e. deal with insertion /\n removal in edit distances)\n- Configurations! (How this is implemented internally is something that\n I've had an idea on for a while / may become it's own project. Sort\n of like what Click is to argparse / optparse.)\n\nAn Incomplete List of Features Removed (and Reasons):\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Removed timing and profiling tools: Profiling is great, but there are\n dedicated python profiling tools avalible.\n- Removed diff highlighting in HTML reports: This may someday make a\n comeback, but for now, a clean Jinja2 template far outweighs the\n advantages of inline diffs.\n- Formatting of code segments is less careful than before. This is a\n temporary change pending the rewrite of internal AST representation.\n- Removed CPD XML output. This may be added back in later, using\n templates.\n- Multiple settings like ``distance-threshold`` which will be added\n again using configurations.\n\nLicense and Warranty Information\n--------------------------------\n\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your\noption) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program as ``LICENSE.txt``. If not, see\nhttp://www.gnu.org/licenses/.\n\n(C) Will Oursler 2015", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Zomega/orphanblack/tarball/0.2.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Zomega/orphanblack", "keywords": "testing,clone,static analysis,clonedigger,buildbot", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "orphanblack", "package_url": "https://pypi.org/project/orphanblack/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/orphanblack/", "project_urls": { "Download": "https://github.com/Zomega/orphanblack/tarball/0.2.0", "Homepage": "https://github.com/Zomega/orphanblack" }, "release_url": "https://pypi.org/project/orphanblack/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Static Analysis for Software Clone Detection", "version": "0.2.0" }, "last_serial": 1676986, "releases": { "0.1.11": [ { "comment_text": "", "digests": { "md5": "49ee46df67c8495eaae3049e4523595a", "sha256": "47b499cf904bf455bf74d1f6586d4829db4f2a00a83b4375c945ee280b62e6d8" }, "downloads": -1, "filename": "orphanblack-0.1.11.tar.gz", "has_sig": false, "md5_digest": "49ee46df67c8495eaae3049e4523595a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2200816, "upload_time": "2015-08-09T07:51:24", "url": "https://files.pythonhosted.org/packages/99/6d/89ee7340e40f5b68c5bdc9f7aa916dc9656b780da543bc62ee7dc2f02546/orphanblack-0.1.11.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f2f1fc38e3f8ae8658138d2b4cf810ec", "sha256": "44188fa730d9f85fb74920b5abd6750ee3821a9194a226d89ac958e032de7d5c" }, "downloads": -1, "filename": "orphanblack-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f2f1fc38e3f8ae8658138d2b4cf810ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2203929, "upload_time": "2015-08-14T03:00:34", "url": "https://files.pythonhosted.org/packages/4a/9c/63b04939f166d82a54a171cf1f32bfe24eca61db0e37faeeed473fe00ece/orphanblack-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f2f1fc38e3f8ae8658138d2b4cf810ec", "sha256": "44188fa730d9f85fb74920b5abd6750ee3821a9194a226d89ac958e032de7d5c" }, "downloads": -1, "filename": "orphanblack-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f2f1fc38e3f8ae8658138d2b4cf810ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2203929, "upload_time": "2015-08-14T03:00:34", "url": "https://files.pythonhosted.org/packages/4a/9c/63b04939f166d82a54a171cf1f32bfe24eca61db0e37faeeed473fe00ece/orphanblack-0.2.0.tar.gz" } ] }