codeclimate / python-test-reporter

DEPRECATED Uploads Python test coverage data to Code Climate
https://codeclimate.com
Other
19 stars 11 forks source link

Initial Implementation #1

Closed dblandin closed 8 years ago

dblandin commented 8 years ago

This PR contains the initial implementation for our python test reporter. The reporter supports Coverage.py, which is a popular Python tool for measuring code coverage. This project has been influenced by the interface of two coveralls reporters which read the a Coverage.py coverage file from the default location of ./.coverage.

Coverage.py has a few reporters available. The one that I thought made most sense to use was the XML reporter, so the package is currently generating that report to then read and parse while generating a JSON payload for our API.

@codeclimate/review :mag_right:

Project structure

├── reporter
│   ├── __main__.py # <- package entry point
│   ├── components # <- package components
│   └── tests # <- package tests
│       ├── fixtures
├── setup.py # <- package definition

CLI

$ codeclimate-test-reporter --help
usage: codeclimate-test-reporter [-h] [--file FILE] [--token TOKEN] [--stdout]
                                 [--debug] [--version]

Report test coverage to Code Climate

optional arguments:
  -h, --help     show this help message and exit
  --file FILE    A coverage.py coverage file to report
  --token TOKEN  Code Climate repo token
  --stdout       Output to STDOUT
  --debug        Enable debug mode
  --version      Show the version

Todo

dblandin commented 8 years ago

@codeclimate/review This is ready for another :mag_right: !

gdiggs commented 8 years ago

Seems cool to me! If it works for you locally I say :shipit:

dblandin commented 8 years ago

Seems cool to me! If it works for you locally I say :shipit:

Sounds good! I'll work on the docs in a separate PR.