fix tests

This commit is contained in:
Adil Hafeez 2025-12-25 21:33:31 -08:00
parent bcaa26ed71
commit 8d61316948
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
3 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,3 @@
"""Plano CLI - Intelligent Prompt Gateway."""
__version__ = "0.4.0"

View file

@ -50,10 +50,16 @@ ARCHGW_DOCKERFILE = "./Dockerfile"
def get_version():
try:
# First try to get version from package metadata (for installed packages)
version = importlib.metadata.version("planoai")
return version
except importlib.metadata.PackageNotFoundError:
return "version not found"
# Fallback to version defined in __init__.py (for development)
try:
from planoai import __version__
return __version__
except ImportError:
return "version not found"
@click.group(invoke_without_command=True)

View file

@ -25,6 +25,9 @@ planoai = "planoai.main:main"
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "planoai/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["planoai"]