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:
Vijay Janapa Reddi
2025-07-10 21:59:14 -04:00
parent 82defeafd3
commit 2cb887e9e4
4 changed files with 5 additions and 5 deletions

4
tools/py_to_notebook.py → bin/py_to_notebook.py Normal file → Executable file
View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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}