redup 0.4.6__tar.gz → 0.4.8__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.
- {redup-0.4.6 → redup-0.4.8}/PKG-INFO +3 -3
- {redup-0.4.6 → redup-0.4.8}/README.md +2 -2
- {redup-0.4.6 → redup-0.4.8}/pyproject.toml +1 -1
- {redup-0.4.6 → redup-0.4.8}/src/redup/__init__.py +1 -1
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/main.py +1 -1
- {redup-0.4.6 → redup-0.4.8}/src/redup/config.py +13 -3
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/PKG-INFO +3 -3
- {redup-0.4.6 → redup-0.4.8}/LICENSE +0 -0
- {redup-0.4.6 → redup-0.4.8}/setup.cfg +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/__main__.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/__init__.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/config_builder.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/fuzzy_similarity.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/output_writer.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/scan_commands.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/cli_app/scan_helpers.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/__init__.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/cache.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/config.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/differ.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/fuzzy_similarity.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/hash_cache.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/hasher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/lazy_grouper.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/lsh_matcher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/matcher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/models.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/pipeline.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/planner.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/python_parser.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/scanner.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/semantic.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/ts_extractor.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/universal_fuzzy.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/__init__.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/diff_helpers.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/duplicate_finders.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/function_extractor.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/hash_utils.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/core/utils/language_dispatcher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/mcp_server.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/__init__.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/code2llm_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/enhanced_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/json_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/markdown_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/toon_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup/reporters/yaml_reporter.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/SOURCES.txt +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/dependency_links.txt +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/entry_points.txt +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/requires.txt +0 -0
- {redup-0.4.6 → redup-0.4.8}/src/redup.egg-info/top_level.txt +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_e2e.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_hasher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_matcher.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_mcp_server.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_models.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_pipeline.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_planner.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_reporters.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_scanner.py +0 -0
- {redup-0.4.6 → redup-0.4.8}/tests/test_ts_extractor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redup
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.8
|
|
4
4
|
Summary: Code duplication analyzer and refactoring planner for LLMs
|
|
5
5
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -93,7 +93,7 @@ Dynamic: license-file
|
|
|
93
93
|
[](https://pypi.org/project/redup/)
|
|
94
94
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
95
95
|
[](https://python.org)
|
|
96
|
-
[](https://pypi.org/project/redup/)
|
|
97
97
|
|
|
98
98
|
reDUP scans codebases for duplicated functions, blocks, and structural patterns — then builds a prioritized refactoring map that LLMs can consume to eliminate redundancy systematically.
|
|
99
99
|
|
|
@@ -362,7 +362,7 @@ reDUP is part of the [wronai](https://github.com/wronai) developer toolchain:
|
|
|
362
362
|
### 📈 **Typical workflow:**
|
|
363
363
|
|
|
364
364
|
1. `code2llm` analyzes the project → `.toon` diagnostics
|
|
365
|
-
2. `redup` finds duplicates → `duplication.toon`
|
|
365
|
+
2. `redup` finds duplicates → `duplication.toon.yaml`
|
|
366
366
|
3. Feed both to an LLM for targeted refactoring
|
|
367
367
|
4. `vallm` validates the LLM's proposals before merging
|
|
368
368
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://pypi.org/project/redup/)
|
|
6
6
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
7
|
[](https://python.org)
|
|
8
|
-
[](https://pypi.org/project/redup/)
|
|
9
9
|
|
|
10
10
|
reDUP scans codebases for duplicated functions, blocks, and structural patterns — then builds a prioritized refactoring map that LLMs can consume to eliminate redundancy systematically.
|
|
11
11
|
|
|
@@ -274,7 +274,7 @@ reDUP is part of the [wronai](https://github.com/wronai) developer toolchain:
|
|
|
274
274
|
### 📈 **Typical workflow:**
|
|
275
275
|
|
|
276
276
|
1. `code2llm` analyzes the project → `.toon` diagnostics
|
|
277
|
-
2. `redup` finds duplicates → `duplication.toon`
|
|
277
|
+
2. `redup` finds duplicates → `duplication.toon.yaml`
|
|
278
278
|
3. Feed both to an LLM for targeted refactoring
|
|
279
279
|
4. `vallm` validates the LLM's proposals before merging
|
|
280
280
|
|
|
@@ -83,7 +83,7 @@ def scan(
|
|
|
83
83
|
no_functions_only: bool = typer.Option(
|
|
84
84
|
False,
|
|
85
85
|
"--no-functions-only",
|
|
86
|
-
help="Analyze all code, not just functions (default: functions-only
|
|
86
|
+
help="Analyze all code, not just functions (default: functions-only mode is ON).",
|
|
87
87
|
),
|
|
88
88
|
parallel: bool = typer.Option(
|
|
89
89
|
False,
|
|
@@ -149,15 +149,25 @@ def get_default_filename(suffix: str | None = None) -> str:
|
|
|
149
149
|
"""Get default output filename.
|
|
150
150
|
|
|
151
151
|
Args:
|
|
152
|
-
suffix: Optional file suffix. If None, uses the
|
|
152
|
+
suffix: Optional file suffix. If None, uses the full DEFAULT_OUTPUT_FILENAME.
|
|
153
|
+
If provided, constructs appropriate filename with that suffix.
|
|
153
154
|
|
|
154
155
|
Returns:
|
|
155
156
|
Default filename string.
|
|
156
157
|
"""
|
|
157
158
|
if suffix is None:
|
|
158
159
|
return config.DEFAULT_OUTPUT_FILENAME
|
|
159
|
-
|
|
160
|
-
base
|
|
160
|
+
|
|
161
|
+
# Get the base name without any extensions (e.g., "duplication.toon.yaml" -> "duplication")
|
|
162
|
+
# Split on all dots and take the first part as base
|
|
163
|
+
full_name = config.DEFAULT_OUTPUT_FILENAME
|
|
164
|
+
base = full_name.split(".")[0]
|
|
165
|
+
|
|
166
|
+
# For "toon" format, use the full default filename (duplication.toonyaml)
|
|
167
|
+
if suffix == "toon":
|
|
168
|
+
return config.DEFAULT_OUTPUT_FILENAME
|
|
169
|
+
|
|
170
|
+
# For other formats, use simple extension (duplication.json, duplication.yaml, etc.)
|
|
161
171
|
return f"{base}.{suffix}"
|
|
162
172
|
|
|
163
173
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redup
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.8
|
|
4
4
|
Summary: Code duplication analyzer and refactoring planner for LLMs
|
|
5
5
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -93,7 +93,7 @@ Dynamic: license-file
|
|
|
93
93
|
[](https://pypi.org/project/redup/)
|
|
94
94
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
95
95
|
[](https://python.org)
|
|
96
|
-
[](https://pypi.org/project/redup/)
|
|
97
97
|
|
|
98
98
|
reDUP scans codebases for duplicated functions, blocks, and structural patterns — then builds a prioritized refactoring map that LLMs can consume to eliminate redundancy systematically.
|
|
99
99
|
|
|
@@ -362,7 +362,7 @@ reDUP is part of the [wronai](https://github.com/wronai) developer toolchain:
|
|
|
362
362
|
### 📈 **Typical workflow:**
|
|
363
363
|
|
|
364
364
|
1. `code2llm` analyzes the project → `.toon` diagnostics
|
|
365
|
-
2. `redup` finds duplicates → `duplication.toon`
|
|
365
|
+
2. `redup` finds duplicates → `duplication.toon.yaml`
|
|
366
366
|
3. Feed both to an LLM for targeted refactoring
|
|
367
367
|
4. `vallm` validates the LLM's proposals before merging
|
|
368
368
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|