Skip to content

Commit eb95afa

Browse files
committed
fix: add missing __init__.py to prevent namespace package issue
Root cause: - src/metaspec/ lacked __init__.py, causing Python to treat it as a namespace package - metaspec.__file__ was None instead of pointing to the package location - This caused CliRunner tests to fail while actual CLI worked fine Impact: - CliRunner couldn't properly load command metadata from typer.Option/Argument - Tests failed with 'assert "--command" in result.stdout' even though options existed - Actual installed CLI worked correctly because it loaded via entry points Solution: - Add src/metaspec/__init__.py with package metadata - Now metaspec.__file__ points to /path/to/__init__.py (not None) - CliRunner and actual CLI both load the same properly initialized package Result: ✅ All 138 tests pass (4 previously failing tests now pass) ✅ metaspec is now a proper package, not a namespace package ✅ Consistent behavior between test environment and installed CLI
1 parent 67bb9d7 commit eb95afa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/metaspec/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
MetaSpec - Meta-specification framework for generating Spec-Driven X (SD-X) toolkits.
3+
4+
A framework that generates complete, production-ready speck its (spec-driven toolkits)
5+
from YAML definitions.
6+
"""
7+
8+
__version__ = "0.1.1"
9+
10+
__all__ = ["__version__"]
11+

0 commit comments

Comments
 (0)