Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add python codecov #2976

Merged
merged 13 commits into from Feb 5, 2020
Merged

add python codecov #2976

merged 13 commits into from Feb 5, 2020

Conversation

guihao-liang
Copy link
Collaborator

add pytest-cov plugin to generate the report for the test coverage for our python source file. This test coverage doesn't cover C++ implementation code.

Sample output.

src/python/turicreate/_connect/main.py                                                    29     29     0%
src/python/turicreate/_gl_pickle.py                                                      165    165     0%
src/python/turicreate/_json.py                                                            16     16     0%
src/python/turicreate/_scripts/_pylambda_worker.py                                        56     56     0%
src/python/turicreate/_sys_util.py                                                       221    221     0%
src/python/turicreate/aggregate.py                                                        49     49     0%
src/python/turicreate/data_structures/gframe.py                                          163    163     0%
src/python/turicreate/data_structures/grouped_sframe.py                                   34     34     0%
src/python/turicreate/data_structures/image.py                                            81     81     0%
src/python/turicreate/data_structures/sarray.py                                          820    820     0%
src/python/turicreate/data_structures/sarray_builder.py                                   34     34     0%
src/python/turicreate/data_structures/sframe.py                                         1450   1450     0%
src/python/turicreate/data_structures/sframe_builder.py                                   56     56     0%
src/python/turicreate/data_structures/sgraph.py                                          369    369     0%
src/python/turicreate/data_structures/sketch.py                                           98     98     0%
...

@guihao-liang guihao-liang added this to the 6.2 milestone Feb 1, 2020
@guihao-liang guihao-liang self-assigned this Feb 1, 2020
@guihao-liang
Copy link
Collaborator Author

downstream of #2973

@@ -18,9 +18,9 @@ WORKSPACE=${SCRIPT_DIR}/..

unset PYTHONPATH

cd $WORKSPACE
cd "$WORKSPACE"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "$WORKSPACE" the same as ${WORKSPACE}?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the quotes are intentional. https://github.com/koalaman/shellcheck/wiki/SC2086

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you use this tool called shellcheck along with pre-commit.

@guihao-liang guihao-liang requested review from TobyRoseman and removed request for nickjong February 5, 2020 18:56
echo $cmd
cmd="${cmd} ${PYTEST_EXECUTABLE} --cov -v $PYTHONPATH/turicreate/test \
--junit-xml=alltests.pytest.xml"
echo "$cmd"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to remove this echo. Especially since set -x is included at the top of the script.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right! will do.

@guihao-liang
Copy link
Collaborator Author

pass internal tests.

@guihao-liang guihao-liang merged commit c4057d3 into apple:master Feb 5, 2020
@guihao-liang guihao-liang deleted the 01-30-codecov branch February 5, 2020 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants