duplicatecode 0.3.1__py3-none-win_amd64.whl → 0.3.2__py3-none-win_amd64.whl

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: duplicatecode
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Environment :: Console
6
6
  Summary: Static (LLM-free) detection of duplicate/similar code in Python, TypeScript/JavaScript, SQL and C#
@@ -71,13 +71,15 @@ Two optional signals, both off by default (the detector stays static and offline
71
71
  > **Privacy warning.** `--embed openai`, `--embed cohere`, and `--embed-code` / `--embeddings` pointed at any
72
72
  > hosted endpoint (OpenAI, Cohere, Azure, ...) **upload the source text of your units** to that provider
73
73
  > (`--embeddings` sends identifier names only). `find` embeds **every unit under the given paths**, so
74
- > `find ... --embed openai` uploads all of it. The local presets (`minilm`, `qwen3`, `potion`) are meant for a
75
- > server on loopback (default `127.0.0.1:8099`; `DUPLICATECODE_EMBED_ENDPOINT` overrides it): pointing that
74
+ > `find ... --embed openai` uploads all of it. The local presets (`gemma`, `minilm`, `qwen3`, `potion`) are meant for a
75
+ > server on loopback (`gemma`: ollama on `127.0.0.1:11434`, the others `127.0.0.1:8099`; `DUPLICATECODE_EMBED_ENDPOINT` overrides it): pointing that
76
76
  > variable at a remote host sends text there too. Do not use hosted embeddings on code you may not share.
77
77
 
78
78
  - `--embeddings` embeds identifier *names* (cheap) as an extra name-similarity signal.
79
- - `--embed <preset>` is the short form (`minilm`, `qwen3`, `potion`, `openai`, `cohere`; `qwen3` is about 5x slower than `minilm` on CPU, so use it with a GPU or prefer `minilm`) and implies
80
- `--embed-code`. Model ids go into the cache key, so vectors of different models never mix.
79
+ - `--embed` is the short form and implies `--embed-code`. A bare `--embed` uses **`gemma`** (embeddinggemma via a local
80
+ [ollama](https://ollama.com): `ollama pull embeddinggemma`), the best model in the codebase benchmark (issue #12: re-implementation
81
+ retrieval R@1 0.94 vs 0.89 for the static detector alone, unchanged when function names are masked). Other presets:
82
+ `--embed=minilm|qwen3|potion|openai|cohere`; MiniLM is smaller but clearly weaker (0.85) and leans on names. Model ids go into the cache key, so vectors of different models never mix.
81
83
  - `--embed-code` embeds the *whole text of every unit* (function, class, file, SQL statement) and blends
82
84
  the cosine into the score (`--embed-weight`, default 0.35, others scaled by 1 - weight). It finds
83
85
  re-implementations that share no tokens. On function-level LLM re-implementations it lifted Python from
@@ -97,7 +99,8 @@ export OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=anything OPENAI_
97
99
  export AZURE_AI_FOUNDRY_ENDPOINT=https://<res>.services.ai.azure.com
98
100
  export AZURE_AI_FOUNDRY_API_KEY=... AZURE_AI_FOUNDRY_EMBEDDING_DEPLOYMENT=text-embedding-3-small
99
101
  # Azure OpenAI: AZURE_OPENAI_ENDPOINT / AZURE_OPENAI_API_KEY / AZURE_OPENAI_EMBEDDING_DEPLOYMENT
100
- # Fully local, no key: start the server once (CPU; it loads whichever model a request names)
102
+ # Fully local, no key, recommended: ollama pull embeddinggemma && duplicatecode scan . --embed (GPU: ~5 ms per unit)
103
+ # Other local models: start the server once (CPU; it loads whichever model a request names)
101
104
  # uv run --no-project --python 3.12 eval/embed_server.py
102
105
  # duplicatecode scan . --embed minilm # or: qwen3, potion (default endpoint 127.0.0.1:8099)
103
106
  # Hosted presets: --embed openai (OPENAI_API_KEY), --embed cohere (COHERE_API_KEY)
@@ -0,0 +1,5 @@
1
+ duplicatecode-0.3.2.data/scripts/duplicatecode.exe,sha256=GMEyfGmRO_Zz_1cxqLnF4qDXUXlYWZvkZmL64ZEiDIQ,17515520
2
+ duplicatecode-0.3.2.dist-info/METADATA,sha256=aL-J7lqHKeSxRM_3lyy7t2NWBub4KV86wNqDFepYLQI,21127
3
+ duplicatecode-0.3.2.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
4
+ duplicatecode-0.3.2.dist-info/sboms/duplicatecode.cyclonedx.json,sha256=yohNjoxi1_-lKbdeW4X2DEnAQRzHzB5-z5RUhEb65lQ,126750
5
+ duplicatecode-0.3.2.dist-info/RECORD,,
@@ -2,9 +2,9 @@
2
2
  "bomFormat": "CycloneDX",
3
3
  "specVersion": "1.5",
4
4
  "version": 1,
5
- "serialNumber": "urn:uuid:f5087dff-39cc-49e3-b7f1-add6f1b591d6",
5
+ "serialNumber": "urn:uuid:e7a9066e-32b8-4d25-bcea-b110a169e4e6",
6
6
  "metadata": {
7
- "timestamp": "2026-10-07T09:33:02.890409000Z",
7
+ "timestamp": "2026-10-07T12:18:30.336841100Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "CycloneDX",
@@ -14,9 +14,9 @@
14
14
  ],
15
15
  "component": {
16
16
  "type": "application",
17
- "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.1",
17
+ "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.2",
18
18
  "name": "duplicatecode",
19
- "version": "0.3.1",
19
+ "version": "0.3.2",
20
20
  "description": "CLI to detect duplicate/similar code in Python and TypeScript",
21
21
  "scope": "required",
22
22
  "licenses": [
@@ -24,14 +24,14 @@
24
24
  "expression": "MIT"
25
25
  }
26
26
  ],
27
- "purl": "pkg:cargo/duplicatecode@0.3.1?download_url=file://.",
27
+ "purl": "pkg:cargo/duplicatecode@0.3.2?download_url=file://.",
28
28
  "components": [
29
29
  {
30
30
  "type": "application",
31
- "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.1 bin-target-0",
31
+ "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.2 bin-target-0",
32
32
  "name": "duplicatecode",
33
- "version": "0.3.1",
34
- "purl": "pkg:cargo/duplicatecode@0.3.1?download_url=file://.#src/main.rs"
33
+ "version": "0.3.2",
34
+ "purl": "pkg:cargo/duplicatecode@0.3.2?download_url=file://.#src/main.rs"
35
35
  }
36
36
  ]
37
37
  },
@@ -45,9 +45,9 @@
45
45
  "components": [
46
46
  {
47
47
  "type": "library",
48
- "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.1",
48
+ "bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.2",
49
49
  "name": "duplicatecode-engine",
50
- "version": "0.3.1",
50
+ "version": "0.3.2",
51
51
  "description": "Static duplicate/similar code detection engine for Python, TypeScript/JavaScript, SQL and C#",
52
52
  "scope": "required",
53
53
  "licenses": [
@@ -55,7 +55,7 @@
55
55
  "expression": "MIT"
56
56
  }
57
57
  ],
58
- "purl": "pkg:cargo/duplicatecode-engine@0.3.1?download_url=file://..\\duplicatecode-engine"
58
+ "purl": "pkg:cargo/duplicatecode-engine@0.3.2?download_url=file://..\\duplicatecode-engine"
59
59
  },
60
60
  {
61
61
  "type": "library",
@@ -3324,11 +3324,11 @@
3324
3324
  ],
3325
3325
  "dependencies": [
3326
3326
  {
3327
- "ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.1",
3327
+ "ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.3.2",
3328
3328
  "dependsOn": [
3329
3329
  "registry+https://github.com/rust-lang/crates.io-index#anyhow@1.0.104",
3330
3330
  "registry+https://github.com/rust-lang/crates.io-index#clap@4.6.7",
3331
- "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.1",
3331
+ "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.2",
3332
3332
  "registry+https://github.com/rust-lang/crates.io-index#rayon@1.12.0",
3333
3333
  "registry+https://github.com/rust-lang/crates.io-index#serde@1.0.229",
3334
3334
  "registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.151",
@@ -3337,7 +3337,7 @@
3337
3337
  ]
3338
3338
  },
3339
3339
  {
3340
- "ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.1",
3340
+ "ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.3.2",
3341
3341
  "dependsOn": [
3342
3342
  "registry+https://github.com/rust-lang/crates.io-index#ignore@0.4.33",
3343
3343
  "registry+https://github.com/rust-lang/crates.io-index#serde@1.0.229",
@@ -1,5 +0,0 @@
1
- duplicatecode-0.3.1.data/scripts/duplicatecode.exe,sha256=33sUDGbK4bx4ia2FRp7sr2VNCqXbDEv8d2PB-586Ydw,17516032
2
- duplicatecode-0.3.1.dist-info/METADATA,sha256=O5SLA8he4Y3B-lFxwEAIERR0oQAO9uvq_FcKHJVVSMM,20682
3
- duplicatecode-0.3.1.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
4
- duplicatecode-0.3.1.dist-info/sboms/duplicatecode.cyclonedx.json,sha256=XyVdeAxDdFGNhcXz_Jq2o4fltkDfZerwCTzRKtU6dSo,126750
5
- duplicatecode-0.3.1.dist-info/RECORD,,