woolly 0.2.0__tar.gz → 0.4.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.
Files changed (62) hide show
  1. woolly-0.4.0/PKG-INFO +324 -0
  2. woolly-0.4.0/README.md +292 -0
  3. woolly-0.4.0/examples/template/example_template.md +16 -0
  4. {woolly-0.2.0 → woolly-0.4.0}/pyproject.toml +5 -0
  5. {woolly-0.2.0 → woolly-0.4.0}/tests/functional/test_cli.py +83 -0
  6. woolly-0.4.0/tests/functional/test_optional_flag.py +277 -0
  7. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_commands/test_check.py +163 -16
  8. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_languages/test_python.py +3 -1
  9. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_languages/test_registry.py +10 -10
  10. woolly-0.4.0/tests/unit/test_optional_dependencies.py +386 -0
  11. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/test_base.py +116 -41
  12. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/test_json.py +73 -13
  13. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/test_markdown.py +53 -34
  14. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/test_registry.py +9 -9
  15. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/test_stdout.py +29 -0
  16. woolly-0.4.0/tests/unit/test_reporters/test_template.py +358 -0
  17. {woolly-0.2.0 → woolly-0.4.0}/uv.lock +104 -0
  18. {woolly-0.2.0 → woolly-0.4.0}/woolly/cache.py +15 -5
  19. {woolly-0.2.0 → woolly-0.4.0}/woolly/commands/check.py +176 -44
  20. {woolly-0.2.0 → woolly-0.4.0}/woolly/commands/list_formats.py +3 -3
  21. {woolly-0.2.0 → woolly-0.4.0}/woolly/commands/list_languages.py +4 -4
  22. woolly-0.4.0/woolly/http.py +34 -0
  23. {woolly-0.2.0 → woolly-0.4.0}/woolly/languages/__init__.py +33 -3
  24. {woolly-0.2.0 → woolly-0.4.0}/woolly/languages/base.py +11 -7
  25. {woolly-0.2.0 → woolly-0.4.0}/woolly/languages/python.py +5 -6
  26. {woolly-0.2.0 → woolly-0.4.0}/woolly/languages/rust.py +3 -5
  27. {woolly-0.2.0 → woolly-0.4.0}/woolly/reporters/__init__.py +43 -8
  28. {woolly-0.2.0 → woolly-0.4.0}/woolly/reporters/base.py +95 -10
  29. woolly-0.4.0/woolly/reporters/json.py +180 -0
  30. {woolly-0.2.0 → woolly-0.4.0}/woolly/reporters/markdown.py +40 -60
  31. woolly-0.4.0/woolly/reporters/stdout.py +76 -0
  32. woolly-0.4.0/woolly/reporters/template.py +215 -0
  33. woolly-0.2.0/PKG-INFO +0 -213
  34. woolly-0.2.0/README.md +0 -183
  35. woolly-0.2.0/woolly/reporters/json.py +0 -145
  36. woolly-0.2.0/woolly/reporters/stdout.py +0 -54
  37. {woolly-0.2.0 → woolly-0.4.0}/.coverage +0 -0
  38. {woolly-0.2.0 → woolly-0.4.0}/.github/workflows/lint.yml +0 -0
  39. {woolly-0.2.0 → woolly-0.4.0}/.github/workflows/publish.yml +0 -0
  40. {woolly-0.2.0 → woolly-0.4.0}/.github/workflows/tests.yml +0 -0
  41. {woolly-0.2.0 → woolly-0.4.0}/.gitignore +0 -0
  42. {woolly-0.2.0 → woolly-0.4.0}/.python-version +0 -0
  43. {woolly-0.2.0 → woolly-0.4.0}/LICENSE +0 -0
  44. {woolly-0.2.0 → woolly-0.4.0}/tests/__init__.py +0 -0
  45. {woolly-0.2.0 → woolly-0.4.0}/tests/conftest.py +0 -0
  46. {woolly-0.2.0 → woolly-0.4.0}/tests/functional/__init__.py +0 -0
  47. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/__init__.py +0 -0
  48. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_cache.py +0 -0
  49. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_commands/__init__.py +0 -0
  50. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_commands/test_other_commands.py +0 -0
  51. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_debug.py +0 -0
  52. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_languages/__init__.py +0 -0
  53. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_languages/test_base.py +0 -0
  54. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_languages/test_rust.py +0 -0
  55. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_progress.py +0 -0
  56. {woolly-0.2.0 → woolly-0.4.0}/tests/unit/test_reporters/__init__.py +0 -0
  57. {woolly-0.2.0 → woolly-0.4.0}/woolly/__init__.py +0 -0
  58. {woolly-0.2.0 → woolly-0.4.0}/woolly/__main__.py +0 -0
  59. {woolly-0.2.0 → woolly-0.4.0}/woolly/commands/__init__.py +0 -0
  60. {woolly-0.2.0 → woolly-0.4.0}/woolly/commands/clear_cache.py +0 -0
  61. {woolly-0.2.0 → woolly-0.4.0}/woolly/debug.py +0 -0
  62. {woolly-0.2.0 → woolly-0.4.0}/woolly/progress.py +0 -0
woolly-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,324 @@
1
+ Metadata-Version: 2.4
2
+ Name: woolly
3
+ Version: 0.4.0
4
+ Summary: Check if package dependencies are available in Fedora. Supports Rust, Python, and more.
5
+ Author-email: Rodolfo Olivieri <rodolfo.olivieri3@gmail.com>
6
+ License-File: LICENSE
7
+ Classifier: Development Status :: 2 - Pre-Alpha
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Information Technology
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: cyclopts>=4.3.0
26
+ Requires-Dist: httpx>=0.28.0
27
+ Requires-Dist: pydantic>=2.10.0
28
+ Requires-Dist: rich>=14.2.0
29
+ Provides-Extra: template
30
+ Requires-Dist: jinja2>=3.1.0; extra == 'template'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # 🐑 Woolly
34
+
35
+ **Check if package dependencies are available in Fedora.**
36
+
37
+ Woolly analyzes package dependencies from various language ecosystems and checks their availability in Fedora repositories, helping packagers estimate the effort needed to bring a package to Fedora.
38
+
39
+ > ⚠️ **Experimental Software**
40
+ >
41
+ > This project is still experimental and may not get things right all the time.
42
+ > Results should be verified manually, especially for complex dependency trees.
43
+ > Platform-specific dependencies (like `windows-*` crates) may be flagged as missing
44
+ > even though they're not needed on Linux.
45
+
46
+ ## What does "woolly" mean?
47
+
48
+ Nothing. I just liked the name. 🐑
49
+
50
+ ## Features
51
+
52
+ - **Multi-language support** — Analyze dependencies from Rust (crates.io) and Python (PyPI)
53
+ - **Multiple output formats** — Console output, JSON, and Markdown reports
54
+ - **Optional dependency tracking** — Optionally include and separately track optional dependencies
55
+ - **Smart caching** — Caches API responses and dnf queries to speed up repeated analyses
56
+ - **Progress tracking** — Real-time progress bar showing analysis status
57
+ - **Debug logging** — Verbose logging mode for troubleshooting
58
+ - **Extensible architecture** — Easy to add new languages and report formats
59
+
60
+ ## Supported Languages
61
+
62
+ | Language | Registry | CLI Flag | Aliases |
63
+ |----------|-----------|-----------------------|-------------------------|
64
+ | Rust | crates.io | `--lang rust` | `-l rs`, `-l crate` |
65
+ | Python | PyPI | `--lang python` | `-l py`, `-l pypi` |
66
+
67
+ ## Output Formats
68
+
69
+ | Format | Description | CLI Flag | Aliases |
70
+ |----------|----------------------------------|----------------------|----------------------|
71
+ | stdout | Rich console output (default) | `--report stdout` | `-r console` |
72
+ | json | JSON file for programmatic use | `--report json` | |
73
+ | markdown | Markdown file for documentation | `--report markdown` | `-r md` |
74
+
75
+ ## Installation
76
+
77
+ ```bash
78
+ # Using uv (recommended)
79
+ uv pip install .
80
+
81
+ # Or run directly without installing
82
+ uv run woolly --help
83
+
84
+ # Using pip
85
+ pip install .
86
+ ```
87
+
88
+ ### Requirements
89
+
90
+ - Python 3.10+
91
+ - `dnf` available on the system (for Fedora package queries)
92
+
93
+ ## Usage
94
+
95
+ ### Basic Usage
96
+
97
+ ```bash
98
+ # Check a Rust crate (default language)
99
+ woolly check ripgrep
100
+
101
+ # Check a Python package
102
+ woolly check --lang python requests
103
+
104
+ # Use language aliases
105
+ woolly check -l py flask
106
+ woolly check -l rs tokio
107
+ ```
108
+
109
+ ### Options
110
+
111
+ ```bash
112
+ # Check a specific version
113
+ woolly check serde --version 1.0.200
114
+
115
+ # Include optional dependencies in the analysis
116
+ woolly check --optional requests -l python
117
+
118
+ # Limit recursion depth
119
+ woolly check --max-depth 10 tokio
120
+
121
+ # Disable progress bar
122
+ woolly check --no-progress serde
123
+
124
+ # Enable debug logging
125
+ woolly check --debug flask -l py
126
+
127
+ # Output as JSON
128
+ woolly check --report json serde
129
+
130
+ # Output as Markdown
131
+ woolly check -r md requests -l py
132
+ ```
133
+
134
+ ### Other Commands
135
+
136
+ ```bash
137
+ # List available languages
138
+ woolly list-languages
139
+
140
+ # List available output formats
141
+ woolly list-formats
142
+
143
+ # Clear the cache
144
+ woolly clear-cache
145
+ ```
146
+
147
+ ## Example Output
148
+
149
+ ### Rust
150
+
151
+ ```bash
152
+ $ woolly check cliclack
153
+
154
+ Analyzing Rust package: cliclack
155
+ Registry: crates.io
156
+ Cache directory: /home/user/.cache/woolly
157
+
158
+ Analyzing Rust dependencies ━━━━━━━━━━━━━━━━━ 100% • 0:00:15 complete!
159
+
160
+ Dependency Summary for 'cliclack' (Rust)
161
+ ╭────────────────────────────┬───────╮
162
+ │ Metric │ Value │
163
+ ├────────────────────────────┼───────┤
164
+ │ Total dependencies checked │ 7 │
165
+ │ Packaged in Fedora │ 0 │
166
+ │ Missing from Fedora │ 1 │
167
+ ╰────────────────────────────┴───────╯
168
+
169
+ Missing packages that need packaging:
170
+ • cliclack
171
+
172
+ Dependency Tree:
173
+ cliclack v0.3.6 • ✗ not packaged
174
+ ├── console v0.16.1 • ✓ packaged (0.16.1)
175
+ │ ├── encode_unicode v1.0.0 • ✓ packaged (1.0.0)
176
+ │ └── windows-sys v0.61.2 • ✗ not packaged
177
+ ...
178
+ ```
179
+
180
+ ### Python
181
+
182
+ ```bash
183
+ $ woolly check --lang python requests
184
+
185
+ Analyzing Python package: requests
186
+ Registry: PyPI
187
+ Cache directory: /home/user/.cache/woolly
188
+
189
+ Analyzing Python dependencies ━━━━━━━━━━━━━━ 100% • 0:00:05 complete!
190
+
191
+ Dependency Summary for 'requests' (Python)
192
+ ╭────────────────────────────┬───────╮
193
+ │ Metric │ Value │
194
+ ├────────────────────────────┼───────┤
195
+ │ Total dependencies checked │ 5 │
196
+ │ Packaged in Fedora │ 5 │
197
+ │ Missing from Fedora │ 0 │
198
+ ╰────────────────────────────┴───────╯
199
+
200
+ Dependency Tree:
201
+ requests v2.32.3 • ✓ packaged (2.32.3) [python3-requests]
202
+ ├── charset-normalizer v3.4.0 • ✓ packaged (3.4.0) [python3-charset-normalizer]
203
+ ├── idna v3.10 • ✓ packaged (3.10) [python3-idna]
204
+ ├── urllib3 v2.2.3 • ✓ packaged (2.2.3) [python3-urllib3]
205
+ └── certifi v2024.8.30 • ✓ packaged (2024.8.30) [python3-certifi]
206
+ ```
207
+
208
+ ### With Optional Dependencies
209
+
210
+ ```bash
211
+ $ woolly check --lang python --optional flask
212
+
213
+ Dependency Summary for 'flask' (Python)
214
+ ╭────────────────────────────┬───────╮
215
+ │ Metric │ Value │
216
+ ├────────────────────────────┼───────┤
217
+ │ Total dependencies checked │ 15 │
218
+ │ Packaged in Fedora │ 12 │
219
+ │ Missing from Fedora │ 3 │
220
+ │ │ │
221
+ │ Optional dependencies │ 4 │
222
+ │ ├─ Packaged │ 2 │
223
+ │ └─ Missing │ 2 │
224
+ ╰────────────────────────────┴───────╯
225
+ ```
226
+
227
+ ## Adding a New Language
228
+
229
+ To add support for a new language, create a new provider in `woolly/languages/`:
230
+
231
+ ```python
232
+ # woolly/languages/go.py
233
+ from typing import Optional
234
+
235
+ from woolly.languages.base import Dependency, LanguageProvider, PackageInfo
236
+
237
+
238
+ class GoProvider(LanguageProvider):
239
+ """Provider for Go modules."""
240
+
241
+ # Required class attributes
242
+ name = "go"
243
+ display_name = "Go"
244
+ registry_name = "Go Modules"
245
+ fedora_provides_prefix = "golang"
246
+ cache_namespace = "go"
247
+
248
+ # Required methods to implement:
249
+
250
+ def fetch_package_info(self, package_name: str) -> Optional[PackageInfo]:
251
+ """Fetch package info from proxy.golang.org."""
252
+ ...
253
+
254
+ def fetch_dependencies(self, package_name: str, version: str) -> list[Dependency]:
255
+ """Fetch dependencies from go.mod."""
256
+ ...
257
+
258
+ # Optional: Override these if your language has special naming conventions
259
+
260
+ def normalize_package_name(self, package_name: str) -> str:
261
+ """Normalize package name for Fedora lookup."""
262
+ return package_name
263
+
264
+ def get_alternative_names(self, package_name: str) -> list[str]:
265
+ """Alternative names to try if package not found."""
266
+ return []
267
+ ```
268
+
269
+ Then register it in `woolly/languages/__init__.py`:
270
+
271
+ ```python
272
+ from woolly.languages.go import GoProvider
273
+
274
+ PROVIDERS: dict[str, type[LanguageProvider]] = {
275
+ "rust": RustProvider,
276
+ "python": PythonProvider,
277
+ "go": GoProvider, # Add new provider
278
+ }
279
+
280
+ ALIASES: dict[str, str] = {
281
+ # ... existing aliases
282
+ "golang": "go",
283
+ }
284
+ ```
285
+
286
+ ## Adding a New Output Format
287
+
288
+ To add a new output format, create a reporter in `woolly/reporters/`:
289
+
290
+ ```python
291
+ # woolly/reporters/html.py
292
+ from woolly.reporters.base import Reporter, ReportData
293
+
294
+
295
+ class HtmlReporter(Reporter):
296
+ """HTML report with interactive tree."""
297
+
298
+ name = "html"
299
+ description = "HTML report with interactive dependency tree"
300
+ file_extension = "html"
301
+ writes_to_file = True
302
+
303
+ def generate(self, data: ReportData) -> str:
304
+ """Generate HTML content."""
305
+ ...
306
+ ```
307
+
308
+ Then register it in `woolly/reporters/__init__.py`.
309
+
310
+ ## Notes
311
+
312
+ - Results should be verified manually — some packages may have different names in Fedora
313
+ - Platform-specific dependencies (like `windows-*` crates) are shown as missing but aren't needed on Linux
314
+ - The tool uses `dnf repoquery` to check Fedora packages, so it must run on a Fedora system or have access to Fedora repos
315
+ - Cache is stored in `~/.cache/woolly` and can be cleared with `woolly clear-cache`
316
+
317
+ ## License
318
+
319
+ MIT License — see [LICENSE](LICENSE) for details.
320
+
321
+ ## Credits
322
+
323
+ - **[Rodolfo Olivieri (@r0x0d)](https://github.com/r0x0d)** — Creator and maintainer
324
+ - **[Claude](https://claude.ai)** — AI pair programmer by [Anthropic](https://anthropic.com)
woolly-0.4.0/README.md ADDED
@@ -0,0 +1,292 @@
1
+ # 🐑 Woolly
2
+
3
+ **Check if package dependencies are available in Fedora.**
4
+
5
+ Woolly analyzes package dependencies from various language ecosystems and checks their availability in Fedora repositories, helping packagers estimate the effort needed to bring a package to Fedora.
6
+
7
+ > ⚠️ **Experimental Software**
8
+ >
9
+ > This project is still experimental and may not get things right all the time.
10
+ > Results should be verified manually, especially for complex dependency trees.
11
+ > Platform-specific dependencies (like `windows-*` crates) may be flagged as missing
12
+ > even though they're not needed on Linux.
13
+
14
+ ## What does "woolly" mean?
15
+
16
+ Nothing. I just liked the name. 🐑
17
+
18
+ ## Features
19
+
20
+ - **Multi-language support** — Analyze dependencies from Rust (crates.io) and Python (PyPI)
21
+ - **Multiple output formats** — Console output, JSON, and Markdown reports
22
+ - **Optional dependency tracking** — Optionally include and separately track optional dependencies
23
+ - **Smart caching** — Caches API responses and dnf queries to speed up repeated analyses
24
+ - **Progress tracking** — Real-time progress bar showing analysis status
25
+ - **Debug logging** — Verbose logging mode for troubleshooting
26
+ - **Extensible architecture** — Easy to add new languages and report formats
27
+
28
+ ## Supported Languages
29
+
30
+ | Language | Registry | CLI Flag | Aliases |
31
+ |----------|-----------|-----------------------|-------------------------|
32
+ | Rust | crates.io | `--lang rust` | `-l rs`, `-l crate` |
33
+ | Python | PyPI | `--lang python` | `-l py`, `-l pypi` |
34
+
35
+ ## Output Formats
36
+
37
+ | Format | Description | CLI Flag | Aliases |
38
+ |----------|----------------------------------|----------------------|----------------------|
39
+ | stdout | Rich console output (default) | `--report stdout` | `-r console` |
40
+ | json | JSON file for programmatic use | `--report json` | |
41
+ | markdown | Markdown file for documentation | `--report markdown` | `-r md` |
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ # Using uv (recommended)
47
+ uv pip install .
48
+
49
+ # Or run directly without installing
50
+ uv run woolly --help
51
+
52
+ # Using pip
53
+ pip install .
54
+ ```
55
+
56
+ ### Requirements
57
+
58
+ - Python 3.10+
59
+ - `dnf` available on the system (for Fedora package queries)
60
+
61
+ ## Usage
62
+
63
+ ### Basic Usage
64
+
65
+ ```bash
66
+ # Check a Rust crate (default language)
67
+ woolly check ripgrep
68
+
69
+ # Check a Python package
70
+ woolly check --lang python requests
71
+
72
+ # Use language aliases
73
+ woolly check -l py flask
74
+ woolly check -l rs tokio
75
+ ```
76
+
77
+ ### Options
78
+
79
+ ```bash
80
+ # Check a specific version
81
+ woolly check serde --version 1.0.200
82
+
83
+ # Include optional dependencies in the analysis
84
+ woolly check --optional requests -l python
85
+
86
+ # Limit recursion depth
87
+ woolly check --max-depth 10 tokio
88
+
89
+ # Disable progress bar
90
+ woolly check --no-progress serde
91
+
92
+ # Enable debug logging
93
+ woolly check --debug flask -l py
94
+
95
+ # Output as JSON
96
+ woolly check --report json serde
97
+
98
+ # Output as Markdown
99
+ woolly check -r md requests -l py
100
+ ```
101
+
102
+ ### Other Commands
103
+
104
+ ```bash
105
+ # List available languages
106
+ woolly list-languages
107
+
108
+ # List available output formats
109
+ woolly list-formats
110
+
111
+ # Clear the cache
112
+ woolly clear-cache
113
+ ```
114
+
115
+ ## Example Output
116
+
117
+ ### Rust
118
+
119
+ ```bash
120
+ $ woolly check cliclack
121
+
122
+ Analyzing Rust package: cliclack
123
+ Registry: crates.io
124
+ Cache directory: /home/user/.cache/woolly
125
+
126
+ Analyzing Rust dependencies ━━━━━━━━━━━━━━━━━ 100% • 0:00:15 complete!
127
+
128
+ Dependency Summary for 'cliclack' (Rust)
129
+ ╭────────────────────────────┬───────╮
130
+ │ Metric │ Value │
131
+ ├────────────────────────────┼───────┤
132
+ │ Total dependencies checked │ 7 │
133
+ │ Packaged in Fedora │ 0 │
134
+ │ Missing from Fedora │ 1 │
135
+ ╰────────────────────────────┴───────╯
136
+
137
+ Missing packages that need packaging:
138
+ • cliclack
139
+
140
+ Dependency Tree:
141
+ cliclack v0.3.6 • ✗ not packaged
142
+ ├── console v0.16.1 • ✓ packaged (0.16.1)
143
+ │ ├── encode_unicode v1.0.0 • ✓ packaged (1.0.0)
144
+ │ └── windows-sys v0.61.2 • ✗ not packaged
145
+ ...
146
+ ```
147
+
148
+ ### Python
149
+
150
+ ```bash
151
+ $ woolly check --lang python requests
152
+
153
+ Analyzing Python package: requests
154
+ Registry: PyPI
155
+ Cache directory: /home/user/.cache/woolly
156
+
157
+ Analyzing Python dependencies ━━━━━━━━━━━━━━ 100% • 0:00:05 complete!
158
+
159
+ Dependency Summary for 'requests' (Python)
160
+ ╭────────────────────────────┬───────╮
161
+ │ Metric │ Value │
162
+ ├────────────────────────────┼───────┤
163
+ │ Total dependencies checked │ 5 │
164
+ │ Packaged in Fedora │ 5 │
165
+ │ Missing from Fedora │ 0 │
166
+ ╰────────────────────────────┴───────╯
167
+
168
+ Dependency Tree:
169
+ requests v2.32.3 • ✓ packaged (2.32.3) [python3-requests]
170
+ ├── charset-normalizer v3.4.0 • ✓ packaged (3.4.0) [python3-charset-normalizer]
171
+ ├── idna v3.10 • ✓ packaged (3.10) [python3-idna]
172
+ ├── urllib3 v2.2.3 • ✓ packaged (2.2.3) [python3-urllib3]
173
+ └── certifi v2024.8.30 • ✓ packaged (2024.8.30) [python3-certifi]
174
+ ```
175
+
176
+ ### With Optional Dependencies
177
+
178
+ ```bash
179
+ $ woolly check --lang python --optional flask
180
+
181
+ Dependency Summary for 'flask' (Python)
182
+ ╭────────────────────────────┬───────╮
183
+ │ Metric │ Value │
184
+ ├────────────────────────────┼───────┤
185
+ │ Total dependencies checked │ 15 │
186
+ │ Packaged in Fedora │ 12 │
187
+ │ Missing from Fedora │ 3 │
188
+ │ │ │
189
+ │ Optional dependencies │ 4 │
190
+ │ ├─ Packaged │ 2 │
191
+ │ └─ Missing │ 2 │
192
+ ╰────────────────────────────┴───────╯
193
+ ```
194
+
195
+ ## Adding a New Language
196
+
197
+ To add support for a new language, create a new provider in `woolly/languages/`:
198
+
199
+ ```python
200
+ # woolly/languages/go.py
201
+ from typing import Optional
202
+
203
+ from woolly.languages.base import Dependency, LanguageProvider, PackageInfo
204
+
205
+
206
+ class GoProvider(LanguageProvider):
207
+ """Provider for Go modules."""
208
+
209
+ # Required class attributes
210
+ name = "go"
211
+ display_name = "Go"
212
+ registry_name = "Go Modules"
213
+ fedora_provides_prefix = "golang"
214
+ cache_namespace = "go"
215
+
216
+ # Required methods to implement:
217
+
218
+ def fetch_package_info(self, package_name: str) -> Optional[PackageInfo]:
219
+ """Fetch package info from proxy.golang.org."""
220
+ ...
221
+
222
+ def fetch_dependencies(self, package_name: str, version: str) -> list[Dependency]:
223
+ """Fetch dependencies from go.mod."""
224
+ ...
225
+
226
+ # Optional: Override these if your language has special naming conventions
227
+
228
+ def normalize_package_name(self, package_name: str) -> str:
229
+ """Normalize package name for Fedora lookup."""
230
+ return package_name
231
+
232
+ def get_alternative_names(self, package_name: str) -> list[str]:
233
+ """Alternative names to try if package not found."""
234
+ return []
235
+ ```
236
+
237
+ Then register it in `woolly/languages/__init__.py`:
238
+
239
+ ```python
240
+ from woolly.languages.go import GoProvider
241
+
242
+ PROVIDERS: dict[str, type[LanguageProvider]] = {
243
+ "rust": RustProvider,
244
+ "python": PythonProvider,
245
+ "go": GoProvider, # Add new provider
246
+ }
247
+
248
+ ALIASES: dict[str, str] = {
249
+ # ... existing aliases
250
+ "golang": "go",
251
+ }
252
+ ```
253
+
254
+ ## Adding a New Output Format
255
+
256
+ To add a new output format, create a reporter in `woolly/reporters/`:
257
+
258
+ ```python
259
+ # woolly/reporters/html.py
260
+ from woolly.reporters.base import Reporter, ReportData
261
+
262
+
263
+ class HtmlReporter(Reporter):
264
+ """HTML report with interactive tree."""
265
+
266
+ name = "html"
267
+ description = "HTML report with interactive dependency tree"
268
+ file_extension = "html"
269
+ writes_to_file = True
270
+
271
+ def generate(self, data: ReportData) -> str:
272
+ """Generate HTML content."""
273
+ ...
274
+ ```
275
+
276
+ Then register it in `woolly/reporters/__init__.py`.
277
+
278
+ ## Notes
279
+
280
+ - Results should be verified manually — some packages may have different names in Fedora
281
+ - Platform-specific dependencies (like `windows-*` crates) are shown as missing but aren't needed on Linux
282
+ - The tool uses `dnf repoquery` to check Fedora packages, so it must run on a Fedora system or have access to Fedora repos
283
+ - Cache is stored in `~/.cache/woolly` and can be cleared with `woolly clear-cache`
284
+
285
+ ## License
286
+
287
+ MIT License — see [LICENSE](LICENSE) for details.
288
+
289
+ ## Credits
290
+
291
+ - **[Rodolfo Olivieri (@r0x0d)](https://github.com/r0x0d)** — Creator and maintainer
292
+ - **[Claude](https://claude.ai)** — AI pair programmer by [Anthropic](https://anthropic.com)
@@ -0,0 +1,16 @@
1
+ Report for {{ root_package }}
2
+
3
+ Generated: {{ timestamp }}
4
+ Language: {{ language }}
5
+
6
+ ## Summary
7
+ - Total: {{ total_dependencies }}
8
+ - Packaged: {{ packaged_count }}
9
+ - Missing: {{ missing_count }}
10
+
11
+ {% if missing_packages %}
12
+ ## Missing Packages
13
+ {% for pkg in missing_packages %}
14
+ - {{ pkg }}
15
+ {% endfor %}
16
+ {% endif %}
@@ -37,6 +37,11 @@ classifiers = [
37
37
  "Topic :: Utilities",
38
38
  ]
39
39
 
40
+ [project.optional-dependencies]
41
+ template = [
42
+ "jinja2>=3.1.0",
43
+ ]
44
+
40
45
  [project.url]
41
46
  "Source code" = "https://github.com/r0x0d/woolly"
42
47
  "Bug Tracker" = "https://github.com/r0x0d/woolly/issues"