{ "info": { "author": "Paul Michali", "author_email": "pc@michali.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Build Tools" ], "description": "commit-coverage\n===============\n\nThis allows you to assess the coverage of changes you have in a repo. It\nis intended for use, when preparing to push code up for review upstream.\n\nUsage\n-----\n\nAs a prerequisite to using this script, run coverage in the repo, to\nproduce coverage report files in a 'cover' directory at the root of the\nrepo's tree. This coverage should be done on the code that will be\nupstreamed (either what is in the working directory, or what has been\ncommitted to the local repo).\n\nBehavior\n--------\n\nAssuming you have a repo with uncommitted changes, you can run the command\nas follows::\n\n commit_coverage /opt/stack/networking-cisco\n\nThe argument must be the root of a git repo that has coverage data in a\n'cover' subdirectory.\n\nBy default, this will create diffs comparing the working directory, to the\nlatest commit (HEAD), with (up to) three lines of context. That output will\nbe checked against coverage data and a report produced. Here's what the\noutput looks like::\n\n devstack/csr1kv/cisco_neutron (No coverage data)\n\n networking_cisco/apps/saf/agent/dfa_agent.py (No added/changed lines)\n\n networking_cisco/apps/saf/server/dfa_server.py (run=1, mis=1, par=0, ign=0) 47%\n 32 run import time\n 33 \n 34 \n 35 run +from networking_cisco._i18n import _LE, _LI, _LW\n 36 run from oslo_serialization import jsonutils\n 37 \n 38 \n \n 382 # it is created by openstack.\n 383 run part_name = self.cfg.dcnm.default_partition_name\n 384 par if len(':'.join((proj_name, part_name))) > 32:\n 385 mis + LOG.error(_LE('Invalid project name length: %s. The length of '\n 386 'org:part name is greater than 32'),\n 387 len(':'.join((proj_name, part_name))))\n 388 mis return\n\nEach file from the diff will be reported. If the file was not processed\nby the coverage test, or there were no added or changed lines in the\ndiff for the file, this will be reported, as shown in the first two files.\n\nFor files with coverage data and added/changes lines, the output will\nlook like the third file. Each line number from the diff is shown, with\nthe coverage status, which can be:\n\n* 'run' The line was invoked as part of coverage run\n* 'mis' The line was not invoked during coverage\n* 'par' The line was partially covered\n* ' ' The line was not considered for coverage (e.g. blank, non-executable)\n\nNext, if the line was added/changed, a '+' is shown. If it was a context line\nfor the diff region, a ' ' is shown. Deleted lines are not shown. After that,\nthe source code is show.\n\nNext to the filename is summary information, ONLY for lines that were added\nor changed. In the example, there was one line run and one missing in the\nchange set (lines with a plus sign). At the end, we can see the overall\ncoverage report for the FILE - 47% in this example.\n\nThere are a few knobs that you can use with this script. First, you can change\nthe number of context lines shown by using the --context argument. The default\nis three, and can be zero or more. Note: if a diff region is at the start or\nend of a file, there may be fewer or no context lines.\n\nSecond, you can select which commits are used for the diff calculation, by\nspecifying the --which argument. The default is 'working', which will do a\ndiff between the working directory and latest commit (HEAD). Instead, you can\nprovide 'committed', which will compare the current commit against the\nprevious commit (HEAD^..HEAD). Otherwise, you can provide the commit versions\nto use for the diff, just make sure that the most recent corresponds to the\ncoverage report. For example, you can do::\n\n cd /opt/stack/neutron\n commit_coverage --context 5 --which HEAD~5..HEAD~ .\n\nThis runs the tool on a neutron repo, shows more context lines, and will\ndo a diff between HEAD~5 and HEAD~ commits.\n\nYou can use the -h option to see what the arguments are for this script.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pmichali/commit-coverage", "keywords": null, "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "commit-coverage", "package_url": "https://pypi.org/project/commit-coverage/", "platform": "any", "project_url": "https://pypi.org/project/commit-coverage/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pmichali/commit-coverage" }, "release_url": "https://pypi.org/project/commit-coverage/0.7/", "requires_dist": null, "requires_python": null, "summary": "Reports on (previously run) coverage results for a commit.", "version": "0.7" }, "last_serial": 1996400, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ff0eb14092280c3241e6cc1c2305d5a7", "sha256": "05daf69a9c4d344b0bb961ee2ccbf3c16cc30e5bc25e3c92b2a1a536b6fb9763" }, "downloads": -1, "filename": "commit-coverage-0.1.tar.gz", "has_sig": false, "md5_digest": "ff0eb14092280c3241e6cc1c2305d5a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6518, "upload_time": "2016-03-07T19:41:29", "url": "https://files.pythonhosted.org/packages/21/be/b3238813e3912afe6697b2053dcbee61db1ae11a9ce329e0de5d81a39bc6/commit-coverage-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "79d787f8970ae3f3811f7227ea75c352", "sha256": "f8c0ddf1a6bcfccb8b67e8c66f8c11161de3811a28982722321b1134765521fb" }, "downloads": -1, "filename": "commit-coverage-0.2.tar.gz", "has_sig": false, "md5_digest": "79d787f8970ae3f3811f7227ea75c352", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6514, "upload_time": "2016-03-07T19:55:55", "url": "https://files.pythonhosted.org/packages/a4/ea/b604a7fbb103b8944220dd69f589474694967204dbbea39ea449bf800c98/commit-coverage-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "8e7a2adb1ad4ff98f049c1b971f4a4e3", "sha256": "510c19500046c14b2082de87e6358c81708aa6bcd8028012083777048ebab1e1" }, "downloads": -1, "filename": "commit-coverage-0.3.tar.gz", "has_sig": false, "md5_digest": "8e7a2adb1ad4ff98f049c1b971f4a4e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6799, "upload_time": "2016-03-07T20:09:59", "url": "https://files.pythonhosted.org/packages/a5/c4/979c0d931074935ccd546cec126b8aa7aa2d8356c8c81c4b3133d5e3022a/commit-coverage-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "bd766b3e36c8e7460e0f646bc15eb8c2", "sha256": "c17d358c316609a110b270ba4c729181288afb094ac3d14ca0205ceedf53fded" }, "downloads": -1, "filename": "commit-coverage-0.4.tar.gz", "has_sig": false, "md5_digest": "bd766b3e36c8e7460e0f646bc15eb8c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6808, "upload_time": "2016-03-07T20:13:10", "url": "https://files.pythonhosted.org/packages/7e/5a/c3c23d69a49c29315a5f10e78cd80b25f0dc07c5e7021d74340cb1c9233b/commit-coverage-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "4081ef2639ea14d8c403da39ab3fd094", "sha256": "4c990894fcdb8ea358f8dfa65375f918d2297bc8ad64ef1db5012fbd0f76ff6e" }, "downloads": -1, "filename": "commit-coverage-0.5.tar.gz", "has_sig": false, "md5_digest": "4081ef2639ea14d8c403da39ab3fd094", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6856, "upload_time": "2016-03-07T20:29:42", "url": "https://files.pythonhosted.org/packages/a2/d6/b2c69a0b9017834b49ce953af310ae81d81ead483ead502710916cba7df4/commit-coverage-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "b83b0d5243ba6a828d47995abcbdac4a", "sha256": "04d2633481259975cc1b8756d0481a63ad6d04dba098bf93878aa67198f500d6" }, "downloads": -1, "filename": "commit-coverage-0.6.tar.gz", "has_sig": false, "md5_digest": "b83b0d5243ba6a828d47995abcbdac4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6849, "upload_time": "2016-03-07T21:46:46", "url": "https://files.pythonhosted.org/packages/d1/46/e4fa484c650343e5cac93946f9f16968a4c3452087a7ae672633e1fd1079/commit-coverage-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "872ac118bf1931876a59e5cb509f9458", "sha256": "20a373cca16996cc33680f4589a8a33c10a388c8f2919ca545a27110712c1389" }, "downloads": -1, "filename": "commit-coverage-0.7.tar.gz", "has_sig": false, "md5_digest": "872ac118bf1931876a59e5cb509f9458", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6851, "upload_time": "2016-03-08T21:46:28", "url": "https://files.pythonhosted.org/packages/ed/56/48c9426bbb26bf7851421a83a805575a2151f9f4d2d1072e9f3bc83932d7/commit-coverage-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "872ac118bf1931876a59e5cb509f9458", "sha256": "20a373cca16996cc33680f4589a8a33c10a388c8f2919ca545a27110712c1389" }, "downloads": -1, "filename": "commit-coverage-0.7.tar.gz", "has_sig": false, "md5_digest": "872ac118bf1931876a59e5cb509f9458", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6851, "upload_time": "2016-03-08T21:46:28", "url": "https://files.pythonhosted.org/packages/ed/56/48c9426bbb26bf7851421a83a805575a2151f9f4d2d1072e9f3bc83932d7/commit-coverage-0.7.tar.gz" } ] }