qdiff
qdiff is a command-line tool and Python library for computing differences between two code quality analysis reports. It helps developers and researchers understand how code quality differs between two versions of a project.
qdiff is designed to work both as:
- ✅ an installable console application
- ✅ a reusable Python package
Features
-
🔍 Compare two code quality reports
-
📊 Generate a diff report in a specified output directory
-
🛠️ Supports multiple source tools:
dpy– DPy (for Python code analysis)dc– Designite (for C# code analysis)dj– DesigniteJava (for Java code analysis)
-
🔌 Clean Python API for integration into scripts, experiments, and dashboards
-
🤖 CI-friendly command-line interface
Installation
Prerequisites
- Python 3.9 or higher
pip
Install locally (development mode)
From the project root directory:
pip install -e .
This installs qdiff in editable mode, allowing you to modify the source code without reinstalling.
Verify installation:
qdiff --help
Usage (Command Line)
Basic syntax
qdiff path1 path2 path3 tool
Arguments
| Argument | Description |
|---|---|
path1 |
Path to the first code quality report directory |
path2 |
Path to the second code quality report directory |
path3 |
Path to the output directory for the diff report |
tool |
Source tool that generated the reports (dpy, dc, or dj) |
Example
qdiff reports/v1 reports/v2 reports/diff dpy
This compares:
- report from
reports/v1 - report from
reports/v2 - writes the diff to
reports/diff - assumes reports were generated by DPy
Help
qdiff --help
This displays full usage instructions and available options.
Usage as a Python Library
You can import and use qdiff directly in your Python code.
Example
from qdiff.smell_diff import SmellDiff
# The parameters define the columns in the dataframe to be treated as key and description columns; the description column can be passed an empty list
smell_diff = SmellDiff(['Project', 'Package', 'Class', 'Smell'],['Description'])
# read_csv is a simple function that read csv files using pandas library and return corresponding dataframes
df_old, df_new = read_csv('/path/to/ver1/DesignSmells.csv',
'/path/to/ver2/DesignSmells.csv')
diff_df = smell_diff.diff(df_old, df_new)
Building the Package (Optional)
If you want to create distributable artifacts (wheel + source archive):
Install build tool
python -m pip install build
Build
python -m build
Artifacts will be created in:
dist/
Metadata
Release files for qdiff 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qdiff-1.0.1.tar.gz | 6.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qdiff-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / qdiff-1.0.1.tar.gz
| Download URL | qdiff-1.0.1.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
148b95d6632af7aa00087b1452a36da6d5969f2f5a02fcc9a0df1a3a28311c8b
|
|
BLAKE2b-256 checksum How to use checksums |
25da9608f9b54c463d5f8f357e2301840dc6d59c9b6a75ba463606e37fa32ef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / qdiff-1.0.1-py3-none-any.whl
| Download URL | qdiff-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
194422326fa1335896687446e3b50b0f235a6d37949ff9e06a8764d694457aec
|
|
BLAKE2b-256 checksum How to use checksums |
d3815c8e7e364fae3b4174151a528d75d56873fc10020de280a6b3b6ae27c506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for qdiff 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.