Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 8718914

Browse files
Vyacheslav-Smirnovshssf
authored andcommitted
Make coverage work (#306)
* Point source file directly to coverage * Fix typo in test.py * Fix another typo in test.py * Fix issue in test.py * Remove .coveragerc config * Update status badge for coverage; add status badge for Azure * Change badge for coveralls
1 parent fafca6c commit 8718914

3 files changed

Lines changed: 18 additions & 22 deletions

File tree

‎.coveragerc‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎README.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ Intel® Scalable Dataframe Compiler
44

55
.. image:: https://travis-ci.com/IntelPython/sdc.svg?branch=master
66
:target: https://travis-ci.com/IntelPython/sdc
7+
:alt: Travis CI
8+
9+
.. image:: https://dev.azure.com/IntelPython/HPAT/_apis/build/status/IntelPython.sdc?branchName=master
10+
:target: https://dev.azure.com/IntelPython/HPAT/_build/latest?definitionId=2&branchName=master
11+
:alt: Azure Pipelines
712

813
.. image:: https://coveralls.io/repos/github/IntelPython/sdc/badge.svg?branch=master
914
:target: https://coveralls.io/github/IntelPython/sdc?branch=master
15+
:alt: Coveralls
1016

1117
A compiler-based framework for big data in Python
1218
#################################################

‎buildscripts/test.py‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,22 @@
108108

109109

110110
if run_coverage == 'True':
111+
if platform.system() == 'Windows':
112+
format_print('Coverage can be run only on Linux of mac for now')
113+
sys.exit(0)
114+
115+
os.environ['HDF5_DIR'] = conda_prefix
116+
coverage_omit = './sdc/ml/*,./sdc/xenon_ext.py,./sdc/ros.py,./sdc/cv_ext.py,./sdc/tests/*'
117+
coverage_cmd = ' && '.join(['coverage erase',
118+
f'coverage run --source=./sdc --omit {coverage_omit} ./sdc/runtests.py',
119+
'coveralls -v'])
120+
111121
format_print('Run coverage')
112122
format_print(f'Assume that SDC is installed in develop build-mode to {develop_env} environment', new_block=False)
113123
format_print('Install scipy and coveralls')
114124
run_command(f'{develop_env_activate} && conda install -q -y scipy coveralls')
115-
os.environ['PYTHONPATH'] = '.'
116-
os.environ['HDF5_DIR'] = conda_prefix
117-
try:
118-
run_command(f'{develop_env_activate} && python -m sdc.tests.gen_test_data && coverage erase && coverage run -m sdc.runtests && coveralls -v')
119-
except:
120-
format_print('Coverage fails')
121-
print(traceback.format_exc())
125+
run_command(f'{develop_env_activate} && python -m sdc.tests.gen_test_data')
126+
run_command(f'{develop_env_activate} && {coverage_cmd}')
122127
sys.exit(0)
123128

124129
if test_mode == 'develop':

0 commit comments

Comments
 (0)