tumb1er / coverage2clover Goto Github PK
View Code? Open in Web Editor NEWA tool to convert python-coverage xml report to Atlassian Clover xml report format.
License: Other
A tool to convert python-coverage xml report to Atlassian Clover xml report format.
License: Other
Using your tool creates above error message right away.
Steps to reproduce:
coverage run --source=<my-package> -m xmlrunner discover -o test-reports
coverage xml
coverage2clover -i coverage.xml -o clover.xml
Error:
coverage2clover -i coverage.xml -o clover.xml
Traceback (most recent call last):
File "/Users/miay/anaconda3/envs/greta/bin/coverage2clover", line 8, in <module>
sys.exit(main())
File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/coverage2clover.py", line 23, in main
cov.open(inputfile)
File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/__init__.py", line 137, in open
c.count_loc(sources)
File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/__init__.py", line 65, in count_loc
filename = os.path.join(source, self.filename)
File "/Users/miay/anaconda3/envs/greta/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Running the tool throws the following deprecation warning.
py3 run-test: commands[2] | python -m unittest tests
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/tests.py:78: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
clover_analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/tests.py:83: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
clover_bin_analysis = pygount.source_analysis(
./Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
analysis = pygount.source_analysis(
Probably should be looked at and fixed.
The latest version of coverage has changed how they output the XML file and this has broken the ability to read the file in this tool. More details in their repo here:
https://bitbucket.org/ned/coveragepy/issues/578/incomplete-file-path-in-xml-report
Python 3.5 reached its EOL on 13th Sept, 2020
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Just curious as to the release support for the packages. Do you plan to continue publishing packages for EOL Python versions as well?
travis-ci does not leave comments under PR, so it's time waste going to travis-ci.org and check every PR
From Windows 10 on Python 3.5 with pip
8.0.2:
pip uninstall coverage2clover
DEPRECATION: Uninstalling a distutils installed project (coverage2clover) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
In setup.py markdown description is supported, it should contain README.md contents.
From #5
Hi Sergey,
I'm unable to find a 'Beer License'.
Did you mean the Beerware license? https://spdx.org/licenses/Beerware.html
If you could add it, having a copy of your intended license text as a LICENSE file would be a big help.
setup.py
from git infofor line in class_info.iter('lines'):
statements += 1
if line.get('hits') == '1':
covered_statements += 1
if line.get('branch') == 'true':
cc = line.get('condition-coverage')
m = re.match(r'([\d]+)%[\s]+\(([\d]+)/([\d]+)\)', cc)
conditions += int(m.group(3))
covered_conditions += int(m.group(2))
Seems that lines
here is invalid tag since hits attribute appears in line
tag
When coverage2clover
is installed on Windows, it does not create a command line program for execution. I suggest using the entry_points
option in setuptools.setup
:
entry_points={
'console_scripts': [
'coverage2clover = cppcheck_junit:main',
],
rather than:
try:
copy("bin/coverage2clover.py", "bin/coverage2clover")
except (OSError, IOError):
pass
optparse
is deprecated. Would be preferred to use argparse
instead.
hello
thanks for your package
could you please prepare a new release in order to support coverage >= 7.0
at the moment, the requirements expect coverage < 7.0
regards
after the 2.0.0 update we are getting this error:
Traceback (most recent call last):
File "/opt/project/venv/bin/coverage2clover", line 10, in
sys.exit(main())
File "/opt/project/venv/lib/python3.6/site-packages/clover/coverage2clover.py", line 23, in main
cov.open(inputfile)
File "/opt/project/venv/lib/python3.6/site-packages/clover/init.py", line 137, in open
c.count_loc(sources)
File "/opt/project/venv/lib/python3.6/site-packages/clover/init.py", line 70, in count_loc
fallback_encoding='utf-8')
File "/opt/project/venv/lib/python3.6/site-packages/pygount/analysis.py", line 512, in source_analysis
elif not has_lexer(source_path):
File "/opt/project/venv/lib/python3.6/site-packages/pygount/analysis.py", line 465, in has_lexer
result = bool(pygments.lexers.find_lexer_class_for_filename(source_path))
File "/opt/project/venv/lib/python3.6/site-packages/pygments/lexers/init.py", line 168, in find_lexer_class_for_filename
for cls in find_plugin_lexers():
File "/opt/project/venv/lib/python3.6/site-packages/pygments/plugin.py", line 53, in find_plugin_lexers
yield entrypoint.load()
File "/opt/project/venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/opt/project/venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/opt/project/venv/lib/python3.6/site-packages/IPython/init.py", line 55, in
from .terminal.embed import embed
File "/opt/project/venv/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/opt/project/venv/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 80, in
if not _stream or not hasattr(_stream, 'isatty') or not _stream.isatty():
ValueError: I/O operation on closed file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.