Files
cs249r_book/tinytorch/tito/__init__.py
Vijay Janapa Reddi 7fe85bd912 refactor(tinytorch): use pyproject.toml as single source of truth for version
- Update pyproject.toml version to 0.1.4
- Set put_version_in_init = False in settings.ini to prevent nbdev overwrite
- Update tito/main.py to read version from pyproject.toml
- Update tito/__init__.py to read version from pyproject.toml
- Sync settings.ini version to 0.1.4

This ensures tito dev validate doesn't reset the version number.
2026-01-22 08:23:16 -05:00

25 lines
764 B
Python

"""
TinyTorch CLI Package
A professional command-line interface for the TinyTorch ML system.
Organized with clean separation of concerns and proper error handling.
"""
from pathlib import Path as _Path
def _get_version() -> str:
"""Read version from pyproject.toml (single source of truth)."""
try:
pyproject_path = _Path(__file__).parent.parent / "pyproject.toml"
if pyproject_path.exists():
content = pyproject_path.read_text()
for line in content.splitlines():
if line.strip().startswith("version"):
return line.split("=")[1].strip().strip('"').strip("'")
except Exception:
pass
return "0.0.0-dev"
__version__ = _get_version()
__author__ = "TinyTorch Team"