All files needed to migrate audio-hotplug to a separate repository and publish to PyPI have been created.
MIGRATION_GUIDE.md- Comprehensive step-by-step migration guideQUICK_START.md- Fast-track guide (~35 minutes total)CHANGELOG.md- Version history template
- Runs tests on Windows, macOS, Linux
- Tests Python 3.10, 3.11, 3.12, 3.13
- Uploads coverage to Codecov
- Uses uv for fast dependency management
- Publishes to PyPI on release tags
- Supports manual TestPyPI publishing
- Builds and validates packages
- Uses PyPI API tokens for authentication
- Runs pre-commit hooks on PRs
- Ensures code quality standards
- isort, black, flake8, pyupgrade
- Consistent with LedFx standards
- pre-commit.ci integration enabled
- Ensures all necessary files included in distribution
- Excludes pycache and .pyc files
-
Follow QUICK_START.md - Fastest path (35 minutes)
# Start here: Get-Content C:\mine\development\ledfx\LedFx\audio-hotplug\QUICK_START.md
-
Or use MIGRATION_GUIDE.md - Detailed explanations
# For more details: Get-Content C:\mine\development\ledfx\LedFx\audio-hotplug\MIGRATION_GUIDE.md
- Extract repository with git history
- Set up GitHub repository (LedFx/audio-hotplug)
- Configure PyPI API tokens
- Test publish to TestPyPI
- Publish v0.1.0 to PyPI
- Create clean PR in LedFx repository
- Verify integration works with PyPI package
- Merge and celebrate! 🎉
All files are in: C:\mine\development\ledfx\LedFx\audio-hotplug\
audio-hotplug/
├── .github/
│ └── workflows/
│ ├── tests.yml # Multi-platform testing
│ ├── publish.yml # PyPI publishing
│ └── pre-commit.yml # Code quality checks
├── .pre-commit-config.yaml # Pre-commit hooks config
├── MANIFEST.in # Distribution file list
├── MIGRATION_GUIDE.md # Detailed migration guide
├── QUICK_START.md # Fast-track guide
├── CHANGELOG.md # Version history
└── (existing files...)
- audio-hotplug becomes standalone package
- Can be used by other projects
- Independent versioning and releases
- ~10 files instead of 203
- Only actual integration changes
- No formatting noise
- Automated testing on 3 platforms
- Automated PyPI publishing
- Pre-commit hooks for quality
- Comprehensive documentation
- Easy to update audio-hotplug independently
- Can add features without affecting LedFx
- Other projects can benefit
| Phase | Duration | Description |
|---|---|---|
| Extract repo | 5 min | Git commands to separate history |
| GitHub setup | 3 min | Create repository |
| PyPI accounts | 10 min | Create accounts and API tokens |
| Test build | 5 min | Verify local build works |
| TestPyPI | 5 min | Test publication flow |
| PyPI publish | 2 min | Tag release, GitHub Actions runs |
| Clean LedFx PR | 10 min | New branch with PyPI integration |
| Total | ~40 min | End-to-end completion |
-
Verify PyPI package installs:
pip install audio-hotplug python -c "from audio_hotplug import create_monitor; print('✓')"
-
Test in LedFx:
cd C:\mine\development\ledfx\LedFx git checkout feat/audio-hotplug-pypi-integration uv sync uv run python -m ledfx --offline -vv # Change audio devices and verify callbacks work
-
Review PR:
- Should show ~10 files changed
- All tests passing
- No formatting noise
-
git filter-repo not found
pip install git-filter-repo
-
PyPI token not working
- Use
__token__as username - Token as password
- Token must start with
pypi-
- Use
-
Import fails
# Wrong: import audio-hotplug # Correct: import audio_hotplug
-
CI tests fail
- Check GitHub Actions logs
- Platform-specific issues vary
- May need to mock hardware on CI
- Migration questions: Check MIGRATION_GUIDE.md
- Quick reference: Check QUICK_START.md
- Technical issues: Check TESTING.md in audio-hotplug/
- Git issues: See troubleshooting sections
✅ audio-hotplug published to PyPI ✅ Tests passing on all platforms ✅ LedFx PR shows <15 files changed ✅ LedFx works with PyPI package ✅ Audio device hotplugging works ✅ No formatting issues in PR
# Begin migration now:
cd C:\mine\development\ledfx\LedFx\audio-hotplug
code QUICK_START.md
# Or read details first:
code MIGRATION_GUIDE.mdGood luck! 🚀