{"id":19882239,"url":"https://github.com/codeclimate/python-test-reporter","last_synced_at":"2025-05-02T14:31:56.916Z","repository":{"id":60721978,"uuid":"55256126","full_name":"codeclimate/python-test-reporter","owner":"codeclimate","description":"DEPRECATED Uploads Python test coverage data to Code Climate ","archived":false,"fork":false,"pushed_at":"2018-02-26T15:42:47.000Z","size":54,"stargazers_count":19,"open_issues_count":0,"forks_count":11,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-04-14T11:55:02.810Z","etag":null,"topics":["ci","code-quality","codeclimate","continuous-integration","coverage-report","python","quality","test-coverage"],"latest_commit_sha":null,"homepage":"https://codeclimate.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeclimate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-01T19:08:34.000Z","updated_at":"2023-02-13T16:29:48.000Z","dependencies_parsed_at":"2022-10-03T20:32:06.026Z","dependency_job_id":null,"html_url":"https://github.com/codeclimate/python-test-reporter","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fpython-test-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fpython-test-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fpython-test-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fpython-test-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeclimate","download_url":"https://codeload.github.com/codeclimate/python-test-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315108,"owners_count":17290992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","code-quality","codeclimate","continuous-integration","coverage-report","python","quality","test-coverage"],"created_at":"2024-11-12T17:16:53.344Z","updated_at":"2024-11-12T17:16:53.420Z","avatar_url":"https://github.com/codeclimate.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codeclimate-test-reporter - [DEPRECATED]\n\nThese configuration instructions refer to a language-specific test reporter which is now deprecated in favor of our new unified test reporter client. The [new test reporter](https://docs.codeclimate.com/v1.0/docs/configuring-test-coverage) is faster, distributed as a static binary, has support for parallelized CI builds, and will receive ongoing support by the team here. The existing test reporters for Ruby, Python, PHP, and Javascript are now deprecated.\n[![Code Climate][cc-badge]][cc-repo]\n[![Test Coverage][cc-coverage-badge]][cc-coverage]\n[![PyPI version][pypy-badge]][pypy]\n\n[cc-badge]: https://codeclimate.com/github/codeclimate/python-test-reporter/badges/gpa.svg\n[cc-coverage-badge]: https://codeclimate.com/github/codeclimate/python-test-reporter/badges/coverage.svg\n[cc-repo]: https://codeclimate.com/github/codeclimate/python-test-reporter\n[cc-coverage]: https://codeclimate.com/github/codeclimate/python-test-reporter/coverage\n[pypy-badge]: https://badge.fury.io/py/codeclimate-test-reporter.svg\n[pypy]: https://pypi.python.org/pypi/codeclimate-test-reporter\n\nCollects test coverage data from your Python test suite and sends it to Code\nClimate's hosted, automated code review service.\n\nCode Climate - [https://codeclimate.com][codeclimate.com]\n\n## Uploading Your Test Coverage Report\n\nThe `codeclimate-test-reporter` is compatible with [coverage.py][] coverage\nreports. By default, coverage.py will generate a `.coverage` file in the current\ndirectory. `codeclimate-test-reporter`, run without arguments, will\nlook for a coverage report at this default location.\n\n[coverage.py]: https://coverage.readthedocs.org/\n\nNote: The `codeclimate-test-reporter` requires a repo token from\n[codeclimate.com][], so if you don't have one, the first step is to [signup][]\nand configure your repo.  Then:\n\n[codeclimate.com]: https://codeclimate.com\n[signup]: https://codeclimate.com/signup\n\nYou can place the repo token in the environment under the key\n`CODECLIMATE_REPO_TOKEN` or pass the token as a CLI argument:\n\n```console\n$ CODECLIMATE_REPO_TOKEN=[token] codeclimate-test-reporter\nSubmitting payload to https://codeclimate.com... done!\n```\n\n```console\n$ codeclimate-test-reporter --token [token]\nSubmitting payload to https://codeclimate.com... done!\n```\n\nWe recommend configuring the repo token in the environment through your CI\nsettings which will hide the value during runs. The token should be considered a\nscoped password. Anyone with the token can submit test coverage data to your\nCode Climate repo.\n\n```console\n# CODECLIMATE_REPO_TOKEN already set in env\n$ codeclimate-test-reporter\nSubmitting payload to https://codeclimate.com... done!\n```\n\n### Generating Coverage Reports\n\nTo generate a coverage report with [pytest][], you can use the [pytest-cov][]\nplugin:\n\n```console\n$ py.test --cov=your_package tests/\nTOTAL                                                     284     27    90%\n\n======================== 14 passed in 0.75 seconds ========================\n```\n\nTo generate a coverage report with [nose][], you can use the [nose cover plugin][]:\n\n[pytest]: http://pytest.org\n[nose]: https://nose.readthedocs.org\n[pytest-cov]: https://pypi.python.org/pypi/pytest-cov\n[nose cover plugin]: https://nose.readthedocs.org/en/latest/plugins/cover.html\n\n```console\n$ nosetests --with-coverage --cover-erase --cover-package=your_package\nTOTAL                                                284     27    90%\n----------------------------------------------------------------------\nRan 14 tests in 0.743s\n\nOK\n```\n\nBy default, coverage.py will create the test coverage report at `./.coverage`.\nIf you configure coverage.py to generate a coverage report at an alternate\nlocation, pass that to the `codeclimate-test-reporter`:\n\n```console\n$ codeclimate-test-reporter --file ./alternate/location/.coverage\nSubmitting payload to https://codeclimate.com... done!\n```\n\n## Installation\n\nYou can install the codeclimate-test-reporter using pip:\n\n```console\n$ pip install codeclimate-test-reporter\nSuccessfully installed codeclimate-test-reporter-[version]\n```\n\nOr you can add the reporter to your `requirements.txt` file and install it along\nwith other project dependencies:\n\n```txt\n# requirements.txt\ncodeclimate-test-reporter\n```\n\n```console\n$ pip install -r requirements.txt\nSuccessfully installed codeclimate-test-reporter-[version]\n```\n\n## Important FYIs\n\nAcross the many different testing frameworks, setups, and environments, there\nare lots of variables at play. Before setting up test coverage, it's important\nto understand what we do and do not currently support:\n\n* **Single payload:** We currently only support a single test coverage payload\n  per commit. If you run your tests in multiple steps, or via parallel tests,\n  Code Climate will only process the first payload that we receive. If you are\n  using a CI, be sure to check if you are running your tests in a parallel mode.\n\n  **Note:** If you've configured Code Climate to analyze multiple languages in\n  the same repository (e.g., Python and JavaScript), we can nonetheless only\n  process test coverage information for one of these languages. We'll process\n  the first payload that we receive.\n\n* **Invalid File Paths:** By default, our test reporters expect your application\n  to exist at the root of your repository. If this is not the case, the file\n  paths in your test coverage payload will not match the file paths that Code\n  Climate expects.\n\n## Troubleshooting\n\nIf you're having trouble setting up or working with our test coverage feature,\nsee our detailed [help doc][], which covers the most common issues encountered.\n\n[help doc]: http://docs.codeclimate.com/article/220-help-im-having-trouble-with-test-coverage\n\nIf the issue persists, feel free to [open up an issue][issue] here or contact\nhelp with debug information from the reporter:\n\n[issue]: https://github.com/codeclimate/python-test-reporter/issues/new\n\n```console\n$ codeclimate-test-reporter --debug\ncodeclimate-test-reporter [version]\nRequests 2.9.1\nPython 3.5.1 (default, Jan 22 2016, 08:54:32)\n[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]\n/usr/local/opt/python3/bin/python3.5\nDarwin 15.4.0\n```\n\n## Contributions\n\nPatches, bug fixes, feature requests, and pull requests are welcome.\n\n## Development\n\nA `Dockerfile` is included for developer convenience. Simply run `make test` to\nrun the test suite and coverage report.\n\nTo release a new version, first run `./bin/prep-release [version]` to bump the\nversion and open a PR on GitHub.\n\nOnce the PR is merged, run `make release` to publish the new version to pypy and\ncreate a tag on GitHub. This step requires pypy credentials at `~/.pypirc`. You\ncan copy this repo's `.pypirc.sample` file as a starting point.\n\n## Copyright\n\nSee [LICENSE.txt][license]\n\n[license]: https://github.com/codeclimate/python-test-reporter/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeclimate%2Fpython-test-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeclimate%2Fpython-test-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeclimate%2Fpython-test-reporter/lists"}