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-runbefore making changes - Use
--verbosefor 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-runoutput 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
- Documentation: GitHub Repository
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Classroom Pilot - Streamlining GitHub Classroom assignment management through modern automation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc772b103fb49999103b9bf96b991f341308e783f43cca9460e2ab6c3a32f9f0
|
|
| MD5 |
6f1ed72012e6ebcc8bc980cef771e728
|
|
| BLAKE2b-256 |
ea607351599bf7867a72155fb746f7f8fe323bb17ca206dcc4122f27e21cca39
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bea3c675a22361f7610adf949f8387ae99277b94d22f2e35dc528c1adb7c653
|
|
| MD5 |
d2ba0f09e3673bb007ec884d3ee9144b
|
|
| BLAKE2b-256 |
6ae88ad336cf9afe60709e5edbcd8d3f6981a32581016cbc04e03b3245de0379
|