mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-30 10:13:57 -05:00
Move py_to_notebook.py to bin/ directory for better organization
- Moved tools/py_to_notebook.py to bin/py_to_notebook.py - Updated tito.py to reference the new location - Made py_to_notebook.py executable for direct invocation - Removed empty tools/ directory - Updated documentation to reflect new location - All tools now consolidated in bin/ directory for consistency Benefits: - Conventional organization (bin/ for executables) - Can invoke tools directly: ./bin/py_to_notebook.py - Cleaner project structure - Consistent with other tools (tito.py, generate_student_notebooks.py)
This commit is contained in:
4
tools/py_to_notebook.py → bin/py_to_notebook.py
Normal file → Executable file
4
tools/py_to_notebook.py → bin/py_to_notebook.py
Normal file → Executable file
@@ -3,8 +3,8 @@
|
||||
Convert Python files with cell markers to Jupyter notebooks.
|
||||
|
||||
Usage:
|
||||
python3 tools/py_to_notebook.py modules/tensor/tensor_dev.py
|
||||
python3 tools/py_to_notebook.py modules/tensor/tensor_dev.py --output custom_name.ipynb
|
||||
python3 bin/py_to_notebook.py modules/tensor/tensor_dev.py
|
||||
python3 bin/py_to_notebook.py modules/tensor/tensor_dev.py --output custom_name.ipynb
|
||||
"""
|
||||
|
||||
import argparse
|
||||
@@ -824,7 +824,7 @@ def cmd_notebooks(args):
|
||||
try:
|
||||
# Use the separate py_to_notebook.py tool
|
||||
result = subprocess.run([
|
||||
sys.executable, "tools/py_to_notebook.py", str(dev_file)
|
||||
sys.executable, "bin/py_to_notebook.py", str(dev_file)
|
||||
], capture_output=True, text=True)
|
||||
|
||||
module_name = dev_file.parent.name
|
||||
|
||||
@@ -208,7 +208,7 @@ python bin/tito.py notebooks --module {module}
|
||||
|
||||
### Generate Student Version
|
||||
```bash
|
||||
python3 bin/generate_student_notebooks.py --module {module}
|
||||
python bin/generate_student_notebooks.py --module {module}
|
||||
```
|
||||
|
||||
### Test Complete Workflow
|
||||
|
||||
@@ -106,7 +106,7 @@ cp modules/example/example_dev.py modules/{module}/{module}_dev.py
|
||||
|
||||
# Full workflow
|
||||
python bin/tito.py notebooks --module {module}
|
||||
python3 bin/generate_student_notebooks.py --module {module}
|
||||
python bin/generate_student_notebooks.py --module {module}
|
||||
|
||||
# Test everything
|
||||
python bin/tito.py test --module {module}
|
||||
|
||||
Reference in New Issue
Block a user