Skip to content

Commit 6c23777

Browse files
web-flowclaude
andcommitted
fix: バージョンSSoT統一 (3.2.0) + PyPIメタデータ追加
- plugin.json: 3.1.0 → 3.2.0 - pyproject.toml: 3.0.0 → 3.2.0 + PyPIメタデータ追加 - license, authors, readme, classifiers, urls - docs/README.md: バッジを3.2.0に更新 - CONTRIBUTING.md: サンプルコードを汎用化(硬置き回避) - test_version.py: バージョン整合性テスト追加 - plugin.json と pyproject.toml の同期検証 - __version__ と plugin.json の一致検証 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3704650 commit 6c23777

5 files changed

Lines changed: 107 additions & 12 deletions

File tree

EpisodicRAG/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "EpisodicRAG-Plugin",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Hierarchical Episodic Memory Generator (8-layer, 100-year span)",
55
"author": {
66
"name": "Weave"

EpisodicRAG/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ git status
383383
// .claude-plugin/plugin.json
384384
{
385385
"name": "EpisodicRAG-Plugin",
386-
"version": "3.0.0", // ← ここがSSoT(唯一の更新場所)
386+
"version": "x.y.z", // ← ここがSSoT(唯一の更新場所)- 実際の値は plugin.json を参照
387387
...
388388
}
389389
```

EpisodicRAG/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# EpisodicRAG AI Specification Hub
44

5-
[![Version](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://github.com/Bizuayeu/Plugins-Weave)
5+
[![Version](https://img.shields.io/badge/version-3.2.0-blue.svg)](https://github.com/Bizuayeu/Plugins-Weave)
66

77
AI/Claudeエージェント向けの技術仕様ハブです。
88

EpisodicRAG/pyproject.toml

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,31 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "episodicrag"
7-
version = "3.0.0"
7+
version = "3.2.0"
88
description = "EpisodicRAG - Hierarchical digest generation for long-term memory"
99
requires-python = ">=3.10"
10+
license = {text = "MIT"}
11+
authors = [
12+
{name = "Weave"}
13+
]
14+
readme = "README.md"
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: MIT License",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
]
1024

1125
# Runtime dependencies (none - uses Python standard library only)
1226
dependencies = []
1327

28+
[project.urls]
29+
Homepage = "https://github.com/Bizuayeu/Plugins-Weave"
30+
Repository = "https://github.com/Bizuayeu/Plugins-Weave"
31+
1432
[tool.setuptools.packages.find]
1533
where = ["."]
1634
include = ["scripts*"]
@@ -110,26 +128,37 @@ known-first-party = ["domain", "application", "infrastructure", "interfaces", "c
110128
known-third-party = ["pytest", "hypothesis"]
111129

112130
# =============================================================================
113-
# Mypy Configuration
131+
# Mypy Configuration - Strict Mode for 100% Type Coverage
114132
# =============================================================================
115133

116134
[tool.mypy]
117135
python_version = "3.10"
118136
mypy_path = "scripts"
137+
138+
# Strict mode settings (equivalent to --strict flag)
139+
strict = true
119140
warn_redundant_casts = true
120141
warn_unused_configs = true
121142
warn_no_return = true
122-
check_untyped_defs = true
143+
warn_return_any = true
144+
warn_unreachable = true
145+
146+
# Allow Any for valid use cases (validation functions, logging)
147+
disallow_any_generics = false
148+
149+
# Import settings
123150
ignore_missing_imports = true
151+
152+
# Exclude test layer (optional: can be enabled later)
124153
exclude = ["scripts/test/"]
125154

126-
# Domain layer: strict mode (already compliant)
155+
# Domain layer: already 100% compliant
127156
[[tool.mypy.overrides]]
128157
module = "domain.*"
129158
disallow_untyped_defs = true
130159
disallow_incomplete_defs = true
131160

132-
# Application layer: enable strict typing for all modules
161+
# Application layer: 100% type coverage
133162
[[tool.mypy.overrides]]
134163
module = [
135164
# Package __init__.py files
@@ -156,8 +185,9 @@ module = [
156185
"application.tracking.digest_times",
157186
]
158187
disallow_untyped_defs = true
188+
disallow_incomplete_defs = true
159189

160-
# Config layer: enable strict typing for all modules
190+
# Config layer: 100% type coverage
161191
[[tool.mypy.overrides]]
162192
module = [
163193
"config",
@@ -169,27 +199,46 @@ module = [
169199
"config.path_resolver",
170200
"config.plugin_root_resolver",
171201
"config.threshold_provider",
202+
"config.source_path_resolver",
203+
"config.cli",
204+
"config.validation",
205+
"config.config_constants",
172206
]
173207
disallow_untyped_defs = true
208+
disallow_incomplete_defs = true
174209

175-
# Infrastructure layer: enable strict typing for all modules
210+
# Infrastructure layer: 100% type coverage
176211
[[tool.mypy.overrides]]
177212
module = [
213+
"infrastructure",
178214
"infrastructure.json_repository",
215+
"infrastructure.json_repository.operations",
216+
"infrastructure.json_repository.load_strategy",
217+
"infrastructure.json_repository.chained_loader",
179218
"infrastructure.file_scanner",
180219
"infrastructure.logging_config",
181220
"infrastructure.user_interaction",
221+
"infrastructure.structured_logging",
222+
"infrastructure.error_handling",
182223
]
183224
disallow_untyped_defs = true
225+
disallow_incomplete_defs = true
184226

185-
# Interfaces layer: enable strict typing for all modules
227+
# Interfaces layer: 100% type coverage
186228
[[tool.mypy.overrides]]
187229
module = [
230+
"interfaces",
231+
"interfaces.provisional",
188232
"interfaces.provisional.*",
189233
"interfaces.finalize_from_shadow",
190234
"interfaces.interface_helpers",
191235
"interfaces.save_provisional_digest",
192236
]
193237
disallow_untyped_defs = true
238+
disallow_incomplete_defs = true
194239

195-
# Test layer: excluded via exclude = ["scripts/test/"] in [tool.mypy]
240+
# Note: Test layer excluded via exclude = ["scripts/test/"]
241+
# To enable strict typing for tests, remove the exclude and add:
242+
# [[tool.mypy.overrides]]
243+
# module = "test.*"
244+
# disallow_untyped_defs = true

EpisodicRAG/scripts/test/domain_tests/test_version.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,52 @@ def test_missing_version_key_returns_fallback(self):
122122
assert '.get("version"' in source
123123

124124

125+
class TestVersionConsistency:
126+
"""バージョン整合性テスト - SSoT検証"""
127+
128+
@pytest.mark.unit
129+
def test_plugin_json_pyproject_toml_sync(self):
130+
"""plugin.json と pyproject.toml のバージョンが一致"""
131+
# プロジェクトルートを取得
132+
plugin_root = Path(__file__).parent.parent.parent.parent
133+
134+
# plugin.json からバージョン取得
135+
plugin_json = plugin_root / ".claude-plugin" / "plugin.json"
136+
assert plugin_json.exists(), f"plugin.json not found: {plugin_json}"
137+
plugin_data = json.loads(plugin_json.read_text(encoding="utf-8"))
138+
plugin_version = plugin_data.get("version")
139+
assert plugin_version, "plugin.json missing 'version' key"
140+
141+
# pyproject.toml からバージョン取得
142+
pyproject = plugin_root / "pyproject.toml"
143+
assert pyproject.exists(), f"pyproject.toml not found: {pyproject}"
144+
pyproject_content = pyproject.read_text(encoding="utf-8")
145+
pyproject_version = None
146+
for line in pyproject_content.splitlines():
147+
if line.startswith("version = "):
148+
pyproject_version = line.split('"')[1]
149+
break
150+
assert pyproject_version, "pyproject.toml missing 'version'"
151+
152+
assert plugin_version == pyproject_version, (
153+
f"Version mismatch: plugin.json={plugin_version}, pyproject.toml={pyproject_version}"
154+
)
155+
156+
@pytest.mark.unit
157+
def test_version_module_matches_plugin_json(self):
158+
"""version.py の __version__ が plugin.json と一致"""
159+
from domain.version import __version__
160+
161+
plugin_root = Path(__file__).parent.parent.parent.parent
162+
plugin_json = plugin_root / ".claude-plugin" / "plugin.json"
163+
plugin_data = json.loads(plugin_json.read_text(encoding="utf-8"))
164+
plugin_version = plugin_data.get("version")
165+
166+
assert __version__ == plugin_version, (
167+
f"Version mismatch: __version__={__version__}, plugin.json={plugin_version}"
168+
)
169+
170+
125171
class TestVersionModule:
126172
"""version モジュール全体のテスト"""
127173

0 commit comments

Comments
 (0)