mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-28 01:49:00 +09:00
The instrumental review UI was built but never integrated into the local CLI (karaoke-gen) workflow. This fix: 1. Adds run_instrumental_review() function to gen_cli.py that: - Analyzes backing vocals using AudioAnalyzer - Generates waveform visualization - Starts InstrumentalReviewServer and opens browser - Returns the user's selected instrumental file path 2. Integrates the review into the finalization loop: - Runs before KaraokeFinalise for each track - Passes selected_instrumental_file to KaraokeFinalise - Skips review if --skip_instrumental_review flag is set 3. Adds --skip_instrumental_review CLI flag for backwards compatibility 4. Adds comprehensive tests in test_cli_feature_parity.py that verify: - gen_cli.py has run_instrumental_review function - The function uses AudioAnalyzer, WaveformGenerator, and InstrumentalReviewServer - The --skip_instrumental_review flag works correctly These tests would have caught this integration gap and will prevent similar regressions in the future. Version bump: 0.71.40 → 0.71.41
Unit Tests for KaraokePrep
This directory contains unit tests for the KaraokePrep class.
Test Files
The tests are organized into the following files:
test_initialization.py: Tests for initialization and basic functionalitytest_file_operations.py: Tests for file operations (copy, download, convert)test_metadata.py: Tests for metadata extraction and parsingtest_lyrics.py: Tests for lyrics processingtest_audio.py: Tests for audio processing and separationtest_video.py: Tests for video creation and processingtest_async.py: Tests for async methods
Running the Tests
To run the tests, you need to have the test dependencies installed:
pip install -r requirements-test.txt
Then you can run the tests with:
python run_tests.py
This will run all the tests and generate a coverage report.
Checking Test Files
If you want to check if the test files are valid Python code without running the tests, you can use:
python check_tests.py
This will check if all the test files can be imported without errors.
Test Coverage
The tests aim to cover all the functionality of the KaraokePrep class. The coverage report will show you which parts of the code are covered by the tests.