Refactor notebook generation to use separate files for better architecture

- Restored tools/py_to_notebook.py as a focused, standalone tool
- Updated tito notebooks command to use subprocess to call the separate tool
- Maintains clean separation of concerns: tito.py for CLI orchestration, py_to_notebook.py for conversion logic
- Updated documentation to use 'tito notebooks' command instead of direct tool calls
- Benefits: easier debugging, better maintainability, focused single-responsibility modules
This commit is contained in:
Vijay Janapa Reddi
2025-07-10 21:57:09 -04:00
parent 899bd49aa1
commit 82defeafd3
29 changed files with 8717 additions and 1613 deletions

View File

@@ -37,7 +37,7 @@ Mark what students should implement vs. what to provide.
### Step 4: Convert and Generate
```bash
# Convert Python to notebook
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
python bin/tito.py notebooks --module {module}
# Generate student version
python3 bin/generate_student_notebooks.py --module {module}
@@ -203,7 +203,7 @@ Students implement:
### Convert Python to Notebook
```bash
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
python bin/tito.py notebooks --module {module}
```
### Generate Student Version

View File

@@ -34,7 +34,7 @@ class YourClass:
### 3. Convert and Generate
```bash
# Convert Python to notebook
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
python bin/tito.py notebooks --module {module}
# Generate student version
python3 bin/generate_student_notebooks.py --module {module}
@@ -105,7 +105,7 @@ mkdir modules/{module}
cp modules/example/example_dev.py modules/{module}/{module}_dev.py
# Full workflow
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
python bin/tito.py notebooks --module {module}
python3 bin/generate_student_notebooks.py --module {module}
# Test everything