mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-29 17:20:21 -05:00
- 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.
25 lines
764 B
Python
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"
|