{ "info": { "author": "Reinout van Rees", "author_email": "reinout@vanrees.org", "bugtrack_url": null, "classifiers": [], "description": "Github test commit reports for teams\n==========================================\n\n.. image:: https://travis-ci.org/nens/githubinfo.png?branch=master\n :target: https://travis-ci.org/nens/githubinfo\n\nGithubinfo is a script that queries the github API of one or more\norganizations and gives you a quick report on the amount of commits **with\ntests** in the last week.\n\nIt is adjustable, of course, which is necessary as I put some company defaults\nin there :-)\n\nIt is just a simple single command and the output looks like this::\n\n $ testcommitinfo\n loading project neerslagradar-site\n loading project ...\n ...\n\n We want more and better testing. For a quick and dirty quantity\n indication ('more'), here are the commits that have the string\n 'test' in of of the commit's touched filenames.\n\n Period: 8 days.\n Github organizations that I queried: ddsc, lizardsystem, nens\n\n Projects sorted by amount of commits with tests\n -----------------------------------------------\n\n lizard-neerslagradar: 11 (25%)\n lizard-progress: 3 (9%)\n radar: 1 (33%)\n ...\n\n Committers sorted by amount of commits with tests\n -------------------------------------------------\n\n Reinout van Rees: 12 (11%)\n Remco Gerlich: 3 (6%)\n Arjan Verkerk: 2 (8%)\n ...\n\nYou can pass ``-h`` or ``--help`` to get usage information, for instance on\nhow to increase the log level or on how to get the version number.\n\n\nGoal\n----\n\nI wrote it because we wanted to improve our development process at `Nelen &\nSchuurmans `_. We wanted more tests. So I\nwrote a script:\n\n- It queries the github API for one or more organizations (or personal\n accounts).\n\n- It queries the projects in there for commmits in the last week\n (configurable).\n\n- For every commit, it simply looks if there's a filename in the commit with\n ``test`` in its full path. If so, the commit counts as a \"test commit\".\n\n- For every project, it counts the number of commits and the number of test\n commits.\n\n- The same for every committer.\n\nAt the end, you get a list of projects and committers sorted by number of\ncommits.\n\n\nRisk: you get what you measure\n------------------------------\n\nThe metric is incomplete and imprecise. The same people that start grabbing\ntheir torches and pitchforks when someone mentions \"code coverage\" will start\ngrabbing them now. My answer: bugger off.\n\n- You identify colleagues that never ever bother to test. You get to educate\n them. Can I borrow that pitchfork, please?\n\n- You identify projects that have improved in quality.\n\n- You identify projects that were obviously troubled by a deadline and that\n might bite you later on if you have to use them yourself.\n\n- You identify colleagues that bring quality to your project if you work with\n them.\n\nThere are a lot of things you don't measure. But someone who doesn't bother\nwith tests also isn't going to bother adding a whiteline somewhere in a test\nfile to get at least some test commit credited to his name :-)\n\n\nConfiguration\n-------------\n\nHere are the default settings, obviously very my-company-centric::\n\n SETTINGS = {\n 'auth': None, # Set it to ['username', 'very_secret'].\n 'days': 7,\n 'organizations': [\n 'ddsc',\n 'lizardsystem',\n 'nens',\n ],\n 'extra_projects': [\n # ('organization', 'project'),\n ('reinout', 'buildout'),\n ('reinout', 'django-rest-framework'),\n ('reinout', 'serverinfo'),\n ('reinout', 'z3c.dependencychecker'),\n ('rvanlaar', 'djangorecipe'),\n ('zestsoftware', 'zest.releaser'),\n ],\n }\n\nTo customize it, add a ``settings.json`` file in your working\ndirectory. Whatever you put in there is used to override the default\n``SETTINGS`` dictionary. Make sure it is properly json-formatted, so with\ndouble quotes around strings. Something like this::\n\n {\"auth\": [\"reinout\", \"nogal_geheim\"],\n \"days\": 8,\n \"organizations\": [\"lizardsystem\"],\n \"extra_projects\": []}\n\nauth\n username/password list. For when you need access to some private\n projects. Note that you also get a much higher API usage limit when you're\n logged in.\n\ndays\n Number of days to report on. By default a week.\n\norganizations\n List of github organizations or personal accounts to query. This is the\n first part after ``github.com`` in URLs like\n ``https://github.com/organization/project``.\n\nextra_projects\n Optional list of ``[\"organization\", \"project\"]`` lists. For those handful\n of extra projects outside of your organization that one or more colleagues\n do a lot of work on and that are essential to you. I'm listing zc.buildout\n and zest.releaser in here, for instance.\n\n Note that only the committers that committed to your own organization get\n counted for these extra_projects. This way the list doesn't get polluted.\n\nTo verify your settings, you can call ``testcommitinfo --show-config`` which\nwill print the configuration as testcommitinfo sees it.\n\n\nIntegration with your own systems\n---------------------------------\n\nPerhaps you want to include the output in some dashboard? Or you want to\ngenerate a nice HTML out of it?\n\nFor those use cases, you can export a JSON file with the collected project and\nuser information. Pass a JSON filename with the ``--json-output`` commandline\noption and you'll have everything you need.\n\n\nProblems?\n---------\n\nSometimes the github API fails intermittently. There are some \"try it a second\ntime\" if/elses in the code which work around most of the issues. Every time I\ndiscover an additional problem, I add some code to work around it.\n\nSo if you've got a problem, you could just try running it a second time, most\noften that works just fine.\n\nIf you've got a real bug, you could ask me (`reinout@vanrees.org\n`_) to take a look. Or, better, submit a issue on\nhttps://github.com/nens/githubinfo/issues . Or, even better, try to fix it in\na pull request.\n\n\nCredits\n=======\n\n- `Reinout van Rees `_ started this program.\n\n\nChangelog of githubinfo\n===================================================\n\n\n1.1 (2013-04-02)\n----------------\n\n- Added optional export of the results to a JSON file. Useful if you want to\n format the output yourself, for instance to create a HTML page.\n\n- Added argument parsing via argparse. **Warning**: this requires python 2.7\n at a minimum. I guess that's not a problem. At least ``-h`` now gives a\n proper usage message!\n\n- Added ``githubinfo.__version__`` attribute.\n\n\n1.0.1 (2013-04-02)\n------------------\n\n- Small README fix: quote error in example config file. Thanks Maximilien\n Riehl for noticing it!\n\n\n1.0 (2013-04-01)\n----------------\n\n- Added proper documentation and usage instructions to the README.\n\n- Detecting doctests, too. For ``.rst`` and ``.txt`` files, we search for\n ``>>>`` in the commit's patch, that's a pretty good indication of a doctest\n commit. I needed this for detecting my well-tested commits in zc.buildout.\n\n- Loading commits from branches, too.\n\n- Added option for extra projects outside of the main ones. Commits in here\n are only counted if they're from committers to our main organizations.\n\n- Extracting test commit info from github organizations.\n\n- Initial project structure created with nensskel 1.30.dev0.", "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/nens/githubinfo", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "githubinfo", "package_url": "https://pypi.org/project/githubinfo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/githubinfo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nens/githubinfo" }, "release_url": "https://pypi.org/project/githubinfo/1.1/", "requires_dist": null, "requires_python": null, "summary": "Extract test-related commit info from github", "version": "1.1" }, "last_serial": 732304, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "44e666c70fa1efbeb1a9fb958526ef2c", "sha256": "6ec225a7ae419b58db885c3c112477c372b9faa940dea80161c8fd6eb1c52f2e" }, "downloads": -1, "filename": "githubinfo-1.0.zip", "has_sig": false, "md5_digest": "44e666c70fa1efbeb1a9fb958526ef2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29651, "upload_time": "2013-04-01T10:36:04", "url": "https://files.pythonhosted.org/packages/3b/3f/0f9de2dc936aeecb59d592c01557d3ce00563a6f7b2aebd988eb2d47e853/githubinfo-1.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5215881fc68a798b1b50c443905929b2", "sha256": "f5e37ec3b8de78ac980e3c4ca0dae1bff7178db5af09a7f413e5fe88760e97b9" }, "downloads": -1, "filename": "githubinfo-1.0.1.zip", "has_sig": false, "md5_digest": "5215881fc68a798b1b50c443905929b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29938, "upload_time": "2013-04-02T09:35:50", "url": "https://files.pythonhosted.org/packages/7f/4f/bfc281bc9a92d6bcd0727ea4fbe5325cb7fb69d6a2aefa916fec48918caa/githubinfo-1.0.1.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8cf4b480993897a98af5c6a74f09eda6", "sha256": "cbbfa730d605be136a73f09b88295dce94b139e6080a7def042dd346f073d28f" }, "downloads": -1, "filename": "githubinfo-1.1.zip", "has_sig": false, "md5_digest": "8cf4b480993897a98af5c6a74f09eda6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32354, "upload_time": "2013-04-02T12:10:22", "url": "https://files.pythonhosted.org/packages/8e/be/f85f59e503a9dbc63fb64ad27a19697ca04e42a173e83e8b8cc267ba34fe/githubinfo-1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8cf4b480993897a98af5c6a74f09eda6", "sha256": "cbbfa730d605be136a73f09b88295dce94b139e6080a7def042dd346f073d28f" }, "downloads": -1, "filename": "githubinfo-1.1.zip", "has_sig": false, "md5_digest": "8cf4b480993897a98af5c6a74f09eda6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32354, "upload_time": "2013-04-02T12:10:22", "url": "https://files.pythonhosted.org/packages/8e/be/f85f59e503a9dbc63fb64ad27a19697ca04e42a173e83e8b8cc267ba34fe/githubinfo-1.1.zip" } ] }