Skip to main content

Classroom Pilot - Comprehensive automation suite for managing assignments

Project description

Classroom Pilot

A modern Python CLI for automating GitHub Classroom assignment management with comprehensive workflow orchestration, repository discovery, and secret management capabilities.

๐ŸŽฏ Overview

Classroom Pilot provides instructors with a powerful command-line interface to automate GitHub Classroom assignment workflows, including:

  • ๐Ÿ Modern Python CLI - Type-safe, intuitive command interface with rich output
  • ๐Ÿ“ Universal file type support - Works with any assignment file type (.py, .cpp, .sql, .md, .html, .ipynb, etc.)
  • ๐Ÿ” Automated repository discovery - Smart filtering and batch operations on student repositories
  • ๐Ÿ” Batch secret management - Secure token and secret distribution across repositories
  • ๐Ÿ”„ Template synchronization - Keep assignment templates in sync with GitHub Classroom
  • โš™๏ธ Configuration-driven workflows - Flexible, reusable assignment configurations
  • ๐Ÿ›ก๏ธ Enterprise GitHub support - Custom GitHub Enterprise and internal Git hosting
  • ๐ŸŽฏ Instructor-focused filtering - Automatically excludes instructor repositories from batch operations

๐Ÿ“Š Project Status - Phase 3: Modular Architecture Complete โœ…

Current Release: v3.0.0-alpha.1 (Modular Architecture Implementation)

โœ… Phase 2 Completed Features

๐Ÿ Complete Python CLI Architecture

  • โœ… All 10 CLI commands implemented with full bash script integration
  • โœ… Typer-based CLI with rich help output and shell completion
  • โœ… Type-safe configuration with comprehensive validation
  • โœ… Modular command structure for intuitive workflow management
  • โœ… Global options with dry-run, verbose, and configuration overrides
  • โœ… Cross-platform compatibility (Python 3.10+ on Windows/macOS/Linux)

๐Ÿ—๏ธ Advanced Engineering

  • โœ… Complete BashWrapper implementation with all script integration
  • โœ… Comprehensive error handling with graceful fallbacks
  • โœ… Configuration parsing with environment variable expansion
  • โœ… Custom GitHub host support for enterprise environments
  • โœ… Professional test suite with 92.9% success rate (39/42 tests)

๐Ÿงช Testing & Quality Assurance

  • โœ… Comprehensive test coverage with pytest framework
  • โœ… Unit, integration, and comprehensive testing
  • โœ… CI/CD pipeline with GitHub Actions
  • โœ… Multi-Python version support (3.8-3.12)
  • โœ… Professional code organization following Python best practices

๐ŸŽฏ Phase 2 Status: COMPLETE โœ…

  • โœ… Complete Python CLI implementation with all functionality
  • โœ… Full backward compatibility with existing bash scripts and configurations
  • โœ… Enhanced error handling and user experience improvements
  • โœ… Cross-platform distribution ready for production
  • โœ… Enterprise GitHub support for custom hosting environments
  • โœ… Comprehensive documentation and testing infrastructure

๐Ÿšง Upcoming Features

Phase 2 Completion

  • Web API foundation for future dashboard integration
  • Plugin architecture for extensible functionality
  • Enhanced analytics and reporting capabilities
  • Integration testing with real classroom environments

Phase 3: Web Interface & Advanced Features

  • React-based web dashboard for visual assignment management
  • Real-time monitoring and notification systems
  • Multi-classroom management with role-based access
  • Advanced analytics and student progress tracking

๐Ÿ“ฆ Installation

Option 1: Install via pip (Recommended)

# Install the latest version
pip install classroom-pilot

# Or install from source
pip install git+https://github.com/hugo-valle/classroom-pilot.git

# Verify installation
classroom-pilot --help

Option 2: Install with Poetry

# Clone the repository
git clone https://github.com/hugo-valle/classroom-pilot.git
cd classroom-pilot

# Install with Poetry
poetry install

# Activate the environment
poetry shell

# Verify installation
classroom-pilot --help

Option 3: Development Installation

# Clone and install in development mode
git clone https://github.com/hugo-valle/classroom-pilot.git
cd classroom-pilot

# Install in editable mode
pip install -e .

# Or install development dependencies
pip install -r requirements-dev.txt

Requirements

  • Python 3.10+ (3.11+ recommended)
  • Git for repository operations
  • GitHub CLI (gh) for authentication
  • Bash/Zsh shell environment

๐Ÿš€ Quick Start

1. Configure Your Assignment

Create an assignment configuration file:

# Create assignment.conf
cat > assignment.conf << 'EOF'
# Assignment Configuration
CLASSROOM_URL="https://classroom.github.com/classrooms/123/assignments/456"
TEMPLATE_REPO_URL="https://github.com/instructor/assignment-template"
ASSIGNMENT_FILE="homework.py"

# GitHub Configuration
GITHUB_TOKEN_FILE="github_token.txt"
SECRETS_LIST="API_KEY,DATABASE_URL"
EOF

2. Run Commands

# Show all available commands
classroom-pilot --help

# Sync template to GitHub Classroom (dry-run first)
classroom-pilot --dry-run sync

# Discover student repositories
classroom-pilot discover

# Add secrets to student repositories
classroom-pilot secrets

# Run complete workflow
classroom-pilot run

# Get detailed help for any command
classroom-pilot sync --help

3. Configuration Options

# Use custom configuration file
classroom-pilot --config-file my-assignment.conf sync

# Enable verbose logging
classroom-pilot --verbose discover

# Skip confirmation prompts
classroom-pilot --yes secrets

# Combine options
classroom-pilot --config-file assignment.conf --dry-run --verbose run

๐Ÿ”ง Configuration

Assignment Configuration File

Create an assignment.conf file with your assignment settings:

# Required: GitHub Classroom assignment URL
CLASSROOM_URL="https://classroom.github.com/classrooms/123/assignments/456"

# Required: Template repository URL
TEMPLATE_REPO_URL="https://github.com/instructor/assignment-template"

# Required: Assignment file to validate
ASSIGNMENT_FILE="homework.py"

# Optional: GitHub Enterprise support
GITHUB_HOSTS="github.enterprise.com,git.company.internal"

# Optional: Secrets management
GITHUB_TOKEN_FILE="github_token.txt"
SECRETS_LIST="API_KEY,DATABASE_URL,SECRET_TOKEN"

# Optional: Repository filtering
EXCLUDE_REPOS="template,example,demo"
INSTRUCTOR_REPOS="instructor-solution"

Environment Variables

Override configuration with environment variables:

# Custom GitHub hosts
export GITHUB_HOSTS="git.company.internal,github.enterprise.com"

# GitHub token
export GITHUB_TOKEN="ghp_your_token_here"

# Custom assignment file
export ASSIGNMENT_FILE="main.cpp"

# Run with overrides
classroom-pilot sync

Multi-line Arrays

Support for complex configuration arrays:

# Multi-line secrets list
SECRETS_LIST=(
    "API_KEY"
    "DATABASE_URL" 
    "SECRET_TOKEN"
    "WEBHOOK_SECRET"
)

# Multi-line exclude list
EXCLUDE_REPOS=(
    "template"
    "example" 
    "demo"
    "instructor-*"
)

๐Ÿ“‹ Commands Reference

Main Commands

Command Description Example
run Execute complete workflow classroom-pilot run
sync Sync template to classroom classroom-pilot sync
discover Find student repositories classroom-pilot discover
secrets Manage repository secrets classroom-pilot secrets
assist Help students with issues classroom-pilot assist
version Show version information classroom-pilot version

Global Options

Option Short Description Example
--dry-run -n Preview without executing classroom-pilot --dry-run sync
--verbose -v Enable detailed logging classroom-pilot --verbose discover
--config-file -c Use custom config file classroom-pilot -c my.conf sync
--yes -y Skip confirmation prompts classroom-pilot --yes secrets
--help Show help information classroom-pilot --help

Workflow Examples

# Complete assignment setup workflow
classroom-pilot --config-file assignment.conf run

# Sync template changes only
classroom-pilot --dry-run sync
classroom-pilot sync

# Update secrets for all students
classroom-pilot --verbose secrets

# Help specific students
classroom-pilot --config-file student-issues.conf assist

# Check what would happen
classroom-pilot --dry-run --verbose run

๐Ÿ’ก Best Practices

Development Workflow

  • Always test with --dry-run before making changes
  • Use --verbose for debugging configuration issues
  • Keep configuration files in version control with your assignment
  • Use environment variables for sensitive information
  • Test with single student first using filtered configuration

Configuration Management

  • Separate configs per assignment for better organization
  • Use descriptive filenames like midterm-exam.conf
  • Document custom GitHub hosts in your assignment README
  • Validate URLs before running batch operations

Security Considerations

  • Store GitHub tokens securely using GITHUB_TOKEN_FILE
  • Use environment variables for sensitive configuration
  • Review --dry-run output before executing changes
  • Limit repository access with proper filtering
  • Audit secret distribution using verbose logging

๐Ÿ› ๏ธ Development

Project Structure

classroom_pilot/
โ”œโ”€โ”€ __init__.py          # Package initialization
โ”œโ”€โ”€ __main__.py          # CLI entry point
โ”œโ”€โ”€ cli.py               # Typer CLI implementation
โ”œโ”€โ”€ config.py            # Configuration management
โ”œโ”€โ”€ bash_wrapper.py      # Script execution wrapper
โ”œโ”€โ”€ utils.py             # Utility functions
โ”œโ”€โ”€ scripts/             # Bash scripts
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ *.sh             # Individual workflow scripts
โ””โ”€โ”€ docs/                # Documentation

Contributing

# Clone and setup development environment
git clone https://github.com/hugo-valle/classroom-pilot.git
cd classroom-pilot

# Install development dependencies
pip install -r requirements-dev.txt
pip install -e .

# Run tests
make test              # Quick functionality tests
make test-unit         # Full pytest unit tests
pytest tests/ -v       # Run tests directly

# Run comprehensive tests
make test-full
python tests/test_comprehensive.py

# Format code
black classroom_pilot/
isort classroom_pilot/

# Type checking
mypy classroom_pilot/

# Create feature branch
git checkout -b feature/new-feature

Architecture

  • Modern Python CLI built with Typer for rich interaction
  • Configuration-driven with validation and environment expansion
  • Bash script compatibility through wrapper execution
  • Cross-platform support with proper path handling
  • Enterprise GitHub support with custom host validation
  • Type safety with comprehensive type annotations

๐Ÿ“ž Support



Classroom Pilot - Streamlining GitHub Classroom assignment management through modern automation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

classroom_pilot-3.0.0a1.tar.gz (77.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

classroom_pilot-3.0.0a1-py3-none-any.whl (95.7 kB view details)

Uploaded Python 3

File details

Details for the file classroom_pilot-3.0.0a1.tar.gz.

File metadata

  • Download URL: classroom_pilot-3.0.0a1.tar.gz
  • Upload date:
  • Size: 77.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.4 Darwin/24.6.0

File hashes

Hashes for classroom_pilot-3.0.0a1.tar.gz
Algorithm Hash digest
SHA256 bc772b103fb49999103b9bf96b991f341308e783f43cca9460e2ab6c3a32f9f0
MD5 6f1ed72012e6ebcc8bc980cef771e728
BLAKE2b-256 ea607351599bf7867a72155fb746f7f8fe323bb17ca206dcc4122f27e21cca39

See more details on using hashes here.

File details

Details for the file classroom_pilot-3.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: classroom_pilot-3.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 95.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.4 Darwin/24.6.0

File hashes

Hashes for classroom_pilot-3.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bea3c675a22361f7610adf949f8387ae99277b94d22f2e35dc528c1adb7c653
MD5 d2ba0f09e3673bb007ec884d3ee9144b
BLAKE2b-256 6ae88ad336cf9afe60709e5edbcd8d3f6981a32581016cbc04e03b3245de0379

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page