Development Guide¶
This guide covers development setup and workflows for all platforms (Linux, macOS, and Windows).
Package Management¶
Audex uses uv as the package manager and setuptools as the build backend.
Installing uv¶
Linux/macOS:
Windows:
With pip (all platforms):
System Prerequisites¶
Linux (Ubuntu/Debian)¶
sudo apt-get install python3-pyqt6 python3-pyqt6.qtwebengine \
portaudio19-dev ffmpeg sqlite3 network-manager \
libfcitx5-qt6-1 alsa-utils gcc build-essential
macOS¶
Windows¶
- Python 3.10-3.13: Download from python.org
- PortAudio: Bundled with PyAudio wheel
- FFmpeg: Download from ffmpeg.org and add to PATH
- SQLite3: Included with Python
- Git: Download from git-scm.com
Setting Up Development Environment¶
1. Clone the Repository¶
2. Install Dependencies¶
# Install all dependencies
uv sync --all-extras
# Or install specific groups
uv sync --extra dev # Development tools
uv sync --extra test # Testing tools
uv sync --extra docs # Documentation tools
3. Verify Installation¶
Running Commands¶
Execute commands in the virtual environment using uv run:
# Run the application
uv run python -m audex -c config.yaml
# Run tests
uv run pytest
# Run linters
uv run ruff check audex/
uv run mypy audex/
# Build documentation
uv run mkdocs serve
Building the Package¶
Build wheel and source distribution:
Output files in dist/: - audex-{version}-py3-none-any.whl - audex-{version}.tar.gz
Makefile Commands¶
The project includes a Makefile for common tasks:
# Install dependencies
make install
# Run tests
make test
# Run linters
make lint
# Build package
make build
# View all available commands
make help
Version Management¶
Using bump Script¶
Linux/macOS:
# Show help
./scripts/bump.sh --help
# Bump version (dry run)
./scripts/bump.sh 1.2.3 --dry-run
# Bump version (actual)
./scripts/bump.sh 1.2.3
# Bump without git operations
./scripts/bump.sh 1.2.3 --no-git
Windows (PowerShell):
# Show help
.\scripts\bump.ps1 -Help
# Bump version (dry run)
.\scripts\bump.ps1 1.2.3 -DryRun
# Bump version (actual)
.\scripts\bump.ps1 1.2.3
# Bump without git operations
.\scripts\bump.ps1 1.2.3 -NoGit
# Bump without pushing to remote
.\scripts\bump.ps1 1.2.3 -NoPush
The bump script automatically: - Updates VERSION file - Updates pyproject.toml - Updates audex/__init__.py - Regenerates configuration files - Creates git commit and tag (optional) - Pushes to remote (optional)
Dependency Management¶
Add a Dependency¶
Add a Development Dependency¶
Remove a Dependency¶
Update Dependencies¶
Lock Dependencies¶
Testing¶
Run All Tests¶
Run with Coverage¶
Run Specific Tests¶
Using Makefile¶
Code Quality¶
Linting¶
Formatting¶
Using Makefile¶
Documentation¶
Serve Locally¶
Build Static Site¶
Deploy to GitHub Pages¶
Using Makefile¶
make docs-serve # Serve locally
make docs-build # Build static site
make docs-deploy # Deploy to GitHub Pages
Platform-Specific Notes¶
Windows¶
PowerShell Execution Policy¶
If you encounter execution policy errors:
# Check current policy
Get-ExecutionPolicy
# Allow local scripts (run as Administrator)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Virtual Environment Activation¶
uv manages the virtual environment automatically. To activate manually:
Long Paths¶
Enable long paths in Windows (run as Administrator):
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Configure Git to use long paths:
Audio Devices¶
List available audio devices:
uv run python -c "import pyaudio; pa = pyaudio.PyAudio(); [print(f'{i}: {pa.get_device_info_by_index(i)[\"name\"]}') for i in range(pa.get_device_count())]"
Linux¶
PyQt6 Installation¶
Install PyQt6 from system packages:
Audio Configuration¶
Make sure your user is in the audio group:
IDE Setup¶
Visual Studio Code¶
Recommended Extensions: - Python - Pylance - Ruff - PowerShell (Windows)
Workspace Settings (.vscode/settings.json):
{
"python.defaultInterpreterPath": ".venv/bin/python",
"python.terminal.activateEnvironment": true,
"python.linting.enabled": true,
"python.linting.ruffEnabled": true,
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
PyCharm¶
- Set Python interpreter to
.venv/bin/python(Linux/macOS) or.venv\Scripts\python.exe(Windows) - Mark
audexdirectory as Sources Root - Enable external tools for ruff and mypy
Common Workflows¶
Starting Development¶
git clone https://github.com/6ixGODD/audex.git
cd audex
uv sync --all-extras
make dev-gen # Generate code if needed
Making Changes¶
# Create a feature branch
git checkout -b feature/my-feature
# Make your changes
# Run tests
make test
# Check code quality
make check
# Commit
git commit -m "feat: add my feature"
git push origin feature/my-feature
Preparing a Release¶
# Update version (Linux/macOS)
./scripts/bump.sh 1.2.3
# Update version (Windows)
.\scripts\bump.ps1 1.2.3
# This will:
# - Update VERSION, pyproject.toml, __init__.py
# - Regenerate config files
# - Create git commit and tag
# - Push to remote (with confirmation)
Troubleshooting¶
uv command not found¶
Dependencies out of sync¶
Build errors¶
Lock file conflicts¶
Getting Help¶
- Documentation: https://6ixgodd.github.io/audex/
- Issues: https://github.com/6ixGODD/audex/issues
- Discussions: https://github.com/6ixGODD/audex/discussions