Files
TinyTorch/pyproject.toml
Vijay Janapa Reddi 05379c8570 Refactor CLI to senior software engineer standards
BREAKING CHANGE: Major architectural refactoring of CLI system

New Professional Architecture:
- Clean separation of concerns with proper package structure
- Command pattern implementation with base classes
- Centralized configuration management
- Proper exception hierarchy and error handling
- Logging framework integration
- Type hints throughout
- Dependency injection pattern

Structure:
tinytorch/cli/
├── __init__.py              # Package initialization
├── main.py                  # Professional CLI entry point
├── core/                    # Core CLI functionality
│   ├── __init__.py
│   ├── config.py           # Configuration management
│   ├── console.py          # Centralized console output
│   └── exceptions.py       # Exception hierarchy
├── commands/               # Command implementations
│   ├── __init__.py
│   ├── base.py            # Base command class
│   └── notebooks.py       # Notebooks command
└── tools/                 # CLI tools
    ├── __init__.py
    └── py_to_notebook.py  # Conversion tool

Features Added:
- Proper entry points in pyproject.toml
- Professional logging with file output
- Environment validation with detailed error messages
- Dry-run mode for notebooks command
- Force rebuild option
- Timeout protection for subprocess calls
- Backward compatibility wrapper (bin/tito)
- Extensible command registration system

Benefits:
- Maintainable: Single responsibility per module
- Testable: Clean interfaces and dependency injection
- Extensible: Easy to add new commands
- Professional: Industry-standard patterns
- Robust: Proper error handling and validation
- Installable: Proper package structure with entry points
2025-07-10 22:05:10 -04:00

72 lines
1.7 KiB
TOML

[build-system]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"
[project]
name = "tinytorch"
version = "0.1.0"
description = "TinyTorch: Build ML Systems from Scratch"
readme = "README.md"
requires-python = ">=3.8"
authors = [
{name = "TinyTorch Team", email = "team@tinytorch.ai"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Education",
]
dependencies = [
"numpy>=1.21.0",
"rich>=12.0.0",
"pytest>=7.0.0",
]
[project.optional-dependencies]
dev = [
"jupyter>=1.0.0",
"jupyterlab>=3.0.0",
"black>=22.0.0",
"isort>=5.0.0",
"flake8>=4.0.0",
"mypy>=0.950",
]
[project.scripts]
tito = "tinytorch.cli.main:main"
py-to-notebook = "tinytorch.cli.tools.py_to_notebook:main"
[project.urls]
Homepage = "https://github.com/tinytorch/tinytorch"
Documentation = "https://tinytorch.readthedocs.io"
Repository = "https://github.com/tinytorch/tinytorch"
Issues = "https://github.com/tinytorch/tinytorch/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["tinytorch*"]
[tool.uv]
cache-keys = [{ file = "pyproject.toml" }, { file = "settings.ini" }, { file = "setup.py" }]
[tool.black]
line-length = 88
target-version = ['py38']
[tool.isort]
profile = "black"
line_length = 88
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true