wup 0.1.7__tar.gz → 0.1.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wup
3
- Version: 0.1.7
3
+ Version: 0.1.9
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
- ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
32
- ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.15-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
31
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
32
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.45-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
33
33
 
34
- - 🤖 **LLM usage:** $0.1500 (1 commits)
34
+ - 🤖 **LLM usage:** $0.4500 (3 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
- ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
41
+ ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
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
- ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
7
- ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.15-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
6
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
7
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.45-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
8
8
 
9
- - 🤖 **LLM usage:** $0.1500 (1 commits)
9
+ - 🤖 **LLM usage:** $0.4500 (3 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
- ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
16
+ ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
17
17
 
18
18
  **WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
19
19
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wup"
7
- version = "0.1.7"
7
+ version = "0.1.9"
8
8
  description = "WUP (What's Up) - Intelligent file watcher for regression testing in large projects"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -7,7 +7,7 @@ WUP monitors file changes and runs intelligent regression tests using a 3-layer
7
7
  3. Detail Layer: Full tests with blame reports (only on failure)
8
8
  """
9
9
 
10
- __version__ = "0.1.7"
10
+ __version__ = "0.1.9"
11
11
  __author__ = "Tom Sapletta"
12
12
 
13
13
  from .core import WupWatcher
@@ -67,6 +67,13 @@ class WupWatcher:
67
67
  self.console.print(f"[yellow]Building dependency map...[/yellow]")
68
68
  self.dependency_mapper.build_from_codebase()
69
69
  self.dependency_mapper.save(deps_file)
70
+
71
+ def _to_relative_path(self, file_path: str) -> Path:
72
+ file_path_obj = Path(file_path)
73
+ try:
74
+ return file_path_obj.relative_to(self.project_root)
75
+ except ValueError:
76
+ return file_path_obj
70
77
 
71
78
  def infer_service(self, file_path: str) -> Optional[str]:
72
79
  """
@@ -76,7 +83,7 @@ class WupWatcher:
76
83
  app/users/routes.py → "app/users"
77
84
  src/components/auth.ts → "src/components"
78
85
  """
79
- rel_path = Path(file_path).relative_to(self.project_root)
86
+ rel_path = self._to_relative_path(file_path)
80
87
  parts = rel_path.parts
81
88
 
82
89
  # Use dependency mapper if available
@@ -112,10 +119,8 @@ class WupWatcher:
112
119
  service: Service name to test
113
120
  """
114
121
  endpoints = self.dependency_mapper.get_endpoints_for_service(service)
115
- if endpoints:
116
- # Limit to 3 endpoints for quick test
117
- self.test_queue.append(("quick", service, endpoints[:3]))
118
- self.last_test_times[service] = time.time()
122
+ self.test_queue.append(("quick", service, endpoints[:3]))
123
+ self.last_test_times[service] = time.time()
119
124
 
120
125
  def schedule_detail_test(self, service: str):
121
126
  """
@@ -125,8 +130,23 @@ class WupWatcher:
125
130
  service: Service name to test
126
131
  """
127
132
  endpoints = self.dependency_mapper.get_endpoints_for_service(service)
128
- if endpoints:
129
- self.test_queue.appendleft(("detail", service, endpoints))
133
+ self.test_queue.appendleft(("detail", service, endpoints))
134
+
135
+ async def process_test_queue_once(self):
136
+ if not self.test_queue or not await self.cpu_ok():
137
+ return
138
+
139
+ test_type, service, endpoints = self.test_queue.popleft()
140
+
141
+ try:
142
+ if test_type == "quick":
143
+ passed = await self.run_quick_test(service, endpoints)
144
+ if not passed:
145
+ self.schedule_detail_test(service)
146
+ elif test_type == "detail":
147
+ await self.run_detail_test(service, endpoints)
148
+ except Exception as e:
149
+ self.console.print(f"[red]Error testing {service}: {e}[/red]")
130
150
 
131
151
  async def cpu_ok(self) -> bool:
132
152
  """
@@ -212,20 +232,7 @@ class WupWatcher:
212
232
  async def test_loop(self):
213
233
  """Main test execution loop."""
214
234
  while True:
215
- if self.test_queue and await self.cpu_ok():
216
- test_type, service, endpoints = self.test_queue.popleft()
217
-
218
- try:
219
- if test_type == "quick":
220
- passed = await self.run_quick_test(service, endpoints)
221
- if not passed:
222
- # Escalate to detail test
223
- self.schedule_detail_test(service)
224
- elif test_type == "detail":
225
- await self.run_detail_test(service, endpoints)
226
- except Exception as e:
227
- self.console.print(f"[red]Error testing {service}: {e}[/red]")
228
-
235
+ await self.process_test_queue_once()
229
236
  await asyncio.sleep(self.debounce_seconds)
230
237
 
231
238
  def on_file_change(self, file_path: str):
@@ -236,7 +243,7 @@ class WupWatcher:
236
243
  file_path: Path to the changed file
237
244
  """
238
245
  # Only watch relevant directories
239
- rel_path = Path(file_path).relative_to(self.project_root)
246
+ rel_path = self._to_relative_path(file_path)
240
247
  parts = rel_path.parts
241
248
 
242
249
  # Skip certain directories
@@ -284,6 +291,7 @@ class WupWatcher:
284
291
 
285
292
  try:
286
293
  while True:
294
+ asyncio.run(self.process_test_queue_once())
287
295
  time.sleep(1)
288
296
  except KeyboardInterrupt:
289
297
  observer.stop()
@@ -343,16 +351,7 @@ class WupWatcher:
343
351
  with Live(self.create_status_table(), refresh_per_second=1) as live:
344
352
  try:
345
353
  while True:
346
- # Run test loop
347
- if self.test_queue and await self.cpu_ok():
348
- test_type, service, endpoints = self.test_queue.popleft()
349
-
350
- if test_type == "quick":
351
- passed = await self.run_quick_test(service, endpoints)
352
- if not passed:
353
- self.schedule_detail_test(service)
354
- elif test_type == "detail":
355
- await self.run_detail_test(service, endpoints)
354
+ await self.process_test_queue_once()
356
355
 
357
356
  live.update(self.create_status_table())
358
357
  await asyncio.sleep(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wup
3
- Version: 0.1.7
3
+ Version: 0.1.9
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
- ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
32
- ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.15-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
31
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
32
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.45-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-2.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
33
33
 
34
- - 🤖 **LLM usage:** $0.1500 (1 commits)
34
+ - 🤖 **LLM usage:** $0.4500 (3 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
- ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.7-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
41
+ ![PyPI](https://img.shields.io/badge/pypi-wup-blue) ![Version](https://img.shields.io/badge/version-0.1.9-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
42
42
 
43
43
  **WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
44
44
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes