wup 0.1.9__tar.gz → 0.2.1__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.
- {wup-0.1.9/wup.egg-info → wup-0.2.1}/PKG-INFO +5 -5
- {wup-0.1.9 → wup-0.2.1}/README.md +4 -4
- {wup-0.1.9 → wup-0.2.1}/pyproject.toml +1 -1
- wup-0.2.1/tests/test_testql_watcher.py +89 -0
- wup-0.2.1/tests/test_wup.py +746 -0
- wup-0.2.1/wup/__init__.py +39 -0
- wup-0.2.1/wup/cli.py +274 -0
- wup-0.2.1/wup/config.py +242 -0
- {wup-0.1.9 → wup-0.2.1}/wup/core.py +105 -16
- wup-0.2.1/wup/models/__init__.py +21 -0
- wup-0.2.1/wup/models/config.py +75 -0
- wup-0.2.1/wup/testql_watcher.py +322 -0
- {wup-0.1.9 → wup-0.2.1/wup.egg-info}/PKG-INFO +5 -5
- {wup-0.1.9 → wup-0.2.1}/wup.egg-info/SOURCES.txt +6 -1
- wup-0.1.9/tests/test_wup.py +0 -207
- wup-0.1.9/wup/__init__.py +0 -16
- wup-0.1.9/wup/cli.py +0 -158
- {wup-0.1.9 → wup-0.2.1}/LICENSE +0 -0
- {wup-0.1.9 → wup-0.2.1}/setup.cfg +0 -0
- {wup-0.1.9 → wup-0.2.1}/wup/dependency_mapper.py +0 -0
- {wup-0.1.9 → wup-0.2.1}/wup.egg-info/dependency_links.txt +0 -0
- {wup-0.1.9 → wup-0.2.1}/wup.egg-info/entry_points.txt +0 -0
- {wup-0.1.9 → wup-0.2.1}/wup.egg-info/requires.txt +0 -0
- {wup-0.1.9 → wup-0.2.1}/wup.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wup
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: WUP (What's Up) - Intelligent file watcher for regression testing in large projects
|
|
5
5
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -28,17 +28,17 @@ Dynamic: license-file
|
|
|
28
28
|
|
|
29
29
|
## AI Cost Tracking
|
|
30
30
|
|
|
31
|
-
    
|
|
32
|
+
  
|
|
33
33
|
|
|
34
|
-
- 🤖 **LLM usage:** $0.
|
|
34
|
+
- 🤖 **LLM usage:** $0.7500 (5 commits)
|
|
35
35
|
- 👤 **Human dev:** ~$200 (2.0h @ $100/h, 30min dedup)
|
|
36
36
|
|
|
37
37
|
Generated on 2026-04-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
-
    
|
|
42
42
|
|
|
43
43
|
**WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
|
|
44
44
|
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
## AI Cost Tracking
|
|
5
5
|
|
|
6
|
-
    
|
|
7
|
+
  
|
|
8
8
|
|
|
9
|
-
- 🤖 **LLM usage:** $0.
|
|
9
|
+
- 🤖 **LLM usage:** $0.7500 (5 commits)
|
|
10
10
|
- 👤 **Human dev:** ~$200 (2.0h @ $100/h, 30min dedup)
|
|
11
11
|
|
|
12
12
|
Generated on 2026-04-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
    
|
|
17
17
|
|
|
18
18
|
**WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
|
|
19
19
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import json
|
|
3
|
+
import tempfile
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from subprocess import CompletedProcess
|
|
6
|
+
|
|
7
|
+
from wup.testql_watcher import TestQLWatcher
|
|
8
|
+
from wup.models.config import WupConfig, ProjectConfig
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_process_changed_file_creates_track_on_failure():
|
|
12
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
13
|
+
root = Path(tmpdir)
|
|
14
|
+
app_file = root / "app" / "users" / "routes.py"
|
|
15
|
+
app_file.parent.mkdir(parents=True, exist_ok=True)
|
|
16
|
+
app_file.write_text("print('x')\n", encoding="utf-8")
|
|
17
|
+
|
|
18
|
+
scenario_dir = root / "testql-scenarios"
|
|
19
|
+
scenario_dir.mkdir(parents=True, exist_ok=True)
|
|
20
|
+
failing_scenario = scenario_dir / "api-users-failing.testql.toon.yaml"
|
|
21
|
+
failing_scenario.write_text("name: failing\n", encoding="utf-8")
|
|
22
|
+
|
|
23
|
+
# Pass empty config to prevent loading from temp dir
|
|
24
|
+
empty_config = WupConfig(
|
|
25
|
+
project=ProjectConfig(name="test"),
|
|
26
|
+
services=[],
|
|
27
|
+
test_strategy=None,
|
|
28
|
+
testql=None
|
|
29
|
+
)
|
|
30
|
+
watcher = TestQLWatcher(
|
|
31
|
+
project_root=str(root),
|
|
32
|
+
deps_file=str(root / "deps.json"),
|
|
33
|
+
scenarios_dir="testql-scenarios",
|
|
34
|
+
track_dir=".wup/tracks",
|
|
35
|
+
config=empty_config,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
watcher.dependency_mapper.service_to_endpoints["app/users"] = ["/api/v1/users"]
|
|
39
|
+
|
|
40
|
+
def fake_run_testql(args, timeout):
|
|
41
|
+
if "--dry-run" in args:
|
|
42
|
+
return CompletedProcess(args=args, returncode=1, stdout="", stderr="intentional failure")
|
|
43
|
+
return CompletedProcess(args=args, returncode=0, stdout="{}", stderr="")
|
|
44
|
+
|
|
45
|
+
watcher._run_testql = fake_run_testql # type: ignore[method-assign]
|
|
46
|
+
|
|
47
|
+
result = asyncio.run(watcher.process_changed_file_once(str(app_file)))
|
|
48
|
+
|
|
49
|
+
assert result["processed_items"] >= 1
|
|
50
|
+
assert result["last_track_path"] is not None
|
|
51
|
+
|
|
52
|
+
track_path = Path(result["last_track_path"])
|
|
53
|
+
assert track_path.exists()
|
|
54
|
+
|
|
55
|
+
track_payload = json.loads(track_path.read_text(encoding="utf-8"))
|
|
56
|
+
assert track_payload["service"] == "app/users"
|
|
57
|
+
assert track_payload["stage"] == "quick"
|
|
58
|
+
assert "intentional failure" in track_payload["stderr_head"]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def test_browser_event_file_is_written_without_service_url():
|
|
62
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
63
|
+
root = Path(tmpdir)
|
|
64
|
+
scenario_dir = root / "testql-scenarios"
|
|
65
|
+
scenario_dir.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
scenario_file = scenario_dir / "api-users-smoke.testql.toon.yaml"
|
|
67
|
+
scenario_file.write_text("name: smoke\n", encoding="utf-8")
|
|
68
|
+
|
|
69
|
+
watcher = TestQLWatcher(
|
|
70
|
+
project_root=str(root),
|
|
71
|
+
deps_file=str(root / "deps.json"),
|
|
72
|
+
scenarios_dir="testql-scenarios",
|
|
73
|
+
track_dir=".wup/tracks",
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
result = CompletedProcess(args=["testql", "run"], returncode=1, stdout="", stderr="boom")
|
|
77
|
+
track_path = watcher._write_track(
|
|
78
|
+
service="app/users",
|
|
79
|
+
stage="quick",
|
|
80
|
+
scenario=scenario_file,
|
|
81
|
+
result=result,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
assert track_path.exists()
|
|
85
|
+
event_file = root / ".wup" / "browser-events" / "latest.json"
|
|
86
|
+
assert event_file.exists()
|
|
87
|
+
event_payload = json.loads(event_file.read_text(encoding="utf-8"))
|
|
88
|
+
assert event_payload["type"] == "wup_testql_error"
|
|
89
|
+
assert event_payload["service"] == "app/users"
|