redup 0.4.2__tar.gz → 0.4.4__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.2 → redup-0.4.4}/PKG-INFO +2 -2
- {redup-0.4.2 → redup-0.4.4}/README.md +1 -1
- {redup-0.4.2 → redup-0.4.4}/pyproject.toml +1 -1
- {redup-0.4.2 → redup-0.4.4}/src/redup/__init__.py +1 -1
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/output_writer.py +11 -11
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/scan_commands.py +2 -1
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/PKG-INFO +2 -2
- {redup-0.4.2 → redup-0.4.4}/tests/test_e2e.py +1 -1
- {redup-0.4.2 → redup-0.4.4}/LICENSE +0 -0
- {redup-0.4.2 → redup-0.4.4}/setup.cfg +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/__main__.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/__init__.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/config_builder.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/fuzzy_similarity.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/main.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/cli_app/scan_helpers.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/__init__.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/cache.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/config.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/differ.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/fuzzy_similarity.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/hash_cache.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/hasher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/lazy_grouper.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/lsh_matcher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/matcher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/models.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/pipeline.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/planner.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/python_parser.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/scanner.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/semantic.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/ts_extractor.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/universal_fuzzy.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/__init__.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/diff_helpers.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/duplicate_finders.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/function_extractor.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/hash_utils.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/core/utils/language_dispatcher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/mcp_server.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/__init__.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/code2llm_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/enhanced_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/json_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/markdown_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/toon_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup/reporters/yaml_reporter.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/SOURCES.txt +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/dependency_links.txt +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/entry_points.txt +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/requires.txt +0 -0
- {redup-0.4.2 → redup-0.4.4}/src/redup.egg-info/top_level.txt +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_hasher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_matcher.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_mcp_server.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_models.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_pipeline.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_planner.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_reporters.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/tests/test_scanner.py +0 -0
- {redup-0.4.2 → redup-0.4.4}/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.4
|
|
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
|
|
@@ -92,7 +92,7 @@ Dynamic: license-file
|
|
|
92
92
|
[](https://pypi.org/project/redup/)
|
|
93
93
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
94
94
|
[](https://python.org)
|
|
95
|
-
[](https://pypi.org/project/redup/)
|
|
96
96
|
|
|
97
97
|
reDUP scans codebases for duplicated functions, blocks, and structural patterns — then builds a prioritized refactoring map that LLMs can consume to eliminate redundancy systematically.
|
|
98
98
|
|
|
@@ -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
|
|
|
@@ -61,18 +61,18 @@ def write_results(dup_map: DuplicationMap, format: str, output: Any, path: Path)
|
|
|
61
61
|
"markdown": to_markdown(dup_map),
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
# Determine and create output directory
|
|
65
|
+
if output:
|
|
66
|
+
# Create output directory if it doesn't exist
|
|
67
|
+
output.mkdir(parents=True, exist_ok=True)
|
|
68
|
+
base_dir = output
|
|
69
69
|
else:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
base_dir = path
|
|
71
|
+
|
|
72
|
+
for fmt, content in formats.items():
|
|
73
|
+
target = base_dir / f"duplication.{fmt}"
|
|
74
|
+
target.write_text(content, encoding="utf-8")
|
|
75
|
+
typer.echo(f" → {target}")
|
|
76
76
|
else:
|
|
77
77
|
typer.echo(f"❌ Unknown format: {format}", err=True)
|
|
78
78
|
raise typer.Exit(1)
|
|
@@ -150,8 +150,9 @@ def info_command() -> None:
|
|
|
150
150
|
# Check optional dependencies
|
|
151
151
|
deps = {
|
|
152
152
|
"tree-sitter": "tree_sitter",
|
|
153
|
-
"datasketch": "datasketch",
|
|
153
|
+
"datasketch": "datasketch",
|
|
154
154
|
"rapidfuzz": "rapidfuzz",
|
|
155
|
+
"pyyaml": "yaml",
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
typer.echo("\nOptional dependencies:")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redup
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
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
|
|
@@ -92,7 +92,7 @@ Dynamic: license-file
|
|
|
92
92
|
[](https://pypi.org/project/redup/)
|
|
93
93
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
94
94
|
[](https://python.org)
|
|
95
|
-
[](https://pypi.org/project/redup/)
|
|
96
96
|
|
|
97
97
|
reDUP scans codebases for duplicated functions, blocks, and structural patterns — then builds a prioritized refactoring map that LLMs can consume to eliminate redundancy systematically.
|
|
98
98
|
|
|
@@ -398,7 +398,7 @@ class TestFullRoundtrip:
|
|
|
398
398
|
assert tax["occurrences"] == 3
|
|
399
399
|
assert tax["saved_lines_potential"] > 0
|
|
400
400
|
|
|
401
|
-
files_in_frags = {f["file"] for f in tax["fragments"]}
|
|
401
|
+
files_in_frags = {Path(f["file"]).name for f in tax["fragments"]}
|
|
402
402
|
assert "billing.py" in files_in_frags
|
|
403
403
|
assert "shipping.py" in files_in_frags
|
|
404
404
|
assert "returns.py" in files_in_frags
|
|
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
|