code2logic 1.0.4__tar.gz → 1.0.5__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 (85) hide show
  1. {code2logic-1.0.4 → code2logic-1.0.5}/PKG-INFO +28 -13
  2. {code2logic-1.0.4 → code2logic-1.0.5}/README.md +23 -8
  3. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/__init__.py +1 -1
  4. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/benchmarks/runner.py +19 -5
  5. {code2logic-1.0.4 → code2logic-1.0.5}/pyproject.toml +6 -6
  6. {code2logic-1.0.4 → code2logic-1.0.5}/.gitignore +0 -0
  7. {code2logic-1.0.4 → code2logic-1.0.5}/CHANGELOG.md +0 -0
  8. {code2logic-1.0.4 → code2logic-1.0.5}/LICENSE +0 -0
  9. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/__main__.py +0 -0
  10. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/adaptive.py +0 -0
  11. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/analyzer.py +0 -0
  12. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/base.py +0 -0
  13. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/benchmark.py +0 -0
  14. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/benchmarks/__init__.py +0 -0
  15. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/benchmarks/common.py +0 -0
  16. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/benchmarks/results.py +0 -0
  17. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/chunked_reproduction.py +0 -0
  18. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/cli.py +0 -0
  19. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/code_review.py +0 -0
  20. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/config.py +0 -0
  21. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/core/__init__.py +0 -0
  22. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/dependency.py +0 -0
  23. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/errors.py +0 -0
  24. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/file_formats.py +0 -0
  25. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/formats/__init__.py +0 -0
  26. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/generators.py +0 -0
  27. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/gherkin.py +0 -0
  28. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/integrations/__init__.py +0 -0
  29. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/intent.py +0 -0
  30. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/llm/__init__.py +0 -0
  31. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/llm.py +0 -0
  32. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/llm_clients.py +0 -0
  33. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/llm_profiler.py +0 -0
  34. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/logicml.py +0 -0
  35. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/markdown_format.py +0 -0
  36. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/mcp_server.py +0 -0
  37. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/metrics.py +0 -0
  38. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/models.py +0 -0
  39. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/parsers.py +0 -0
  40. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/project_reproducer.py +0 -0
  41. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/prompts.py +0 -0
  42. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/py.typed +0 -0
  43. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/quality.py +0 -0
  44. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/refactor.py +0 -0
  45. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/reproducer.py +0 -0
  46. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/reproduction.py +0 -0
  47. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/schemas/__init__.py +0 -0
  48. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/schemas/json_schema.py +0 -0
  49. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/schemas/logicml_schema.py +0 -0
  50. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/schemas/markdown_schema.py +0 -0
  51. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/schemas/yaml_schema.py +0 -0
  52. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/similarity.py +0 -0
  53. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/terminal.py +0 -0
  54. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/tools/__init__.py +0 -0
  55. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/toon_format.py +0 -0
  56. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/universal.py +0 -0
  57. {code2logic-1.0.4 → code2logic-1.0.5}/code2logic/utils.py +0 -0
  58. {code2logic-1.0.4 → code2logic-1.0.5}/tests/__init__.py +0 -0
  59. {code2logic-1.0.4 → code2logic-1.0.5}/tests/conftest.py +0 -0
  60. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_algorithms.py +0 -0
  61. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_api.py +0 -0
  62. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_async.py +0 -0
  63. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_class.py +0 -0
  64. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_dataclasses.py +0 -0
  65. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_enum.py +0 -0
  66. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_functions.py +0 -0
  67. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_go.go +0 -0
  68. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_javascript.js +0 -0
  69. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_pydantic.py +0 -0
  70. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_reexport/__init__.py +0 -0
  71. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_reexport/exceptions.py +0 -0
  72. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_reexport/models.py +0 -0
  73. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_reexport/utils.py +0 -0
  74. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_rust.rs +0 -0
  75. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_sql.sql +0 -0
  76. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_sql_dsl.py +0 -0
  77. {code2logic-1.0.4 → code2logic-1.0.5}/tests/samples/sample_typescript.ts +0 -0
  78. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_analyzer.py +0 -0
  79. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_error_handling.py +0 -0
  80. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_formats.py +0 -0
  81. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_generators.py +0 -0
  82. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_intent.py +0 -0
  83. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_llm_priority.py +0 -0
  84. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_llm_profiler.py +0 -0
  85. {code2logic-1.0.4 → code2logic-1.0.5}/tests/test_reproduction.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code2logic
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: Convert source code to logical representation for LLM analysis
5
- Project-URL: Homepage, https://github.com/softreck/code2logic
5
+ Project-URL: Homepage, https://github.com/wronai/code2logic
6
6
  Project-URL: Documentation, https://code2logic.readthedocs.io
7
- Project-URL: Repository, https://github.com/softreck/code2logic.git
8
- Project-URL: Issues, https://github.com/softreck/code2logic/issues
9
- Project-URL: Changelog, https://github.com/softreck/code2logic/blob/main/CHANGELOG.md
7
+ Project-URL: Repository, https://github.com/wronai/code2logic.git
8
+ Project-URL: Issues, https://github.com/wronai/code2logic/issues
9
+ Project-URL: Changelog, https://github.com/wronai/code2logic/blob/main/CHANGELOG.md
10
10
  Author-email: Softreck <info@softreck.dev>
11
11
  Maintainer-email: Softreck <info@softreck.dev>
12
12
  License: MIT
@@ -75,7 +75,7 @@ Description-Content-Type: text/markdown
75
75
 
76
76
  **Convert source code to logical representation for LLM analysis.**
77
77
 
78
- Code2Logic analyzes codebases and generates compact, LLM-friendly representations with semantic understanding.
78
+ Code2Logic analyzes codebases and generates compact, LLM-friendly representations with semantic understanding.
79
79
  Perfect for feeding project context to AI assistants, building code documentation, or analyzing code structure.
80
80
 
81
81
  ## ✨ Features
@@ -90,16 +90,19 @@ Perfect for feeding project context to AI assistants, building code documentatio
90
90
  ## 🚀 Installation
91
91
 
92
92
  ### Basic (no dependencies)
93
+
93
94
  ```bash
94
95
  pip install code2logic
95
96
  ```
96
97
 
97
98
  ### Full (all features)
99
+
98
100
  ```bash
99
101
  pip install code2logic[full]
100
102
  ```
101
103
 
102
104
  ### Selective features
105
+
103
106
  ```bash
104
107
  pip install code2logic[treesitter] # High-accuracy AST parsing
105
108
  pip install code2logic[graph] # Dependency analysis
@@ -178,7 +181,8 @@ Human-readable documentation with:
178
181
 
179
182
  ### Compact
180
183
  Ultra-compact format optimized for LLM context:
181
- ```
184
+
185
+ ```text
182
186
  # myproject | 102f 31875L | typescript:79/python:23
183
187
  ENTRY: index.ts main.py
184
188
  HUBS: evolution-manager llm-orchestrator
@@ -198,16 +202,19 @@ Machine-readable format for:
198
202
 
199
203
  ### Library Status
200
204
  Check which features are available:
205
+
201
206
  ```bash
202
207
  code2logic --status
203
208
  ```
204
- ```
209
+
210
+ ```text
205
211
  Library Status:
206
212
  tree_sitter: ✓
207
213
  networkx: ✓
208
214
  rapidfuzz: ✓
209
215
  nltk: ✗
210
216
  spacy: ✗
217
+ ```
211
218
 
212
219
  ### LLM Configuration
213
220
 
@@ -250,9 +257,9 @@ code2logic llm priority set-mode mixed
250
257
  ```
251
258
 
252
259
  Model priority rules are stored in `~/.code2logic/llm_config.json`.
253
- ```
254
260
 
255
261
  ### Python API
262
+
256
263
  ```python
257
264
  from code2logic import get_library_status
258
265
 
@@ -270,6 +277,7 @@ status = get_library_status()
270
277
 
271
278
  ### Intent Generation
272
279
  Functions get human-readable descriptions:
280
+
273
281
  ```yaml
274
282
  methods:
275
283
  async findById(id:string) -> Promise<User> # retrieves user by id
@@ -279,6 +287,7 @@ methods:
279
287
 
280
288
  ### Similarity Detection
281
289
  Find duplicate and similar functions:
290
+
282
291
  ```yaml
283
292
  Similar Functions:
284
293
  core/auth.ts::validateToken:
@@ -288,7 +297,7 @@ Similar Functions:
288
297
 
289
298
  ## 🏗️ Architecture
290
299
 
291
- ```
300
+ ```text
292
301
  code2logic/
293
302
  ├── analyzer.py # Main orchestrator
294
303
  ├── parsers.py # Tree-sitter + fallback parser
@@ -303,6 +312,7 @@ code2logic/
303
312
  ## 🔌 Integration Examples
304
313
 
305
314
  ### With Claude/ChatGPT
315
+
306
316
  ```python
307
317
  from code2logic import analyze_project, CompactGenerator
308
318
 
@@ -318,6 +328,7 @@ Analyze this codebase and suggest improvements:
318
328
  ```
319
329
 
320
330
  ### With RAG Systems
331
+
321
332
  ```python
322
333
  import json
323
334
  from code2logic import analyze_project, JSONGenerator
@@ -337,25 +348,29 @@ for module in data['modules']:
337
348
  ## 🧪 Development
338
349
 
339
350
  ### Setup
351
+
340
352
  ```bash
341
- git clone https://github.com/softreck/code2logic
353
+ git clone https://github.com/wronai/code2logic
342
354
  cd code2logic
343
355
  pip install -e ".[dev]"
344
356
  pre-commit install
345
357
  ```
346
358
 
347
359
  ### Tests
360
+
348
361
  ```bash
349
362
  pytest
350
363
  pytest --cov=code2logic --cov-report=html
351
364
  ```
352
365
 
353
366
  ### Type Checking
367
+
354
368
  ```bash
355
369
  mypy code2logic
356
370
  ```
357
371
 
358
372
  ### Linting
373
+
359
374
  ```bash
360
375
  ruff check code2logic
361
376
  black code2logic
@@ -436,5 +451,5 @@ Apache 2 License - see [LICENSE](LICENSE) for details.
436
451
 
437
452
  - [Documentation](https://code2logic.readthedocs.io)
438
453
  - [PyPI](https://pypi.org/project/code2logic/)
439
- - [GitHub](https://github.com/softreck/code2logic)
440
- - [Issues](https://github.com/softreck/code2logic/issues)
454
+ - [GitHub](https://github.com/wronai/code2logic)
455
+ - [Issues](https://github.com/wronai/code2logic/issues)
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Convert source code to logical representation for LLM analysis.**
8
8
 
9
- Code2Logic analyzes codebases and generates compact, LLM-friendly representations with semantic understanding.
9
+ Code2Logic analyzes codebases and generates compact, LLM-friendly representations with semantic understanding.
10
10
  Perfect for feeding project context to AI assistants, building code documentation, or analyzing code structure.
11
11
 
12
12
  ## ✨ Features
@@ -21,16 +21,19 @@ Perfect for feeding project context to AI assistants, building code documentatio
21
21
  ## 🚀 Installation
22
22
 
23
23
  ### Basic (no dependencies)
24
+
24
25
  ```bash
25
26
  pip install code2logic
26
27
  ```
27
28
 
28
29
  ### Full (all features)
30
+
29
31
  ```bash
30
32
  pip install code2logic[full]
31
33
  ```
32
34
 
33
35
  ### Selective features
36
+
34
37
  ```bash
35
38
  pip install code2logic[treesitter] # High-accuracy AST parsing
36
39
  pip install code2logic[graph] # Dependency analysis
@@ -109,7 +112,8 @@ Human-readable documentation with:
109
112
 
110
113
  ### Compact
111
114
  Ultra-compact format optimized for LLM context:
112
- ```
115
+
116
+ ```text
113
117
  # myproject | 102f 31875L | typescript:79/python:23
114
118
  ENTRY: index.ts main.py
115
119
  HUBS: evolution-manager llm-orchestrator
@@ -129,16 +133,19 @@ Machine-readable format for:
129
133
 
130
134
  ### Library Status
131
135
  Check which features are available:
136
+
132
137
  ```bash
133
138
  code2logic --status
134
139
  ```
135
- ```
140
+
141
+ ```text
136
142
  Library Status:
137
143
  tree_sitter: ✓
138
144
  networkx: ✓
139
145
  rapidfuzz: ✓
140
146
  nltk: ✗
141
147
  spacy: ✗
148
+ ```
142
149
 
143
150
  ### LLM Configuration
144
151
 
@@ -181,9 +188,9 @@ code2logic llm priority set-mode mixed
181
188
  ```
182
189
 
183
190
  Model priority rules are stored in `~/.code2logic/llm_config.json`.
184
- ```
185
191
 
186
192
  ### Python API
193
+
187
194
  ```python
188
195
  from code2logic import get_library_status
189
196
 
@@ -201,6 +208,7 @@ status = get_library_status()
201
208
 
202
209
  ### Intent Generation
203
210
  Functions get human-readable descriptions:
211
+
204
212
  ```yaml
205
213
  methods:
206
214
  async findById(id:string) -> Promise<User> # retrieves user by id
@@ -210,6 +218,7 @@ methods:
210
218
 
211
219
  ### Similarity Detection
212
220
  Find duplicate and similar functions:
221
+
213
222
  ```yaml
214
223
  Similar Functions:
215
224
  core/auth.ts::validateToken:
@@ -219,7 +228,7 @@ Similar Functions:
219
228
 
220
229
  ## 🏗️ Architecture
221
230
 
222
- ```
231
+ ```text
223
232
  code2logic/
224
233
  ├── analyzer.py # Main orchestrator
225
234
  ├── parsers.py # Tree-sitter + fallback parser
@@ -234,6 +243,7 @@ code2logic/
234
243
  ## 🔌 Integration Examples
235
244
 
236
245
  ### With Claude/ChatGPT
246
+
237
247
  ```python
238
248
  from code2logic import analyze_project, CompactGenerator
239
249
 
@@ -249,6 +259,7 @@ Analyze this codebase and suggest improvements:
249
259
  ```
250
260
 
251
261
  ### With RAG Systems
262
+
252
263
  ```python
253
264
  import json
254
265
  from code2logic import analyze_project, JSONGenerator
@@ -268,25 +279,29 @@ for module in data['modules']:
268
279
  ## 🧪 Development
269
280
 
270
281
  ### Setup
282
+
271
283
  ```bash
272
- git clone https://github.com/softreck/code2logic
284
+ git clone https://github.com/wronai/code2logic
273
285
  cd code2logic
274
286
  pip install -e ".[dev]"
275
287
  pre-commit install
276
288
  ```
277
289
 
278
290
  ### Tests
291
+
279
292
  ```bash
280
293
  pytest
281
294
  pytest --cov=code2logic --cov-report=html
282
295
  ```
283
296
 
284
297
  ### Type Checking
298
+
285
299
  ```bash
286
300
  mypy code2logic
287
301
  ```
288
302
 
289
303
  ### Linting
304
+
290
305
  ```bash
291
306
  ruff check code2logic
292
307
  black code2logic
@@ -367,5 +382,5 @@ Apache 2 License - see [LICENSE](LICENSE) for details.
367
382
 
368
383
  - [Documentation](https://code2logic.readthedocs.io)
369
384
  - [PyPI](https://pypi.org/project/code2logic/)
370
- - [GitHub](https://github.com/softreck/code2logic)
371
- - [Issues](https://github.com/softreck/code2logic/issues)
385
+ - [GitHub](https://github.com/wronai/code2logic)
386
+ - [Issues](https://github.com/wronai/code2logic/issues)
@@ -18,7 +18,7 @@ Example:
18
18
  >>> print(output)
19
19
  """
20
20
 
21
- __version__ = "1.0.4"
21
+ __version__ = "1.0.5"
22
22
  __author__ = "Softreck"
23
23
  __email__ = "info@softreck.dev"
24
24
  __license__ = "MIT"
@@ -366,7 +366,12 @@ class {cls}:
366
366
  BenchmarkResult
367
367
  """
368
368
  formats = formats or self.config.formats
369
- client = self._get_client()
369
+
370
+ client: Optional[BaseLLMClient]
371
+ if self._should_use_llm():
372
+ client = self._get_client()
373
+ else:
374
+ client = None
370
375
 
371
376
  result = BenchmarkResult(
372
377
  benchmark_type='file',
@@ -458,8 +463,12 @@ class {cls}:
458
463
  BenchmarkResult with function results
459
464
  """
460
465
  from ..parsers import UniversalParser
461
-
462
- client = self._get_client()
466
+
467
+ client: Optional[BaseLLMClient]
468
+ if self._should_use_llm():
469
+ client = self._get_client()
470
+ else:
471
+ client = None
463
472
 
464
473
  result = BenchmarkResult(
465
474
  benchmark_type='function',
@@ -612,7 +621,12 @@ Requirements:
612
621
  BenchmarkResult with project-level data
613
622
  """
614
623
  formats = formats or self.config.formats
615
- client = self._get_client()
624
+
625
+ client: Optional[BaseLLMClient]
626
+ if self._should_use_llm():
627
+ client = self._get_client()
628
+ else:
629
+ client = None
616
630
 
617
631
  result = BenchmarkResult(
618
632
  benchmark_type='project',
@@ -686,7 +700,7 @@ Requirements:
686
700
  module_info,
687
701
  fmt: str,
688
702
  project_root: str,
689
- client: BaseLLMClient,
703
+ client: Optional[BaseLLMClient],
690
704
  verbose: bool = False,
691
705
  ) -> FileResult:
692
706
  """Reproduce a single module."""
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code2logic"
7
- version = "1.0.4"
7
+ version = "1.0.5"
8
8
  description = "Convert source code to logical representation for LLM analysis"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -114,11 +114,11 @@ code2logic = "code2logic.cli:main"
114
114
  code2logic-mcp = "code2logic.mcp_server:run_server"
115
115
 
116
116
  [project.urls]
117
- Homepage = "https://github.com/softreck/code2logic"
117
+ Homepage = "https://github.com/wronai/code2logic"
118
118
  Documentation = "https://code2logic.readthedocs.io"
119
- Repository = "https://github.com/softreck/code2logic.git"
120
- Issues = "https://github.com/softreck/code2logic/issues"
121
- Changelog = "https://github.com/softreck/code2logic/blob/main/CHANGELOG.md"
119
+ Repository = "https://github.com/wronai/code2logic.git"
120
+ Issues = "https://github.com/wronai/code2logic/issues"
121
+ Changelog = "https://github.com/wronai/code2logic/blob/main/CHANGELOG.md"
122
122
 
123
123
  [tool.hatch.build.targets.sdist]
124
124
  include = [
@@ -206,7 +206,7 @@ module = [
206
206
  ignore_missing_imports = true
207
207
 
208
208
  [tool.bumpver]
209
- current_version = "1.0.4"
209
+ current_version = "1.0.5"
210
210
  version_pattern = "MAJOR.MINOR.PATCH"
211
211
  commit = false
212
212
  tag = false
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes