Compare two smart-card measurement profiles (JSON) using a YAML schema and generate:
- a machine-readable comparison JSON, and
- a self-contained HTML report.
The project is modular: comparators, schemas, and visualizations can be extended without rewriting the core.
verify.py: compares reference vs profile using a schemareport_html.py: turns the verification JSON into an HTML reportdata/style.css+data/script.js: report styling/behavior- YAML schemas: define sections, comparators, and report visuals (
report.types)
- Python: 3.9+ recommended
- pip: installed with Python
Python dependencies (from requirements.txt):
dominate~=2.9.1jsonpickle~=2.0.0flake8~=3.9.0overrides~=7.7.0PyYAML~=6.0.2
git clone https://github.com/crocs-muni/scrutiny-viz.git
cd https://github.com/crocs-muni/scrutiny-viz.gitLinux / macOS
python3 -m venv .venv
source .venv/bin/activateWindows (PowerShell)
py -m venv .venv
.\.venv\Scripts\Activate.ps1If PowerShell blocks activation:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
pip install -r requirements.txtpython verify.py -hpython verify.py \
-s path/to/schema.yml \
-r path/to/reference.json \
-p path/to/profile.json \
-o results/comparison.jsonpython verify.py `
-s .\scrutiny\javacard\modules\jcCPLC.yml `
-r ".\data\examples\CSOB VISA debit.json" `
-p ".\data\examples\CSOB VISA debit.json" `
-o test.json `
-v --print-diffs 100 --print-matches 100 -reppython report_html.py -hpython report_html.py -v test.json -o comparison.htmlThe report is written to the results/ folder (depending on your script config), typically:
results/comparison.html
Each section can specify what is rendered using report.types.
report:
types: ["table"]report:
types:
- type: table
variant: cplcreport:
types:
- type: chart
- type: table
- type: radarIf your build uses “strict types from YAML”, only visuals listed in
report.typeswill be shown.
- Make sure the comparator is registered/imported.
- Ensure the schema uses the correct comparator name.
- Confirm the section has
report.typesset in YAML. - Confirm your “strict YAML” behavior if enabled (no inference).
- Ensure
data/script.jsis present and loaded. - Ensure toggle blocks are created via
show_hide_div(...)so they get the right HTML attributes.
scrutiny/
reporting/
viz/
htmlutils.py
...
data/
style.css
*.json
script.js
schemas/
*.yml
verify.py
report_html.py