The LuminariGUI project includes a sophisticated Python toolchain that provides comprehensive development workflow automation, XML management, and release orchestration. These tools work together to streamline the development process from code validation to production releases.
theGUI/build.py- Assembles source fragments into LuminariGUI.xmltheGUI/package.py- Creates .mpackage files and manages releasesscripts/validate_package.py- Package validation with Lua syntax checkingtests/run_tests.py- Comprehensive testing framework
- Integrated Workflow: Tools work seamlessly together in development and release processes
- Modular Source: Edit XML fragments, build automatically assembles them
- Comprehensive Testing: Automated testing prevents regression and ensures quality
- Cross-Platform: Compatible with Windows, macOS, and Linux
- Git Integration: Built-in version control workflow automation
- Python 3.8+ (recommended: Python 3.10+)
- Git (required for release workflows)
- Standard Library Only: No external dependencies for core tools
- PyYAML: Faster YAML parsing (
pip install pyyaml) - Lua/luac: Required for Lua syntax validation
- luacheck: Optional static analysis
# Check Python version
python3 --version
# Verify tools are executable
python3 theGUI/build.py --help
python3 theGUI/package.py --help
python3 scripts/validate_package.py --helpPurpose: Assembles modular source fragments from theGUI/src/ into the final LuminariGUI.xml package.
# Build the package (auto-increments version)
python3 theGUI/build.py
# Validate without writing output
python3 theGUI/build.py --validate
# Extract existing XML into fragments (first-time setup)
python3 theGUI/build.py --extract
# Watch mode for active development
python3 theGUI/build.py --watch
# Show what would change
python3 theGUI/build.py --diff
# Show statistics
python3 theGUI/build.py --stats- Fragment Assembly: Combines XML fragments into single package
- Auto-Versioning: Increments build number on each build
- Archiving: Automatically archives previous builds to
docs/archive/ - Validation: Validates fragments and final output
- Watch Mode: Rebuilds automatically on file changes
Purpose: Creates distributable .mpackage files for Mudlet with full release workflow support.
Create Package:
# Create release package (builds XML first, runs tests)
python3 theGUI/package.py create
# Create development package with timestamp
python3 theGUI/package.py create --dev
# Skip build step (use existing XML)
python3 theGUI/package.py create --skip-build
# Skip test suite
python3 theGUI/package.py create --skip-testsRelease Workflow:
# Full release workflow (build, test, branch, package, tag)
python3 theGUI/package.py release
# Preview release without changes
python3 theGUI/package.py release --dry-run
# Release and push to remote
python3 theGUI/package.py release --pushMaintenance:
# List all packages in Releases/
python3 theGUI/package.py list
# Clean old dev packages (keeps latest 3)
python3 theGUI/package.py clean
# Keep different number of dev packages
python3 theGUI/package.py clean --keep 5The release command executes:
- Build: Runs
build.pyto generate fresh XML - Test: Runs full test suite
- Git Check: Verifies clean repository state
- Branch: Creates
release/v{version}branch - Package: Creates
.mpackagewith metadata - Tag: Creates annotated git tag
- Push: (Optional) Pushes to remote
Releases/
├── LuminariGUI-v2.0.4.019.mpackage # Release package
├── LuminariGUI-v2.0.4.019.json # Release metadata
├── LuminariGUI-v2.0.4.019-dev-*.mpackage # Dev packages
└── LuminariGUI-v2.0.4.019-dev-*.json # Dev metadata
Purpose: Validates Mudlet packages for XML structure and Lua syntax.
# Validate LuminariGUI.xml (includes Lua syntax)
python3 scripts/validate_package.py
# Validate specific file
python3 scripts/validate_package.py path/to/file.xml
# Skip Lua syntax checking
python3 scripts/validate_package.py --no-lua-syntax- XML Validation: Checks structure and required elements
- Lua Syntax: Validates all embedded Lua code using luac
- Issue Detection: Finds common problems like unescaped characters
Purpose: Runs comprehensive test suite for code quality assurance.
# Run complete test suite
python3 tests/run_tests.py
# Skip tests requiring optional tools (lua, luacheck)
python3 tests/run_tests.py --skip-optional
# Run from tests directory
cd tests && python3 run_tests.py- Lua Syntax: Validates all Lua code compiles
- Function Tests: Unit tests for core functions
- Event System: Tests event handlers and MSDP integration
- System Tests: Memory leak detection, error boundaries
- Performance: Benchmarks for critical operations
# 1. Edit source fragments in theGUI/src/
# 2. Validate changes
python3 theGUI/build.py --validate
# 3. Build package
python3 theGUI/build.py
# 4. Create dev package for testing
python3 theGUI/package.py create --dev
# 5. Test in Mudlet# Preview the release workflow
python3 theGUI/package.py release --dry-run
# Execute release (without push)
python3 theGUI/package.py release
# Or release and push in one step
python3 theGUI/package.py release --push# Just create a package from current XML
python3 theGUI/package.py create --skip-build --skip-tests# Check fragment validity
python3 theGUI/build.py --validate
# See what would change
python3 theGUI/build.py --diff# Run with skip-optional if missing lua tools
python3 tests/run_tests.py --skip-optional# Skip git check for quick packaging
python3 theGUI/package.py create --skip-build
# Or for release workflow
python3 theGUI/package.py release --skip-git-check| Tool | Code 0 | Code 1 |
|---|---|---|
build.py |
Build successful | Validation or write failure |
package.py |
Operation successful | Error during operation |
validate_package.py |
Validation passed | Validation failed |
run_tests.py |
All tests passed | One or more failures |
- Edit source fragments in
theGUI/src/, notLuminariGUI.xmldirectly - Validate before committing:
python3 theGUI/build.py --validate - Use dev packages for testing:
python3 theGUI/package.py create --dev - Run tests regularly:
python3 tests/run_tests.py
- Use the release workflow:
python3 theGUI/package.py release - Test with dry-run first:
python3 theGUI/package.py release --dry-run - Update CHANGELOG.md before releasing
- Test the .mpackage in Mudlet before pushing
- Clean old dev packages:
python3 theGUI/package.py clean - Review packages:
python3 theGUI/package.py list
- Build System Guide: Detailed build system documentation
- Developer Guide: Architecture and best practices
- Changelog: Version history
- Contributing: Contribution guidelines