wup 0.1.5__tar.gz → 0.1.7__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.7/PKG-INFO ADDED
@@ -0,0 +1,255 @@
1
+ Metadata-Version: 2.4
2
+ Name: wup
3
+ Version: 0.1.7
4
+ Summary: WUP (What's Up) - Intelligent file watcher for regression testing in large projects
5
+ Author-email: Tom Sapletta <tom@sapletta.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/yourusername/wup
8
+ Project-URL: Repository, https://github.com/yourusername/wup
9
+ Keywords: wup,watcher,testing,regression,file-monitoring
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: watchdog>=4.0.0
21
+ Requires-Dist: psutil>=5.9.0
22
+ Requires-Dist: rich>=13.0.0
23
+ Requires-Dist: typer>=0.9.0
24
+ Dynamic: license-file
25
+
26
+ # WUP (What's Up)
27
+
28
+
29
+ ## AI Cost Tracking
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)
33
+
34
+ - 🤖 **LLM usage:** $0.1500 (1 commits)
35
+ - 👤 **Human dev:** ~$200 (2.0h @ $100/h, 30min dedup)
36
+
37
+ Generated on 2026-04-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
38
+
39
+ ---
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)
42
+
43
+ **WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
44
+
45
+ WUP monitors file changes and runs intelligent regression tests using a 3-layer approach:
46
+ 1. **Detection Layer**: File watching with heuristics
47
+ 2. **Priority Layer**: Quick tests of related services (3 endpoints max)
48
+ 3. **Detail Layer**: Full tests with blame reports (only on failure)
49
+
50
+ ## Features
51
+
52
+ - 🎯 **Intelligent Testing**: Only tests related services when files change
53
+ - ⚡ **CPU Throttling**: Respects system resources with configurable CPU limits
54
+ - 🔄 **3-Layer Architecture**: Quick smoke tests first, detailed tests only on failure
55
+ - 📊 **Live Dashboard**: Real-time status monitoring with Rich CLI
56
+ - 🔍 **Dependency Mapping**: Automatic detection of files → endpoints → services
57
+ - 🚀 **Framework Support**: FastAPI, Flask, Django, Express.js, and more
58
+ - 📝 **Blame Reports**: Detailed regression reports with file/line/commit info
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ # Install from source
64
+ pip install -e .
65
+
66
+ # Install with development dependencies
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ```bash
73
+ # 1. Build dependency map (one-time setup)
74
+ wup map-deps ./my-project
75
+
76
+ # 2. Start watching for changes
77
+ wup watch ./my-project
78
+
79
+ # 3. Start with live dashboard
80
+ wup watch ./my-project --dashboard
81
+ ```
82
+
83
+ ## Usage
84
+
85
+ ### Build Dependency Map
86
+
87
+ ```bash
88
+ # Auto-detect framework
89
+ wup map-deps ./my-project
90
+
91
+ # Specify framework
92
+ wup map-deps ./my-project --framework fastapi
93
+
94
+ # Custom output file
95
+ wup map-deps ./my-project --output my-deps.json
96
+ ```
97
+
98
+ ### Watch Project
99
+
100
+ ```bash
101
+ # Basic watching
102
+ wup watch ./my-project
103
+
104
+ # With custom settings
105
+ wup watch ./my-project \
106
+ --cpu-throttle 0.5 \
107
+ --debounce 3 \
108
+ --cooldown 600
109
+
110
+ # With live dashboard
111
+ wup watch ./my-project --dashboard
112
+ ```
113
+
114
+ ### Check Status
115
+
116
+ ```bash
117
+ # View dependency map status
118
+ wup status
119
+
120
+ # Custom deps file
121
+ wup status --deps my-deps.json
122
+ ```
123
+
124
+ ## Architecture
125
+
126
+ ### 3-Layer Testing Approach
127
+
128
+ ```
129
+ ┌─────────────────────────────────────────────────────────────┐
130
+ │ DETECTION LAYER │
131
+ │ File watching with watchdog + heuristics │
132
+ │ Skips: .git, __pycache__, node_modules, .venv │
133
+ └──────────────────────┬──────────────────────────────────────┘
134
+ │ File change
135
+
136
+ ┌─────────────────────────────────────────────────────────────┐
137
+ │ PRIORITY LAYER │
138
+ │ Quick test: 3 endpoints max per service │
139
+ │ Duration: ~1-2 seconds │
140
+ │ Result: Pass → Done, Fail → Escalate │
141
+ └──────────────────────┬──────────────────────────────────────┘
142
+ │ Failure
143
+
144
+ ┌─────────────────────────────────────────────────────────────┐
145
+ │ DETAIL LAYER │
146
+ │ Full test: All endpoints with blame report │
147
+ │ Duration: ~3-5 seconds │
148
+ │ Result: Regression report with file/line/commit │
149
+ └─────────────────────────────────────────────────────────────┘
150
+ ```
151
+
152
+ ### Performance Characteristics
153
+
154
+ ```
155
+ Idle: 0.1% CPU, 10MB RAM
156
+ File change: 5s test → 2% CPU spike
157
+ Full regression: 15s test → 15% CPU spike
158
+ 200+ files/min: 100 req/s → OK (throttled)
159
+ ```
160
+
161
+ ## Configuration
162
+
163
+ ### CLI Options
164
+
165
+ | Option | Default | Description |
166
+ |--------|---------|-------------|
167
+ | `--cpu-throttle` | 0.8 | CPU usage threshold (0.0-1.0) |
168
+ | `--debounce` | 2 | Debounce time in seconds |
169
+ | `--cooldown` | 300 | Test cooldown in seconds |
170
+ | `--dashboard` | false | Enable live dashboard |
171
+ | `--deps` | deps.json | Dependency map file path |
172
+
173
+ ### Environment Variables
174
+
175
+ ```bash
176
+ # Set default CPU throttle
177
+ export WUP_CPU_THROTTLE=0.5
178
+
179
+ # Set default debounce time
180
+ export WUP_DEBOUNCE=3
181
+ ```
182
+
183
+ ## Integration with Test Frameworks
184
+
185
+ WUP is designed to work with any test framework. The current implementation includes placeholder test methods that you can customize:
186
+
187
+ ```python
188
+ # In wup/core.py, customize these methods:
189
+
190
+ async def run_quick_test(self, service: str, endpoints: List[str]) -> bool:
191
+ # Integrate with your test framework (pytest, unittest, TestQL, etc.)
192
+ # Example:
193
+ result = subprocess.run([
194
+ "pytest", f"tests/{service}/test_smoke.py",
195
+ "--maxfail=1", "-q"
196
+ ])
197
+ return result.returncode == 0
198
+
199
+ async def run_detail_test(self, service: str, endpoints: List[str]) -> Dict:
200
+ # Run full test suite with blame reporting
201
+ # Example:
202
+ result = subprocess.run([
203
+ "pytest", f"tests/{service}/",
204
+ "--cov", f"app/{service}",
205
+ "--cov-report=json"
206
+ ])
207
+ return parse_coverage_report("coverage.json")
208
+ ```
209
+
210
+ ## Project Structure
211
+
212
+ ```
213
+ wup/
214
+ ├── wup/
215
+ │ ├── __init__.py # Package exports
216
+ │ ├── core.py # WupWatcher implementation
217
+ │ ├── dependency_mapper.py # Dependency mapping logic
218
+ │ └── cli.py # CLI interface
219
+ ├── tests/
220
+ │ └── test_wup.py # Unit tests
221
+ ├── pyproject.toml # Package configuration
222
+ └── README.md # This file
223
+ ```
224
+
225
+ ## Development
226
+
227
+ ### Running Tests
228
+
229
+ ```bash
230
+ # Run all tests
231
+ pytest
232
+
233
+ # Run with coverage
234
+ pytest --cov=wup
235
+
236
+ # Run specific test
237
+ pytest tests/test_wup.py::TestDependencyMapper::test_init
238
+ ```
239
+
240
+ ### Building for Distribution
241
+
242
+ ```bash
243
+ # Build wheel and source distribution
244
+ python -m build
245
+
246
+ # Install from dist
247
+ pip install dist/wup-0.1.6-py3-none-any.whl
248
+ ```
249
+
250
+ ## License
251
+
252
+ Licensed under Apache-2.0.
253
+ ## Contributing
254
+
255
+ Contributions are welcome! Please feel free to submit a Pull Request.
wup-0.1.7/README.md ADDED
@@ -0,0 +1,230 @@
1
+ # WUP (What's Up)
2
+
3
+
4
+ ## AI Cost Tracking
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)
8
+
9
+ - 🤖 **LLM usage:** $0.1500 (1 commits)
10
+ - 👤 **Human dev:** ~$200 (2.0h @ $100/h, 30min dedup)
11
+
12
+ Generated on 2026-04-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
13
+
14
+ ---
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)
17
+
18
+ **WUP (What's Up)** - Intelligent file watcher for regression testing in large projects.
19
+
20
+ WUP monitors file changes and runs intelligent regression tests using a 3-layer approach:
21
+ 1. **Detection Layer**: File watching with heuristics
22
+ 2. **Priority Layer**: Quick tests of related services (3 endpoints max)
23
+ 3. **Detail Layer**: Full tests with blame reports (only on failure)
24
+
25
+ ## Features
26
+
27
+ - 🎯 **Intelligent Testing**: Only tests related services when files change
28
+ - ⚡ **CPU Throttling**: Respects system resources with configurable CPU limits
29
+ - 🔄 **3-Layer Architecture**: Quick smoke tests first, detailed tests only on failure
30
+ - 📊 **Live Dashboard**: Real-time status monitoring with Rich CLI
31
+ - 🔍 **Dependency Mapping**: Automatic detection of files → endpoints → services
32
+ - 🚀 **Framework Support**: FastAPI, Flask, Django, Express.js, and more
33
+ - 📝 **Blame Reports**: Detailed regression reports with file/line/commit info
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ # Install from source
39
+ pip install -e .
40
+
41
+ # Install with development dependencies
42
+ pip install -e ".[dev]"
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ```bash
48
+ # 1. Build dependency map (one-time setup)
49
+ wup map-deps ./my-project
50
+
51
+ # 2. Start watching for changes
52
+ wup watch ./my-project
53
+
54
+ # 3. Start with live dashboard
55
+ wup watch ./my-project --dashboard
56
+ ```
57
+
58
+ ## Usage
59
+
60
+ ### Build Dependency Map
61
+
62
+ ```bash
63
+ # Auto-detect framework
64
+ wup map-deps ./my-project
65
+
66
+ # Specify framework
67
+ wup map-deps ./my-project --framework fastapi
68
+
69
+ # Custom output file
70
+ wup map-deps ./my-project --output my-deps.json
71
+ ```
72
+
73
+ ### Watch Project
74
+
75
+ ```bash
76
+ # Basic watching
77
+ wup watch ./my-project
78
+
79
+ # With custom settings
80
+ wup watch ./my-project \
81
+ --cpu-throttle 0.5 \
82
+ --debounce 3 \
83
+ --cooldown 600
84
+
85
+ # With live dashboard
86
+ wup watch ./my-project --dashboard
87
+ ```
88
+
89
+ ### Check Status
90
+
91
+ ```bash
92
+ # View dependency map status
93
+ wup status
94
+
95
+ # Custom deps file
96
+ wup status --deps my-deps.json
97
+ ```
98
+
99
+ ## Architecture
100
+
101
+ ### 3-Layer Testing Approach
102
+
103
+ ```
104
+ ┌─────────────────────────────────────────────────────────────┐
105
+ │ DETECTION LAYER │
106
+ │ File watching with watchdog + heuristics │
107
+ │ Skips: .git, __pycache__, node_modules, .venv │
108
+ └──────────────────────┬──────────────────────────────────────┘
109
+ │ File change
110
+
111
+ ┌─────────────────────────────────────────────────────────────┐
112
+ │ PRIORITY LAYER │
113
+ │ Quick test: 3 endpoints max per service │
114
+ │ Duration: ~1-2 seconds │
115
+ │ Result: Pass → Done, Fail → Escalate │
116
+ └──────────────────────┬──────────────────────────────────────┘
117
+ │ Failure
118
+
119
+ ┌─────────────────────────────────────────────────────────────┐
120
+ │ DETAIL LAYER │
121
+ │ Full test: All endpoints with blame report │
122
+ │ Duration: ~3-5 seconds │
123
+ │ Result: Regression report with file/line/commit │
124
+ └─────────────────────────────────────────────────────────────┘
125
+ ```
126
+
127
+ ### Performance Characteristics
128
+
129
+ ```
130
+ Idle: 0.1% CPU, 10MB RAM
131
+ File change: 5s test → 2% CPU spike
132
+ Full regression: 15s test → 15% CPU spike
133
+ 200+ files/min: 100 req/s → OK (throttled)
134
+ ```
135
+
136
+ ## Configuration
137
+
138
+ ### CLI Options
139
+
140
+ | Option | Default | Description |
141
+ |--------|---------|-------------|
142
+ | `--cpu-throttle` | 0.8 | CPU usage threshold (0.0-1.0) |
143
+ | `--debounce` | 2 | Debounce time in seconds |
144
+ | `--cooldown` | 300 | Test cooldown in seconds |
145
+ | `--dashboard` | false | Enable live dashboard |
146
+ | `--deps` | deps.json | Dependency map file path |
147
+
148
+ ### Environment Variables
149
+
150
+ ```bash
151
+ # Set default CPU throttle
152
+ export WUP_CPU_THROTTLE=0.5
153
+
154
+ # Set default debounce time
155
+ export WUP_DEBOUNCE=3
156
+ ```
157
+
158
+ ## Integration with Test Frameworks
159
+
160
+ WUP is designed to work with any test framework. The current implementation includes placeholder test methods that you can customize:
161
+
162
+ ```python
163
+ # In wup/core.py, customize these methods:
164
+
165
+ async def run_quick_test(self, service: str, endpoints: List[str]) -> bool:
166
+ # Integrate with your test framework (pytest, unittest, TestQL, etc.)
167
+ # Example:
168
+ result = subprocess.run([
169
+ "pytest", f"tests/{service}/test_smoke.py",
170
+ "--maxfail=1", "-q"
171
+ ])
172
+ return result.returncode == 0
173
+
174
+ async def run_detail_test(self, service: str, endpoints: List[str]) -> Dict:
175
+ # Run full test suite with blame reporting
176
+ # Example:
177
+ result = subprocess.run([
178
+ "pytest", f"tests/{service}/",
179
+ "--cov", f"app/{service}",
180
+ "--cov-report=json"
181
+ ])
182
+ return parse_coverage_report("coverage.json")
183
+ ```
184
+
185
+ ## Project Structure
186
+
187
+ ```
188
+ wup/
189
+ ├── wup/
190
+ │ ├── __init__.py # Package exports
191
+ │ ├── core.py # WupWatcher implementation
192
+ │ ├── dependency_mapper.py # Dependency mapping logic
193
+ │ └── cli.py # CLI interface
194
+ ├── tests/
195
+ │ └── test_wup.py # Unit tests
196
+ ├── pyproject.toml # Package configuration
197
+ └── README.md # This file
198
+ ```
199
+
200
+ ## Development
201
+
202
+ ### Running Tests
203
+
204
+ ```bash
205
+ # Run all tests
206
+ pytest
207
+
208
+ # Run with coverage
209
+ pytest --cov=wup
210
+
211
+ # Run specific test
212
+ pytest tests/test_wup.py::TestDependencyMapper::test_init
213
+ ```
214
+
215
+ ### Building for Distribution
216
+
217
+ ```bash
218
+ # Build wheel and source distribution
219
+ python -m build
220
+
221
+ # Install from dist
222
+ pip install dist/wup-0.1.6-py3-none-any.whl
223
+ ```
224
+
225
+ ## License
226
+
227
+ Licensed under Apache-2.0.
228
+ ## Contributing
229
+
230
+ Contributions are welcome! Please feel free to submit a Pull Request.
@@ -4,27 +4,34 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wup"
7
- version = "0.1.5"
8
- description = "A Python package for wup-related operations"
7
+ version = "0.1.7"
8
+ description = "WUP (What's Up) - Intelligent file watcher for regression testing in large projects"
9
9
  readme = "README.md"
10
- requires-python = ">=3.7"
10
+ requires-python = ">=3.9"
11
11
  license = "Apache-2.0"
12
12
  authors = [
13
- {name = "Your Name"},
14
13
  {name = "Tom Sapletta", email = "tom@sapletta.com"},
15
14
  ]
16
- keywords = ["wup", "web", "framework"]
15
+ keywords = ["wup", "watcher", "testing", "regression", "file-monitoring"]
16
+ dependencies = [
17
+ "watchdog>=4.0.0",
18
+ "psutil>=5.9.0",
19
+ "rich>=13.0.0",
20
+ "typer>=0.9.0",
21
+ ]
17
22
  classifiers = [
18
23
  "Development Status :: 3 - Alpha",
19
24
  "Intended Audience :: Developers",
20
25
  "Programming Language :: Python :: 3",
21
- "Programming Language :: Python :: 3.7",
22
- "Programming Language :: Python :: 3.8",
23
26
  "Programming Language :: Python :: 3.9",
24
27
  "Programming Language :: Python :: 3.10",
25
28
  "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
26
30
  ]
27
31
 
32
+ [project.scripts]
33
+ wup = "wup.cli:app"
34
+
28
35
  [project.urls]
29
36
  Homepage = "https://github.com/yourusername/wup"
30
37
  Repository = "https://github.com/yourusername/wup"