codinsight 0.4.1__tar.gz → 0.4.2__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 (26) hide show
  1. {codinsight-0.4.1 → codinsight-0.4.2}/PKG-INFO +1 -1
  2. {codinsight-0.4.1 → codinsight-0.4.2}/pyproject.toml +1 -1
  3. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/vector.py +14 -5
  4. {codinsight-0.4.1 → codinsight-0.4.2}/src/codinsight.egg-info/PKG-INFO +1 -1
  5. {codinsight-0.4.1 → codinsight-0.4.2}/README.md +0 -0
  6. {codinsight-0.4.1 → codinsight-0.4.2}/setup.cfg +0 -0
  7. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/__init__.py +0 -0
  8. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/__init__.py +0 -0
  9. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/abstract.py +0 -0
  10. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/algorithm.py +0 -0
  11. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/complexity.py +0 -0
  12. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/quality.py +0 -0
  13. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/readability.py +0 -0
  14. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/redundancy.py +0 -0
  15. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/security.py +0 -0
  16. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/struct.py +0 -0
  17. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/code_analysis/style.py +0 -0
  18. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/core.py +0 -0
  19. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/multi_analysis.py +0 -0
  20. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/py.typed +0 -0
  21. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/trend_analysis/__init__.py +0 -0
  22. {codinsight-0.4.1 → codinsight-0.4.2}/src/code_insight/trend_analysis/trend_analysis.py +0 -0
  23. {codinsight-0.4.1 → codinsight-0.4.2}/src/codinsight.egg-info/SOURCES.txt +0 -0
  24. {codinsight-0.4.1 → codinsight-0.4.2}/src/codinsight.egg-info/dependency_links.txt +0 -0
  25. {codinsight-0.4.1 → codinsight-0.4.2}/src/codinsight.egg-info/requires.txt +0 -0
  26. {codinsight-0.4.1 → codinsight-0.4.2}/src/codinsight.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codinsight
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codinsight"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Add your description here"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"
@@ -1,3 +1,5 @@
1
+ from codetovec import CodeToVec
2
+ from pydantic import model_serializer
1
3
 
2
4
  from code_insight.code_analysis.abstract import (
3
5
  AbstractAnalysis,
@@ -5,8 +7,6 @@ from code_insight.code_analysis.abstract import (
5
7
  BaseAnalysisResult,
6
8
  )
7
9
 
8
- from codetovec import CodeToVec
9
-
10
10
 
11
11
  class VectorAnalysisConfig(BaseAnalysisConfig):
12
12
  """
@@ -39,11 +39,20 @@ class VectorAnalysisResult(BaseAnalysisResult):
39
39
 
40
40
  vector: list[float]
41
41
 
42
+ @model_serializer
43
+ def serialize_model(self) -> dict[str, float]:
44
+ """モデルをフラットな辞書としてシリアライズします。
45
+
46
+ Returns
47
+ -------
48
+ dict[str, float]
49
+ 展開されたベクトルの辞書表現
50
+ """
51
+ return {f"vector_{i}": float(v) for i, v in enumerate(self.vector)}
52
+
42
53
 
43
54
  class Vector(AbstractAnalysis[VectorAnalysisResult, VectorAnalysisConfig]):
44
- """
45
- ベクトル解析クラス
46
- """
55
+ """ベクトル解析クラス"""
47
56
 
48
57
  def get_default_config(self) -> VectorAnalysisConfig:
49
58
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codinsight
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes