{ "info": { "author": "Todd Gamblin", "author_email": "tgamblin@llnl.gov", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha" ], "description": "# Contrib\n\n[![Build Status](https://travis-ci.com/spack/contrib.svg?branch=master)](https://travis-ci.com/spack/contrib)\n[![codecov](https://codecov.io/gh/spack/contrib/branch/master/graph/badge.svg)](https://codecov.io/gh/spack/contrib)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nA python package for making stacked area plots of contributions to a git\nrepository over time. Plots can show contributions by authors, or by\norganizations.\n\n

\n \n

\n\n## Installation\n\n`contrib` is on PyPI, so you can just `pip install` it:\n\n```console\n$ pip install contrib\n```\n\nAlternately, you can clone this project, add its directory to your\n`PYTHONPATH`, and add the `bin` directory to your `PATH`.\n\n## Usage\n\nTo use `contrib`, you'll need to create a configuration file telling it\nwhere to find your code. Below is an example for Spack; you can find\ncomplete code in the\n[spack-contributions](https://github.com/spack/spack-contributions) repo.\n\n\nHere's an example `contrib.yaml`:\n\n```yaml\ncontrib:\n # Path to your git repository. to run git blame on.\n # Consider making this a git submodule.\n repo: ./spack\n\n # JSON file mapping authors to organizations (optional)\n orgmap: ./author-to-org.json\n\n # Separate parts of the repository to process (optional). For each\n # commit, contrib will look for files that match the patterns in each\n # part. For a simple repo, you may only need one regular expression\n # per part. In Spack, the packages have moved around in the repo over\n # time, so we provide multiple patterns. Contrib will use the first\n # pattern matched by any file in each commit.\n parts:\n packages:\n - ^var/spack/repos/builtin/packages/.*\\.py$\n - ^var/spack/packages/.*\\.py$\n - ^lib/spack/spack/packages/.*\\.py$\n```\n\nThe `repo` needs to be in your local filesystem, preferably in the same\ndirectory as `contrib.yaml`. `orgmap` is optional (see below for how to\ngenerate it). `parts` is also optional; if you do not specify it, there\nwill be one part called `all` that matches everything:\n\n```yaml\n parts:\n all:\n - ^.*$\n```\n\nYou can name your parts anything; see the example above for how to model\na repository where different logical parts have moved around in\nsubdirectories.\n\n\n### Mapping authors to organizations\n\n\nThe `orgmap` (`author-to-org.json` in the example above) is optional. If\nyou choose to provide it, it should be simple `json` dictionary mapping\nauthors to organizations:\n\n```json\n{\n \"Author 1\": \"UIUC\",\n \"Author 2\": \"LBL\",\n ...\n \"Author N\": \"LLNL\"\n}\n```\n\nYou can run `contrib --update-org-map` to generate an `orgmap` to start\nwith. `contrib` will look at your repository's history and generate the\nfile automatically:\n\n```console\n$ contrib --update-org-map\n==> Added 503 new authors to 'author-to-org.json'\n==> New orgmap file created in 'author-to-org.json'.\n==> Add it to './contrib.yaml' like this:\n\n contrib:\n orgmap: author-to-org.json\n\n```\n\nIf you then add this file to your `contrib.yaml`, you can update it later\nas your repository evolves:\n\n```console\n$ contrib --update-org-map\n==> Added 10 new authors to 'author-to-org.json'\n```\n\nNewly added authors will be labeled as `unknown ` in the\n`json` file:\n\n```json\n \"Author 1\": \"unknown \",\n \"Author 2\": \"unknown <444532+someusername@users.noreply.github.com>\",\n \"Author 3\": \"unknown \",\n```\n\nYou can replace these with valid organizations, or just leave them and\nthey'll show up as \"unknown\" in the `contrib` plots.\n\n### Running\n\nOnce you've got all of that set up, you can run `contrib` in the\ndirectory where `contrib.yaml` lives:\n\n```console\n$ ls\nauthor-to-org.json contrib.yaml\n$ contrib\n==> Indexing 49 commits.\n\nSTARTED 0/49 53ab298e88f80454f7f7c20ef200a3dbd0870473\n packages: processed 45/3487 blames (9.04/s)\n...\n```\n\nBy default, `contrib` will sample 50 commits from your repository and\nplot them. If you want it to plot fewer samples, you can run `contrib\n--samples SAMPLES` where `SAMPLES` is a number of your choosing.\n`contrib` tries to use the available processors on the machine it is\nrun, and by default it will run parallel `git blame` jobs. You can\ncontrol the parallelism with the `--jobs JOBS` argument.\n\n`contrib` has to run `git blame` for each sampled commit and for each\nfile matched by the `parts` section of your `contrib.yaml` file (or for\nall files if `parts` is not provided), so it can take a long time to run\nif your repo's history is long. `contrib`'s output shows how many `git\nblame` calls remain and how fast blames are currently completing.\n\n### Cached data\n\n`contrib` caches results of `git blame` in a directory called\n`line-data`. For large repositories, this can get to be quite large, so\nmake sure you have a decent amount of space available (gigabytes for\nlarge repositories).\n\n## License\n\nContrib is part of the Spack project. Spack is distributed under the\nterms of both the MIT license and the Apache License (Version 2.0). Users\nmay choose either license, at their option.\n\nAll new contributions must be made under both the MIT and Apache-2.0\nlicenses.\n\nSee [LICENSE-MIT](https://github.com/spack/contrib/blob/master/LICENSE-MIT),\n[LICENSE-APACHE](https://github.com/spack/contrib/blob/master/LICENSE-APACHE),\n[COPYRIGHT](https://github.com/spack/contrib/blob/master/COPYRIGHT), and\n[NOTICE](https://github.com/spack/contrib/blob/master/NOTICE) for details.\n\nSPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nLLNL-CODE-647188\n\n\n", "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/spack/contrib", "keywords": "", "license": "Apache-2.0 OR MIT", "maintainer": "", "maintainer_email": "", "name": "contrib", "package_url": "https://pypi.org/project/contrib/", "platform": "", "project_url": "https://pypi.org/project/contrib/", "project_urls": { "Homepage": "https://github.com/spack/contrib" }, "release_url": "https://pypi.org/project/contrib/0.3.0/", "requires_dist": [ "python-dateutil", "jsonschema", "matplotlib", "pyyaml", "setuptools" ], "requires_python": ">=3.6", "summary": "A python package for making stacked area plots of contributions over time.", "version": "0.3.0" }, "last_serial": 5875057, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c33c4325db09f8283adb0c7ed865c901", "sha256": "b384961a3725c9128fc532b3503352c1065362f2ed9238c5a130213216cc9dac" }, "downloads": -1, "filename": "contrib-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c33c4325db09f8283adb0c7ed865c901", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15243, "upload_time": "2019-09-23T03:45:08", "url": "https://files.pythonhosted.org/packages/b8/d0/886f557f261e9bff0094e836914a10a52a1f100eaceaac2c8bb6269e19f8/contrib-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0157d301431fba196f8b5e5499f62cb4", "sha256": "310e03729d708062d0468d4db98439e9e11a6fc5048389341fca05b8b6de76fe" }, "downloads": -1, "filename": "contrib-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0157d301431fba196f8b5e5499f62cb4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8996, "upload_time": "2019-09-23T03:45:11", "url": "https://files.pythonhosted.org/packages/15/89/6fff286697e245bff39b38944bc12c62780ebd55110fd44f36926a3e8afc/contrib-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "18ed15e12e52f81719f192e0851bf252", "sha256": "48246e7b197bfc2b98c87e1fb1c8c96a1a85779f1ae3cc8c671451e9c3979428" }, "downloads": -1, "filename": "contrib-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "18ed15e12e52f81719f192e0851bf252", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16085, "upload_time": "2019-09-23T16:13:03", "url": "https://files.pythonhosted.org/packages/10/e8/7be788160d180725063fcfefd72c167dbecf79d861d53cc81942db338357/contrib-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cd3d59664f21d3dfb94fe443e8e48b7", "sha256": "4891caada376f5da2af45db8b6057def2ab093950c0cd7bce0dc15f3034613c1" }, "downloads": -1, "filename": "contrib-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2cd3d59664f21d3dfb94fe443e8e48b7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9877, "upload_time": "2019-09-23T16:13:05", "url": "https://files.pythonhosted.org/packages/22/90/731bb04d492dfd95241cde8a40b1e8f65d68db2fa6aea81db604557f28ae/contrib-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "5b34604f681988c524a7dade1b8e35a1", "sha256": "3f644c778d453b993d5f1ad8e37289971bc0a26ab73ebcefd3072c62614696c1" }, "downloads": -1, "filename": "contrib-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5b34604f681988c524a7dade1b8e35a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16085, "upload_time": "2019-09-23T16:17:40", "url": "https://files.pythonhosted.org/packages/c0/70/da7d0ac1e935646c9b1b44259645cb2c47a223fbe05903441f8a71a6cc01/contrib-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "469a6aada3ca2a485facb007d15e592d", "sha256": "527b45ce25e4408532f2df600aae90dd4d18f0807b17c8982e5f88d7ec2be345" }, "downloads": -1, "filename": "contrib-0.2.1.tar.gz", "has_sig": false, "md5_digest": "469a6aada3ca2a485facb007d15e592d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9860, "upload_time": "2019-09-23T16:17:42", "url": "https://files.pythonhosted.org/packages/3e/6c/2d5f5748d86d45803806d380ff510539fdf029736f87c5f451dfa0009efc/contrib-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a4774bea8b009df737fd92323153d7ee", "sha256": "be9e35bc15b9e73b2c40ab94b0f20695ac1af5f2792610c959f64db4de438e91" }, "downloads": -1, "filename": "contrib-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4774bea8b009df737fd92323153d7ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16670, "upload_time": "2019-09-23T17:48:41", "url": "https://files.pythonhosted.org/packages/8f/7d/62e5220e638d2b0defd9d5fd52c70cb89e372519d7941dd5cc7924b8c7b9/contrib-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c43e2594f221d6276b453d94ee894485", "sha256": "55cf3a414c8b136f58588ec02e6833d1cc1d227a78f1778354ac6fcf9c2ccdda" }, "downloads": -1, "filename": "contrib-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c43e2594f221d6276b453d94ee894485", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11308, "upload_time": "2019-09-23T17:48:43", "url": "https://files.pythonhosted.org/packages/9c/74/6ae5c7253c958bf6678ea3d8ce049361ae097ea9164ceed3572a32fd5762/contrib-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4774bea8b009df737fd92323153d7ee", "sha256": "be9e35bc15b9e73b2c40ab94b0f20695ac1af5f2792610c959f64db4de438e91" }, "downloads": -1, "filename": "contrib-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4774bea8b009df737fd92323153d7ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16670, "upload_time": "2019-09-23T17:48:41", "url": "https://files.pythonhosted.org/packages/8f/7d/62e5220e638d2b0defd9d5fd52c70cb89e372519d7941dd5cc7924b8c7b9/contrib-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c43e2594f221d6276b453d94ee894485", "sha256": "55cf3a414c8b136f58588ec02e6833d1cc1d227a78f1778354ac6fcf9c2ccdda" }, "downloads": -1, "filename": "contrib-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c43e2594f221d6276b453d94ee894485", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11308, "upload_time": "2019-09-23T17:48:43", "url": "https://files.pythonhosted.org/packages/9c/74/6ae5c7253c958bf6678ea3d8ce049361ae097ea9164ceed3572a32fd5762/contrib-0.3.0.tar.gz" } ] }