Giter Site home page Giter Site logo

codeclimate / python-test-reporter Goto Github PK

View Code? Open in Web Editor NEW
19.0 20.0 11.0 54 KB

DEPRECATED Uploads Python test coverage data to Code Climate

Home Page: https://codeclimate.com

License: Other

Makefile 2.28% Shell 4.65% Python 93.06%
python ci test-coverage continuous-integration codeclimate coverage-report quality code-quality

python-test-reporter's Introduction

codeclimate-test-reporter - [DEPRECATED]

These 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 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. Code Climate Test Coverage PyPI version

Collects test coverage data from your Python test suite and sends it to Code Climate's hosted, automated code review service.

Code Climate - https://codeclimate.com

Uploading Your Test Coverage Report

The codeclimate-test-reporter is compatible with coverage.py coverage reports. By default, coverage.py will generate a .coverage file in the current directory. codeclimate-test-reporter, run without arguments, will look for a coverage report at this default location.

Note: The codeclimate-test-reporter requires a repo token from codeclimate.com, so if you don't have one, the first step is to signup and configure your repo. Then:

You can place the repo token in the environment under the key CODECLIMATE_REPO_TOKEN or pass the token as a CLI argument:

$ CODECLIMATE_REPO_TOKEN=[token] codeclimate-test-reporter
Submitting payload to https://codeclimate.com... done!
$ codeclimate-test-reporter --token [token]
Submitting payload to https://codeclimate.com... done!

We recommend configuring the repo token in the environment through your CI settings which will hide the value during runs. The token should be considered a scoped password. Anyone with the token can submit test coverage data to your Code Climate repo.

# CODECLIMATE_REPO_TOKEN already set in env
$ codeclimate-test-reporter
Submitting payload to https://codeclimate.com... done!

Generating Coverage Reports

To generate a coverage report with pytest, you can use the pytest-cov plugin:

$ py.test --cov=your_package tests/
TOTAL                                                     284     27    90%

======================== 14 passed in 0.75 seconds ========================

To generate a coverage report with nose, you can use the nose cover plugin:

$ nosetests --with-coverage --cover-erase --cover-package=your_package
TOTAL                                                284     27    90%
----------------------------------------------------------------------
Ran 14 tests in 0.743s

OK

By default, coverage.py will create the test coverage report at ./.coverage. If you configure coverage.py to generate a coverage report at an alternate location, pass that to the codeclimate-test-reporter:

$ codeclimate-test-reporter --file ./alternate/location/.coverage
Submitting payload to https://codeclimate.com... done!

Installation

You can install the codeclimate-test-reporter using pip:

$ pip install codeclimate-test-reporter
Successfully installed codeclimate-test-reporter-[version]

Or you can add the reporter to your requirements.txt file and install it along with other project dependencies:

# requirements.txt
codeclimate-test-reporter
$ pip install -r requirements.txt
Successfully installed codeclimate-test-reporter-[version]

Important FYIs

Across the many different testing frameworks, setups, and environments, there are lots of variables at play. Before setting up test coverage, it's important to understand what we do and do not currently support:

  • Single payload: We currently only support a single test coverage payload per commit. If you run your tests in multiple steps, or via parallel tests, Code Climate will only process the first payload that we receive. If you are using a CI, be sure to check if you are running your tests in a parallel mode.

    Note: If you've configured Code Climate to analyze multiple languages in the same repository (e.g., Python and JavaScript), we can nonetheless only process test coverage information for one of these languages. We'll process the first payload that we receive.

  • Invalid File Paths: By default, our test reporters expect your application to exist at the root of your repository. If this is not the case, the file paths in your test coverage payload will not match the file paths that Code Climate expects.

Troubleshooting

If you're having trouble setting up or working with our test coverage feature, see our detailed help doc, which covers the most common issues encountered.

If the issue persists, feel free to open up an issue here or contact help with debug information from the reporter:

$ codeclimate-test-reporter --debug
codeclimate-test-reporter [version]
Requests 2.9.1
Python 3.5.1 (default, Jan 22 2016, 08:54:32)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
/usr/local/opt/python3/bin/python3.5
Darwin 15.4.0

Contributions

Patches, bug fixes, feature requests, and pull requests are welcome.

Development

A Dockerfile is included for developer convenience. Simply run make test to run the test suite and coverage report.

To release a new version, first run ./bin/prep-release [version] to bump the version and open a PR on GitHub.

Once the PR is merged, run make release to publish the new version to pypy and create a tag on GitHub. This step requires pypy credentials at ~/.pypirc. You can copy this repo's .pypirc.sample file as a starting point.

Copyright

See LICENSE.txt

python-test-reporter's People

Contributors

buonomo avatar davehenton avatar dblandin avatar pbrisbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-test-reporter's Issues

Override error return code (blocking CI)

If the codeclimate-test-reporter encounters an error unrelated to coverage - e.g. requests.exceptions.Timeout (https://github.com/codeclimate/python-test-reporter/blob/master/codeclimate_test_reporter/components/runner.py#L59) it will return a status code of 1, indicating an exception. This causes our CI (Codeship) to register a test run failure - in a specific case today we were getting 502 responses from the Codeclimate API - which was killing our builds, despite our test suite passing.

In this situation, our preference would be to fail on the exception by default (the current behaviour - so we know that there is a possible API issue), but then to be able to override this manually, for instance by setting an env var:

CODECLIMATE_FAIL_ON_ERROR=False

We could then set this env var when we know there is an issue, and then unset it once the issue has passed. Codeclimate is important for us, but not a deployment blocker - and since we have automated deployments running on a successful build, test run failures can have a significant impact.

Reporter says upload done, no data reaches codeclimate?

I've got a question regarding what could go wrong when the script says an upload is done but in fact codeclimate still tells me that test coverage was not setup. As can be seen the same commit sha is present in both screen shots.

screenshot from 2016-06-14 19 10 59

screenshot from 2016-06-14 19 12 29

Allow running without git

We run our tests inside a docker container, the image of which we want to keep as light as possible.

From what I can see the current python plugin assumes git is available, in our case it is not.

Would it be possible to skip the calls to git by providing a GIT_SHA environment varibale?

Appveyor example

Hi,

It would be nice if we could see an example using Appveyor. The syntax on Windows is sufficiently different that it isn't obvious how to make it work.

coverage.py version

pip install codeclimate-test-reporter seems to fail installing coverage >=4.0,<4.4

codeclimate-test-reporter --token $TK
            This reporter is compatible with Coverage.py versions >=4.0,<4.4.
            Your Coverage.py report version is 4.4.1.
            Consider locking your version of Coverage.py to >4,0,<4.4 until the
            following Coverage.py issue is addressed:
            https://bitbucket.org/ned/coveragepy/issues/578/incomplete-file-path-in-xml-report

UnicodeDecode Error

Hi,

Iโ€™m encountering a Python error every time I launch command:

codeclimate-test-reporter --debug --token [my_token]

You can reproduce the error this way:

git clone https://github.com/buonomo/inf8007
cd inf8007
pip install -r requirements.txt
python -m nltk.downloader "stopwords"
coverage run test_td2.py
codeclimate-test-reporter --debug --token [my_token, ask if needed]

Below, the stdout and stderr I obtained.

STDOUT

codeclimate-test-repoter 0.2.0
Requests 2.11.1
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
/usr/bin/python3
Linux 4.4.0-62-genericProcessing file path=td2.py
Processing file path=test_td2.py
Processing file path=/usr/lib/python3/dist-packages/six.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/collections.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/collocations.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/compat.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/data.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/decorators.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/downloader.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/featstruct.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/grammar.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/help.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/internals.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/jsontags.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/lazyimport.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/probability.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/text.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/toolbox.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/tree.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/treetransforms.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/wsd.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/api.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/chart.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/combinator.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/lexicon.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/ccg/logic.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/chunk/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/chunk/api.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/chunk/regexp.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/chunk/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/api.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/decisiontree.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/maxent.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/megam.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/naivebayes.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/positivenaivebayes.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/rte_classify.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/scikitlearn.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/senna.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/tadm.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/textcat.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/classify/weka.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/api.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/em.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/gaac.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/kmeans.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/cluster/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/init.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/aligned.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/api.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/bnc.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/bracket_parse.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/categorized_sents.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/chasen.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/childes.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/chunked.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/cmudict.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/comparative_sents.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/conll.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/crubadan.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/dependency.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/framenet.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/ieer.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/indian.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/ipipan.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/knbc.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/lin.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/mte.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/nkjp.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/nombank.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/nps_chat.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/opinion_lexicon.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/panlex_lite.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/pl196x.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/plaintext.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/ppattach.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/propbank.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/pros_cons.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/reviews.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/rte.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/semcor.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/senseval.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/sentiwordnet.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/sinica_treebank.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/string_category.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/switchboard.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/tagged.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/timit.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/toolbox.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/twitter.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/udhr.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/util.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/verbnet.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/wordlist.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/wordnet.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/xmldocs.py
Processing file path=/usr/local/lib/python3.5/dist-packages/nltk/corpus/reader/ycoe.py

STDERR

Traceback (most recent call last):
File "/usr/local/bin/codeclimate-test-reporter", line 9, in
load_entry_point('codeclimate-test-reporter==0.2.0', 'console_scripts', 'codeclimate-test-reporter')()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/main.py", line 11, in run
sys.exit(runner.run())
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/runner.py", line 49, in run
exit_status = reporter.run()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/reporter.py", line 36, in run
payload = formatter.payload()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/formatter.py", line 20, in payload
source_files = self.__source_files()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/formatter.py", line 58, in __source_files
payload = file_coverage.payload()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/file_coverage.py", line 18, in payload
"blob_id": self.__blob(),
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/file_coverage.py", line 44, in __blob
contents = self.__file_body()
File "/usr/local/lib/python3.5/dist-packages/codeclimate_test_reporter/components/file_coverage.py", line 51, in __file_body
self.file_body = open(self.__filename(), "r", encoding="utf-8-sig").read()
File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
File "/usr/lib/python3.5/encodings/utf_8_sig.py", line 69, in _buffer_decode
return codecs.utf_8_decode(input, errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 6000: invalid continuation byte

UTF-8

Hello dear friends,

I am experiencing a very dirty problem here. I can't manage to find the error.
capture_

My project is not open source, but you can find it if you are working at CodeClimate : https://codeclimate.com/repos/5772aa87f97096006f001cb4/feed

I don't know where this UTF-8 error is coming from ... Everything is in UTF-8 as far as I know in my files.

PS: It's a Django project and the workflow is Git Push => Github => Travis-CI => CodeClimate

Thanks a lot for the help

UnicodeDecodeError when running the reporter

Thanks for releasing a Python reporter!

I tried to run the reporter locally, got the following error.

Note that I have the same error in my build environment. (CodeShip)

My .coverage file.

Hope it helps, do not hesitate if you need any other information.

Packages version

coverage==4.0.3
django-coverage-plugin==1.2
codeclimate-test-reporter==0.1.0

Environment

(env)smalter-retina:expert-adventure smalter$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.5

.coveragerc

[run]
include = sl/*
omit =
  *migrations*
  *commands*
  *autofixtures*
  *tests.py*


plugins = django_coverage_plugin

Traceback

(env)smalter-retina:expert-adventure smalter$ coverage run manage.py test -k
(env)smalter-retina:expert-adventure smalter$ CODECLIMATE_REPO_TOKEN=XYZ codeclimate-test-reporter
Traceback (most recent call last):
  File "/Users/smalter/Repositories/expert-adventure/env/bin/codeclimate-test-reporter", line 11, in <module>
    sys.exit(run())
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/__main__.py", line 11, in run
    sys.exit(runner.run())
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/runner.py", line 49, in run
    exit_status = reporter.run()
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/reporter.py", line 36, in run
    payload = formatter.payload()
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/formatter.py", line 19, in payload
    source_files = self.__source_files()
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/formatter.py", line 54, in __source_files
    payload = file_coverage.payload()
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 13, in payload
    "blob_id": self.__blob(),
  File "/Users/smalter/Repositories/expert-adventure/env/lib/python2.7/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 42, in __blob
    return sha1((header + contents).encode("utf-8")).hexdigest()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2986: ordinal not in range(128)

Test Reporter returning Exit Code 1

Hi Code Climate,

I seem to have frequent issues with some of my Python repos that build on Circle CI - it would appear that the code climate test reporter is having trouble communicating with your servers. It's not permanent and sometimes just resolves itself later in the day but it does happen often enough to send a few alarms that repo tests are breaking when, in fact, they aren't. The stack trace is below.

Thanks Code Climate - you guys and gals are awesome!

Richard

code climate test reporter

Running on Travis-CI fails with No such file or directory: '__init__.py'

I am trying to use codeclimate-test-reporter with Travis-CI, but get the following error:

$ codeclimate-test-reporter --debug --token $CODECLIMATE_REPO_TOKEN
codeclimate-test-repoter 0.2.1
Requests 2.13.0
Python 3.6.1 (default, Apr 21 2017, 17:35:24) 
[GCC 4.6.3]
/home/travis/virtualenv/python3.6.1/bin/python
Linux 4.8.12-040812-genericProcessing file path=__init__.py
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.1/bin/codeclimate-test-reporter", line 11, in <module>
    sys.exit(run())
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/__main__.py", line 11, in run
    sys.exit(runner.run())
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/runner.py", line 49, in run
    exit_status = reporter.run()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/reporter.py", line 36, in run
    payload = formatter.payload()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/formatter.py", line 20, in payload
    source_files = self.__source_files()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/formatter.py", line 58, in __source_files
    payload = file_coverage.payload()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 30, in payload
    "blob_id": self.__blob(),
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 56, in __blob
    contents = self.__file_body()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 63, in __file_body
    self.file_body = read_file_content(self.__filename())
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/codeclimate_test_reporter/components/file_coverage.py", line 16, in read_file_content
    return open(path, "r", encoding="utf-8-sig").read()
FileNotFoundError: [Errno 2] No such file or directory: '__init__.py'

If I run the command manually on a local machine, everything works fine:

[MacBook Pro bsym] $ codeclimate-test-reporter --debug
codeclimate-test-repoter 0.2.1
Requests 2.13.0
Python 3.6.1 (default, Mar 25 2017, 21:33:06) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
/Users/bjm42/.pyenv/versions/3.6.1/bin/python3.6
Darwin 16.5.0Processing file path=bsym/__init__.py
Processing file path=bsym/bsym.py
Processing file path=bsym/configuration.py
Processing file path=bsym/permutations.py
Processing file path=bsym/process.py
Processing file path=bsym/pymatgen_interface.py
Processing file path=bsym/sitelist.py
Processing file path=bsym/spacegroup.py
Processing file path=bsym/symmetry_operation.py
Submitting payload to https://codeclimate.com... CODECLIMATE_REPO_TOKEN is required and not set
done!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.