PyUCIS

raw JSON →
0.2.0.22787133465 verified Fri May 01 auth: no python

PyUCIS provides a Python API for manipulating UCIS (Unified Coverage Interoperability Standard) coverage data. It supports reading, merging, and writing UCIS XML coverage databases. The current version is 0.2.0.22787133465, with regular updates for format compatibility and bug fixes.

pip install pyucis
error ModuleNotFoundError: No module named 'pyucis'
cause PyUCIS is not installed or installed in a different Python environment.
fix
Run 'pip install pyucis' in your active environment.
error ValueError: Unsupported file format
cause Attempting to load a binary .ucis file that is not in XML format.
fix
Convert your coverage data to UCIS XML format before loading with PyUCIS.
error AttributeError: 'UCISDB' object has no attribute 'scope'
cause Misspelled attribute name; the correct attribute is 'scopes' (plural).
fix
Use 'db.scopes' instead of 'db.scope'.
gotcha PyUCIS only supports UCIS XML format, not binary .ucis files. The library reads and writes XML-based coverage databases.
fix Ensure your UCIS data is in XML format (typically .ucis files with XML content). Binary UCIS databases are not supported.
breaking Version 0.2.0 introduced a new version number format (0.2.0.22787133465) which may indicate significant API changes. The previous version 0.1.5 used a standard semver.
fix Check the documentation for any API changes if upgrading from pre-0.2.0 releases. The import path 'from pyucis import UCISDB' remains unchanged.
gotcha The merge operation mutates the original database object. There is no built-in undo.
fix Create a copy of the database before merging if you need to preserve the original: db_copy = UCISDB(); db_copy.load('original.ucis'); then merge on the copy.

Load a UCIS XML file, merge another, and save the result.

from pyucis import UCISDB

db = UCISDB()
db.load('coverage.ucis')
print(f'Loaded {len(db.scopes)} scopes')
db.merge('another.ucis')
db.save('merged.ucis')