visualcheck 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: visualcheck
3
+ Version: 0.1.0
4
+ Summary: Visual regression checking with figma-first baselines, pixel+SSIM diffing, ignore regions, and HTML reports.
5
+ Author-email: Arif Shah <ashah7775@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://bitbucket.org/arif_automation/visualcheck
8
+ Project-URL: Source, https://bitbucket.org/arif_automation/visualcheck
9
+ Keywords: visual-regression,playwright,ssim,qa,figma
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: playwright>=1.40
16
+ Requires-Dist: pillow>=10
17
+ Requires-Dist: numpy>=1.23
18
+ Requires-Dist: opencv-python-headless>=4.8
19
+ Requires-Dist: scikit-image>=0.20
20
+ Requires-Dist: PyYAML>=6
21
+ Requires-Dist: Jinja2>=3
22
+ Requires-Dist: typer>=0.9
23
+ Requires-Dist: rich>=13
24
+ Requires-Dist: jsonschema>=4
25
+
26
+ # visualcheck
27
+
28
+ Visual regression checking with **Figma-first baselines**, **pixel diff + SSIM**, **ignore regions**, and a **self-contained HTML report**.
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ pip install visualcheck
34
+ playwright install chromium
35
+ ```
36
+
37
+ ## Quickstart
38
+
39
+ Create `visualcheck.yaml`:
40
+
41
+ ```yaml
42
+ project: consumer_website
43
+ suite: daily_sanity
44
+
45
+ envs:
46
+ qa: "https://qa.example.com"
47
+ prod: "https://www.example.com"
48
+
49
+ views:
50
+ desktop_profiles: ["desktop_1440x900"]
51
+ mobile_devices: ["iPhone 15 Pro Max", "iPhone 13 mini", "Pixel 7"]
52
+
53
+ pages:
54
+ - id: home
55
+ url: "/"
56
+
57
+ baseline:
58
+ priority: ["figma", "runtime"]
59
+ create_if_missing: true
60
+ never_overwrite: true
61
+ on_created: "INFO"
62
+
63
+ compare:
64
+ resize_on_mismatch: true
65
+ mismatch_level: "WARN"
66
+ thresholds:
67
+ max_pixel_diff_pct: 0.10
68
+ min_ssim: 0.995
69
+
70
+ ignore_regions:
71
+ global:
72
+ selectors: ["#cookie-banner", ".chat-widget"]
73
+ ```
74
+
75
+ Run:
76
+
77
+ ```bash
78
+ visualcheck run --env qa
79
+ ```
80
+
81
+ ## Baseline rules (locked)
82
+
83
+ For each snapshot+view:
84
+ 1) If a **Figma baseline** exists: use it
85
+ 2) Else if a **runtime baseline** exists: use it
86
+ 3) Else: capture and **create baseline** (INFO: `BASELINE_CREATED`)
87
+
88
+ Baselines live at repo root:
89
+
90
+ - `visual_baseline/<project>/<suite>/figma/...`
91
+ - `visual_baseline/<project>/<suite>/runtime/...`
92
+
93
+ Run outputs go under:
94
+
95
+ - `test_report/<project>/visual_runs/<run_id>/...`
96
+
97
+ ## License
98
+ MIT
@@ -0,0 +1,73 @@
1
+ # visualcheck
2
+
3
+ Visual regression checking with **Figma-first baselines**, **pixel diff + SSIM**, **ignore regions**, and a **self-contained HTML report**.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install visualcheck
9
+ playwright install chromium
10
+ ```
11
+
12
+ ## Quickstart
13
+
14
+ Create `visualcheck.yaml`:
15
+
16
+ ```yaml
17
+ project: consumer_website
18
+ suite: daily_sanity
19
+
20
+ envs:
21
+ qa: "https://qa.example.com"
22
+ prod: "https://www.example.com"
23
+
24
+ views:
25
+ desktop_profiles: ["desktop_1440x900"]
26
+ mobile_devices: ["iPhone 15 Pro Max", "iPhone 13 mini", "Pixel 7"]
27
+
28
+ pages:
29
+ - id: home
30
+ url: "/"
31
+
32
+ baseline:
33
+ priority: ["figma", "runtime"]
34
+ create_if_missing: true
35
+ never_overwrite: true
36
+ on_created: "INFO"
37
+
38
+ compare:
39
+ resize_on_mismatch: true
40
+ mismatch_level: "WARN"
41
+ thresholds:
42
+ max_pixel_diff_pct: 0.10
43
+ min_ssim: 0.995
44
+
45
+ ignore_regions:
46
+ global:
47
+ selectors: ["#cookie-banner", ".chat-widget"]
48
+ ```
49
+
50
+ Run:
51
+
52
+ ```bash
53
+ visualcheck run --env qa
54
+ ```
55
+
56
+ ## Baseline rules (locked)
57
+
58
+ For each snapshot+view:
59
+ 1) If a **Figma baseline** exists: use it
60
+ 2) Else if a **runtime baseline** exists: use it
61
+ 3) Else: capture and **create baseline** (INFO: `BASELINE_CREATED`)
62
+
63
+ Baselines live at repo root:
64
+
65
+ - `visual_baseline/<project>/<suite>/figma/...`
66
+ - `visual_baseline/<project>/<suite>/runtime/...`
67
+
68
+ Run outputs go under:
69
+
70
+ - `test_report/<project>/visual_runs/<run_id>/...`
71
+
72
+ ## License
73
+ MIT
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "visualcheck"
7
+ version = "0.1.0"
8
+ description = "Visual regression checking with figma-first baselines, pixel+SSIM diffing, ignore regions, and HTML reports."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [{name = "Arif Shah", email = "ashah7775@gmail.com"}]
13
+ keywords = ["visual-regression", "playwright", "ssim", "qa", "figma"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dependencies = [
20
+ "playwright>=1.40",
21
+ "pillow>=10",
22
+ "numpy>=1.23",
23
+ "opencv-python-headless>=4.8",
24
+ "scikit-image>=0.20",
25
+ "PyYAML>=6",
26
+ "Jinja2>=3",
27
+ "typer>=0.9",
28
+ "rich>=13",
29
+ "jsonschema>=4",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://bitbucket.org/arif_automation/visualcheck"
34
+ Source = "https://bitbucket.org/arif_automation/visualcheck"
35
+
36
+ [project.scripts]
37
+ visualcheck = "visualcheck.cli:app"
38
+
39
+ [tool.setuptools]
40
+ package-dir = {"" = "src"}
41
+
42
+ [tool.setuptools.package-data]
43
+ visualcheck = ["templates/*.html", "schemas/*.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ __all__ = ["__version__"]
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from pathlib import Path
5
+ from typing import Optional
6
+
7
+ import typer
8
+
9
+ app = typer.Typer(add_completion=False, help="visualcheck: visual regression checking (MVP scaffold)")
10
+
11
+
12
+ @app.command()
13
+ def run(
14
+ env: str = typer.Option(..., help="Environment key from visualcheck.yaml (e.g. qa/prod)"),
15
+ config: Path = typer.Option(Path("visualcheck.yaml"), help="Path to visualcheck.yaml"),
16
+ ):
17
+ """Run capture+diff+report. (MVP scaffold)"""
18
+ if not config.exists():
19
+ raise typer.BadParameter(f"Config not found: {config}")
20
+
21
+ typer.echo(f"visualcheck v0.1.0 (scaffold)\nconfig={config}\nenv={env}")
22
+ typer.echo("Next: implement capture+baseline+diff+report.")
23
+
24
+
25
+ @app.command("figma-sync")
26
+ def figma_sync(
27
+ config: Path = typer.Option(Path("visualcheck.yaml"), help="Path to visualcheck.yaml"),
28
+ ):
29
+ """Sync Figma frames into figma baseline folder. (planned)"""
30
+ typer.echo("figma sync: planned")
31
+
32
+
33
+ @app.command()
34
+ def diff(
35
+ baseline: Path = typer.Option(..., help="Baseline folder"),
36
+ current: Path = typer.Option(..., help="Current screenshots folder"),
37
+ out: Path = typer.Option(Path("report"), help="Output report folder"),
38
+ ):
39
+ """Diff-only mode. (planned)"""
40
+ typer.echo(json.dumps({"baseline": str(baseline), "current": str(current), "out": str(out)}))
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: visualcheck
3
+ Version: 0.1.0
4
+ Summary: Visual regression checking with figma-first baselines, pixel+SSIM diffing, ignore regions, and HTML reports.
5
+ Author-email: Arif Shah <ashah7775@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://bitbucket.org/arif_automation/visualcheck
8
+ Project-URL: Source, https://bitbucket.org/arif_automation/visualcheck
9
+ Keywords: visual-regression,playwright,ssim,qa,figma
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: playwright>=1.40
16
+ Requires-Dist: pillow>=10
17
+ Requires-Dist: numpy>=1.23
18
+ Requires-Dist: opencv-python-headless>=4.8
19
+ Requires-Dist: scikit-image>=0.20
20
+ Requires-Dist: PyYAML>=6
21
+ Requires-Dist: Jinja2>=3
22
+ Requires-Dist: typer>=0.9
23
+ Requires-Dist: rich>=13
24
+ Requires-Dist: jsonschema>=4
25
+
26
+ # visualcheck
27
+
28
+ Visual regression checking with **Figma-first baselines**, **pixel diff + SSIM**, **ignore regions**, and a **self-contained HTML report**.
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ pip install visualcheck
34
+ playwright install chromium
35
+ ```
36
+
37
+ ## Quickstart
38
+
39
+ Create `visualcheck.yaml`:
40
+
41
+ ```yaml
42
+ project: consumer_website
43
+ suite: daily_sanity
44
+
45
+ envs:
46
+ qa: "https://qa.example.com"
47
+ prod: "https://www.example.com"
48
+
49
+ views:
50
+ desktop_profiles: ["desktop_1440x900"]
51
+ mobile_devices: ["iPhone 15 Pro Max", "iPhone 13 mini", "Pixel 7"]
52
+
53
+ pages:
54
+ - id: home
55
+ url: "/"
56
+
57
+ baseline:
58
+ priority: ["figma", "runtime"]
59
+ create_if_missing: true
60
+ never_overwrite: true
61
+ on_created: "INFO"
62
+
63
+ compare:
64
+ resize_on_mismatch: true
65
+ mismatch_level: "WARN"
66
+ thresholds:
67
+ max_pixel_diff_pct: 0.10
68
+ min_ssim: 0.995
69
+
70
+ ignore_regions:
71
+ global:
72
+ selectors: ["#cookie-banner", ".chat-widget"]
73
+ ```
74
+
75
+ Run:
76
+
77
+ ```bash
78
+ visualcheck run --env qa
79
+ ```
80
+
81
+ ## Baseline rules (locked)
82
+
83
+ For each snapshot+view:
84
+ 1) If a **Figma baseline** exists: use it
85
+ 2) Else if a **runtime baseline** exists: use it
86
+ 3) Else: capture and **create baseline** (INFO: `BASELINE_CREATED`)
87
+
88
+ Baselines live at repo root:
89
+
90
+ - `visual_baseline/<project>/<suite>/figma/...`
91
+ - `visual_baseline/<project>/<suite>/runtime/...`
92
+
93
+ Run outputs go under:
94
+
95
+ - `test_report/<project>/visual_runs/<run_id>/...`
96
+
97
+ ## License
98
+ MIT
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/visualcheck/__init__.py
4
+ src/visualcheck/cli.py
5
+ src/visualcheck.egg-info/PKG-INFO
6
+ src/visualcheck.egg-info/SOURCES.txt
7
+ src/visualcheck.egg-info/dependency_links.txt
8
+ src/visualcheck.egg-info/entry_points.txt
9
+ src/visualcheck.egg-info/requires.txt
10
+ src/visualcheck.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ visualcheck = visualcheck.cli:app
@@ -0,0 +1,10 @@
1
+ playwright>=1.40
2
+ pillow>=10
3
+ numpy>=1.23
4
+ opencv-python-headless>=4.8
5
+ scikit-image>=0.20
6
+ PyYAML>=6
7
+ Jinja2>=3
8
+ typer>=0.9
9
+ rich>=13
10
+ jsonschema>=4
@@ -0,0 +1 @@
1
+ visualcheck