[ 
https://issues.apache.org/jira/browse/SINGA-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16923409#comment-16923409
 ] 

Moaz Reyad edited comment on SINGA-485 at 9/9/19 9:47 AM:
----------------------------------------------------------

??In fact, the current travis configuration will run the unit tests for python 
via conda test??

Yes, the current Travis configuration runs Python unit tests (instead of C++ 
unit tests) in the C++ CI tasks. So there are two problems:
 # It does not run the C++ unit tests, which is supposed to happen because only 
[C++ 
language|https://github.com/apache/incubator-singa/blob/master/.travis.yml#L19] 
is given in the [build matrix|https://docs.travis-ci.com/user/build-matrix/].
 # It runs Python unit tests on the C++ build machines that are not prepared to 
support Python. It installs Python on the C++ build machines instead of using 
Python CI build by adding language:python to the build matrix. It also seems to 
test both [Python 
3.6|https://github.com/apache/incubator-singa/blob/master/tool/conda/singa/conda_build_config.yaml#L33]
 and [Python 
3.7|https://github.com/apache/incubator-singa/blob/master/tool/conda/singa/conda_build_config.yaml#L34]
 in the same item.

Some refactoring is required here in my opinion.

??Does the code coverage analysis give us a report on how to improve the code??

It will give a report on which parts of the code is not executed by the test. 
Here are some examples from Apache project that use 
[codecov|https://codecov.io/gh/apache?page=1] and 
[coverall|https://coveralls.io/github/apache?page=1].


was (Author: moazreyad):
??In fact, the current travis configuration will run the unit tests for python 
via conda test??

Yes, the current Travis configuration runs Python unit tests (instead of C++ 
unit tests) in the C++ CI tasks. So there are two problems:
 # It does not run the C++ unit tests, which is supposed to happen because only 
[C++ 
language|https://github.com/apache/incubator-singa/blob/master/.travis.yml#L19] 
is given in the [build matrix|https://docs.travis-ci.com/user/build-matrix/].
 # It runs Python unit tests on the C++ build machines that are not prepared to 
support Python. It installs Python on the C++ build machines instead of using 
Python CI build by adding language:python to the build matrix. It also seems to 
test both Python 2 and Python 3 in the same item.

Some refactoring is required here in my opinion.

??Does the code coverage analysis give us a report on how to improve the code??

It will give a report on which parts of the code is not executed by the test. 
Here are some examples from Apache project that use 
[codecov|https://codecov.io/gh/apache?page=1] and 
[coverall|https://coveralls.io/github/apache?page=1].

> Code Coverage Analysis
> ----------------------
>
>                 Key: SINGA-485
>                 URL: https://issues.apache.org/jira/browse/SINGA-485
>             Project: Singa
>          Issue Type: Improvement
>            Reporter: Moaz Reyad
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> SINGA development and testing can be improved by using a [code 
> coverage|https://en.wikipedia.org/wiki/Code_coverage] tool.
> Some Apache projects use [codecov|https://codecov.io/gh/apache?page=1], while 
> others use [coverall|https://coveralls.io/github/apache?page=1].
> This issue is open to choose a code coverage tool and add it to SINGA build 
> and test pipeline.
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to