From e161b018c189f17553ff4be116b264da11f67c5f Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sun, 19 Oct 2025 13:00:16 -0400 Subject: [PATCH] ci: Disable test-notebooks workflow - This workflow was testing notebook conversion features - Not required for website deployment - Website deploys via deploy-book.yml on main branch - Can re-enable later if needed for CI testing --- .github/workflows/test-notebooks.yml | 159 --------------------------- 1 file changed, 159 deletions(-) delete mode 100644 .github/workflows/test-notebooks.yml diff --git a/.github/workflows/test-notebooks.yml b/.github/workflows/test-notebooks.yml deleted file mode 100644 index b222aafe..00000000 --- a/.github/workflows/test-notebooks.yml +++ /dev/null @@ -1,159 +0,0 @@ -name: Test Notebook Conversion - -on: - push: - branches: [ main, dev ] - paths: - - 'modules/source/**/*.py' - - 'tito/**/*.py' - - 'requirements.txt' - - '.github/workflows/test-notebooks.yml' - pull_request: - branches: [ main, dev ] - paths: - - 'modules/source/**/*.py' - - 'tito/**/*.py' - - 'requirements.txt' - - '.github/workflows/test-notebooks.yml' - -jobs: - test-notebook-conversion: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache pip dependencies - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Create virtual environment - run: | - python -m venv .venv - source .venv/bin/activate - pip install --upgrade pip - - - name: Install essential dependencies - run: | - source .venv/bin/activate - pip install setuptools wheel - pip install rich>=13.0.0 - pip install jupytext>=1.14.0 - pip install pytest>=7.0.0 - pip install numpy>=1.21.0 - - - name: Install remaining dependencies (allow failures) - run: | - source .venv/bin/activate - pip install -r requirements.txt || echo "Some dependencies failed - continuing with essential packages" - - - name: Install TinyTorch in development mode - run: | - source .venv/bin/activate - pip install -e . || echo "Development install failed - continuing" - - - name: Run environment diagnosis - run: | - source .venv/bin/activate - python -m tito.main system doctor || echo "Doctor check completed with issues" - - - name: Test notebook conversion (dry run) - run: | - source .venv/bin/activate - python -m tito.main notebooks --dry-run - - - name: Test conversion of specific modules - run: | - source .venv/bin/activate - # Test tensor module - if [ -f "modules/source/02_tensor/tensor_dev.py" ]; then - python -m tito.main notebooks --module 02_tensor - [ -f "modules/source/02_tensor/tensor_dev.ipynb" ] && echo "✓ Tensor notebook created" - fi - - # Test activations module - if [ -f "modules/source/03_activations/activations_dev.py" ]; then - python -m tito.main notebooks --module 03_activations - [ -f "modules/source/03_activations/activations_dev.ipynb" ] && echo "✓ Activations notebook created" - fi - - - name: Validate notebook structure - run: | - source .venv/bin/activate - # Install notebook validation tools - pip install nbformat || echo "Could not install nbformat" - - # Check generated notebooks have valid structure - for notebook in modules/source/*/*.ipynb; do - if [ -f "$notebook" ]; then - echo "Validating $notebook" - python -c 'import json; nb = json.load(open("'"$notebook"'")); assert "cells" in nb and len(nb["cells"]) > 0; print("✓ '"$notebook"' is valid")' - fi - done - - - name: Test batch conversion - run: | - source .venv/bin/activate - # Clean up previous notebooks - find modules/source -name "*.ipynb" -delete - - # Test converting all modules at once - python -m tito.main notebooks - - # Check that notebooks were created - notebook_count=$(find modules/source -name "*.ipynb" | wc -l) - echo "Created $notebook_count notebooks" - [ "$notebook_count" -gt 0 ] && echo "✓ Batch conversion successful" - - - name: Archive generated notebooks - uses: actions/upload-artifact@v4 - if: always() - with: - name: generated-notebooks-python-${{ matrix.python-version }} - path: modules/source/**/*.ipynb - retention-days: 7 - - test-student-workflow: - runs-on: ubuntu-latest - needs: test-notebook-conversion - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Test automated setup script - run: | - chmod +x setup-dev.sh - ./setup-dev.sh - - - name: Test student workflow - run: | - source .venv/bin/activate - # Simulate student workflow - echo "Testing complete student workflow..." - - # Convert a module to notebook - python -m tito.main notebooks --module 03_activations - - # Verify notebook exists and is valid - [ -f "modules/source/03_activations/activations_dev.ipynb" ] && echo "✓ Student can create notebooks" - - # Test TITO commands work - python -m tito.main --help > /dev/null && echo "✓ TITO CLI accessible" - python -m tito.main system doctor > /dev/null && echo "✓ Environment diagnosis works" \ No newline at end of file