[ImgBot] Optimize images#46
Closed
imgbot[bot] wants to merge 239 commits into
Closed
Conversation
…lore - Rename all brand references: Narrafiilm/NARRAFILM/VideoForge → Voxplore - Rename VoxploreError (was NarrafiilmError), VoxploreWindow (was NarrafiilmWindow) - Update all file/module docstrings and comments - Update data paths: ~/Narrafiilm/* → ~/Voxplore/* - Update QSettings organization name from 'Narrafiilm' to 'Voxplore' - Update Logger names, app config, and exception hierarchy - Update README, Makefile, Dockerfile, docker-compose, CONTRIBUTING - Update CI/CD workflows and GitHub templates - Update template metadata (author fields) - Update docs (architecture, security, troubleshooting, etc.)
….yml (use GitHub Actions deploy-pages instead)
… deploy-docs.yml (use GitHub Actions deploy-pages)
…nd UI modules
P0 fixes:
- sensevoice_provider: stub methods now raise NotImplementedError instead of
returning fake data; expose _librosa wrappers as public APIs
- macOS_ThemeManager: fix race condition in singleton with double-checked locking
P1 fixes:
- ffmpeg_tool: ffprobe failure now logs a warning instead of silent {} return
- beat_detector: replace bare except Exception: pass with logger.warning
- base_exporter: deduplicate magic number 254016000000 → TimeHelper.TICKS_PER_SECOND
- config.py & animation_helper.py: replace silent except Exception: pass with
type-specific catches and logger.debug/warning calls
P2 fixes:
- scene_analyzer_v2: remove empty pass branch in conditionals
- video_interleaver: implement TODO with _score_subject_match() using emotion
graph + spatial composition + gaze direction scoring
- errors.py: confirmed no external refs, kept as compat shim
Chores:
- CHANGELOG.md updated
P0: - scene_analyzer.py: delete deprecated compat module, SceneAnalyzer now points directly to SceneAnalyzerV2 in scene_analyzer_v2.py - base_maker.py / service_manager.py: updated import paths to scene_analyzer_v2 - global singleton race conditions: add threading.Lock + double-checked locking to 11 thread-unsafe lazy singletons across core/utils/services/api modules - plugin loader: replace insecure sys.path.insert with importlib.util spec_from_file_location (path injection mitigation) P1: - scene_analyzer_v2.py: cleanup docstring and backward-compat comments - UI analysis: export_monitor/monitor_panel/pro_components identified as needing refactoring (documented, deferred to P3 due to scope) - __init__.py analysis: services/ai/__init__.py leaks 10 impl details outside __all__ (documented, fix deferred due to API compat risk) - time.sleep: confirmed correct in sync retry decorators, no change needed P2: - CLI: replace 22 print() calls with logger.info/error/warning - Dependency audit: pydantic/fastapi/uvicorn missing from pyproject.toml (documented, add in separate deps PR)
…ame to voxplore - services/ai/__init__.py: remove implementation details from top-level re-exports (RateLimitError, CircuitBreaker, RetryHandler, RateLimiter, ScriptStyle, VoiceTone, ScriptConfig, ScriptSegment, GeneratedScript) - pyproject.toml: add missing fastapi, uvicorn, pydantic deps; rename project name narrafiilm → voxplore; bump version 3.9.0 → 3.10.0; update entry point script
- base_llm_provider.py: add 5 named constants (DEFAULT_CACHE_TTL, DEFAULT_LONG_CACHE_TTL, DEFAULT_RETRY_MAX_DELAY, DEFAULT_KEEPALIVE_EXPIRY, DEFAULT_LOCAL_TIMEOUT); replace all magic numbers throughout the module - providers/local.py: import and use DEFAULT_LOCAL_TIMEOUT - project_manager.py: add HASH_CHUNK_SIZE constant; replace magic 1024*1024 - animation_helper.py: tighten 2x 'except Exception' → 'except (TypeError, RuntimeError)' with %-style formatting - main_window.py: add docstring to _on_page_activated override hook - scene_analyzer_v2.py: remove dead module-level analyze_video() and demo_analyze() functions (confirmed 0 references) and __main__ block; slimmed from 785 → 741 lines - test_scene_analyzer.py: fix import from deprecated scene_analyzer → scene_analyzer_v2 False positives closed (already correct in current code): macOS_theme_manager.py singleton (double-checked locking with Lock exists) base_exporter.py TICKS_PER_SECOND (line 36 already uses class constant)
…imports - Remove redundant _score_duration, _score_brightness, _score_motion, _score_audio, _score_scene_type methods from SceneAnalyzerV2 (now delegated to SceneScorer) - Update imports from scene_analyzer_v2 to scene_analyzer in: * app/services/ai/__init__.py * app/services/service_manager.py * app/services/video/base_maker.py * tests/_legacy/test_scene_analyzer.py Part of P3-3: scene_analyzer_v2.py extraction
Extract scoring logic from SceneAnalyzerV2 into a dedicated SceneScorer class: - score_duration(), score_brightness(), score_motion(), score_audio(), score_scene_type() methods - calculate_importance() for weighted scene scoring - calculate_narration_importance() for narrative priority Part of P3-3: scene_analyzer_v2.py extraction
…_models.py Extract data models from AIMonitorPanel into separate models file: - MonitorMode: constants for UI mode switching - AlertData: dataclass for alert information Also: - Update REFACTORING_ROADMAP.md with P3-4 analysis Part of P3-4: UI disaster zones refactoring
Without this flag, uv fails on GitHub Actions runners that enforce PEP 668 (externally-managed-environment), causing ruff/pyright to not be installed and subsequent steps to fail or produce misleading results.
- Move TimeHelper class reference inside function body to avoid forward reference error - Add _get_ticks_per_second() helper for explicit tick rate access - Update docstring to clarify internal constant usage
Replace magic number 360000 with named constant JIANYING_VERSION to improve code maintainability and clarity.
Add debug/info logging when providers are loaded or skipped due to missing/misconfigured API keys. Log summary after initialization.
Use ThreadPoolExecutor to copy video/audio materials in parallel (max_workers=4) for improved export performance with large files.
external container issues can't be resolved exit_code 0
- Remove Linux AppImage/DEB/RPM from README and docs - Remove Homebrew install instructions - Keep only Windows exe + macOS dmg + source build
…ture Phase 1: Fix animation_helper exceptions, type annotations, import paths Phase 2: Add step_upload/step_group/step_preview UI pages Phase 3: Add SmartGrouper, FirstPersonExtractor, EmotionPeakDetector, SegmentSelector Phase 4: Modular video services structure + AI ProviderRegistry plugin system Tests: 65 passed (294 + 26 new)
- Add v4.0.0 changelog entry (phase1-4 summary) - Update README: multi-video smart merge, smart grouping, modular export - Bump version 3.10.0 → 4.0.0
- features.md: complete rewrite — multi-video workflow, smart grouping, emotion peak, segment selector, 7 styles, character settings, modular export - index.md: update hero tagline, workflow steps, tech stack, features icons - Add 3 new SVG icons: multi-video, module, style
## Phase 1-5 完整交付 ### 设计系统(简约科技风 · 纯暗色) - tokens.py: 全新 OKLCH 色系(24 色 tokens,纯黑感背景) - base_styles.py: 基础 QSS 样式(41 处 CSS 变量,无硬编码) - qss_variables.py: CSS 变量自动注册 - theme_manager.py: 主题管理器(支持新设计系统 apply_design_system) ### 多窗口架构 - MainWindow: 主窗口管理器(ProjectsWindow 入口 + 4步流程) - BaseStepWindow: 步骤窗口基类(导航信号 + 共享数据机制) - StepIndicator: 4步指示器组件 ### 步骤窗口(全部重新实现) - UploadWindow: 拖拽上传 + 文件列表 + 导航联动 - SceneWindow: AI 分析进度 + 场景卡片 + Pipeline 回调 - NarrationWindow: 解说词编辑 + 情感选择 + 语速 + TTS 进度 - ExportWindow: 格式/质量选择 + 导出进度 ### 项目管理 - ProjectsWindow: 接入真实 ProjectManager(CRUD)+ 项目卡片网格 ### 业务集成 - PipelineController 信号连接(stage_changed/progress/error) - 步骤间数据传递(set_shared_data 机制) - launch_new_ui() 入口就绪 ### 启用方式 取消注释 app/main.py 中的 launch_new_ui() 即可使用新 UI
## README.md 重新设计 - 标题增 logo,明确 v4.0.0 多视频智能合并定位 - 全新 4 步创作流程(场景理解→智能分组→叙事选段→解说导出) - 新增「全新 UI」章节,说明 launch_new_ui() 入口 - 精简架构表,突出 2026 最新模型 - 更新技术栈(PySide6 + OKLCH Design System) ## docs/index.md 首页重新设计 - 修复残留错误:5种风格 → 7种情感风格 - 新增 Hero 浮动动画卡片(Qwen2.5-VL / DeepSeek-V3 / SenseVoice) - 全新 Proof Bar(v4.0.0 / DeepSeek-V3 / SenseVoice / <¥0.01 / MIT) - 全新渐入动画系统:workflow steps / why cards / compare rows / arch rows / start cards - 对比表 / Why 网格 / 4步工作流 / 技术栈表格 / 快速开始卡片组 - 全响应式布局优化 ## docs/features.md 重写 - 4步工作流替代旧版多步骤描述 - 修复 7种风格正确列出 - 更新成品类型描述(合并版+高光片段+剪映草稿) - 新增性能与硬件章节 ## docs/ai-models.md 修正 - 移除不存在的模型名称(DeepSeek-V3.2 → DeepSeek-V3,Claude Opus 4.6 → Claude Sonnet 4,GPT-5.4 → GPT-4o) - 简化配置说明 ## docs/getting-started.md 更新 - 5种风格 → 7种情感风格 - 3步 → 4步创作流程 - 更新 brew 安装命令(narrafiilm → voxplore) ## docs/guide/quick-start.md 更新 - 5种风格 → 7种情感风格 - 3步 → 4步创作流程 - 更新 brew 安装命令(narrafiilm → voxplore)
…-exports - Delete 7 redundant empty __init__.py files (namespace packages, Python 3.3+) app/ui/common/__init__.py, app/config/__init__.py, app/core/templates/__init__.py, app/core/templates/video_tutorial/__init__.py, app/core/templates/ai_enhancement/__init__.py, tests/services/__init__.py, tests/services/video/__init__.py - Delete thin re-export wrappers from core/ layer: app/core/icon_manager.py (re-exported app.ui.icon_manager) app/core/macos_theme_manager.py (re-exported app.ui.macos_theme_manager) - Fix: quick_ai_config.py now imports get_icon from app.ui.icon_manager directly Verified: 413 tests pass, 20 skipped
File renames (22 files via git mv): - video/extraction/: first_person_extractor→first_person, emotion_peak_detector→emotion_peak - video/selection/: segment_selector→seg_selector - video/models/: perspective_models→perspective, monologue_models→monologue - ai/: script_generator_streaming→script_stream - video_tools/: caption_generator→caption_gen - orchestration/: models→pipe_models, project_manager→pipeline_proj_mgr - ui/emotion_controller/: emotion_controller→emotion_ctrl, curve_widget→curve_wgt - ui/onboarding/: onboarding_wizard→onboard_wiz, welcome_screen→welcome - ui/subtitle/: subtitle_widgets→subtitle_wgts - ui/pages/components/: create_project_dialog→create_proj_dlg, project_details_panel→proj_details_pnl, projects_list_panel→proj_list_pnl - ui/dialogs/: model_application_dialog→model_app_dlg - ui/main/components/: export_statistics_widget→export_stats - plugins/examples/: deepseek_ai_generator→deepseek_gen, cinematic_subtitle→cinematic_sub Import fixes (17 source + 5 test files): - All __init__.py re-exports updated - All consumer imports updated Verified: 413 tests pass, 20 skipped
…apter_registry - ai/registry.py → model_registry.py (ProviderRegistry, model discovery) - ai/adapters/registry.py → adapter_registry.py (LLMProviderRegistry, adapter layer) - plugins/registry.py unchanged (no ambiguity, only one in plugins/) - Fix 2 import references (adapters/__init__.py, test_registry.py) All 413 tests pass.
Extract shared types to new provider_types.py: - ProviderType enum (model provider kind identifiers) - LLMRequest dataclass (LLM request payload) - LLMResponse dataclass (LLM response payload) - T TypeVar base_llm_provider.py re-exports all three via 'from .provider_types' for backward compatibility — ZERO consumer changes needed. File sizes: - provider_types.py: 56 lines (new) - base_llm_provider.py: 558 lines (was 607, -49) All 413 tests pass.
Fixed 11 vulture 100%-confidence warnings: - base_llm_provider.py: __aexit__ params prefixed with _ (exc_type/val/tb) - interfaces.py: _character and _word_timings params (abstract method signatures) - llm_manager.py: __aexit__ params prefixed with _ - script_generator.py: _max_chars in split_to_captions (param documented but never used) - smart_grouper.py: _num_frames in both extract() stubs (protocol compliance) - perspective_mapper.py: scene_index param docstring note (unused in impl) - security.py: allow_absolute param noqa:ARG002 (SecurityValidator.validate) No functional changes. All 413 tests pass.
- Remove app/ui/main/dialogs/__init__.py (0 bytes, empty) - Remove app/config/ (empty directory, unused — config lives in core/config_manager.py) - Note: app/__init__.py, tests/__init__.py, app/utils/__init__.py kept (docstring-only namespace markers, harmless)
- perspective_mapper.py: scene_index → _scene_index - security.py: allow_absolute → _allow_absolute (noqa ARG002 already present) Both are protocol/interface signatures kept for compatibility.
Five mock_keyring params in test_secure_key_manager.py (fixture injection from @patch decorators), plus character/num_frames in mock providers.
Removed from tracking:
- docs/*.html (9 files) — VitePress build output
- docs/logo*.{jpg,png} (3 files) — bundled image assets
- docs/guide/*.html (3 files) — VitePress build output
All are covered by .gitignore and should not have been tracked.
Actual source content (.md, .ts config, .css) remains.
…s, logic stubs - application.py: fix _load/_save_configuration stubs to actually use config_manager - settings_manager.py: remove duplicate _save_profiles definition (keep the try/except one) - version_manager.py: prefix unused return values with _ (preserve side effects) - base_llm_provider.py: remove unused TypeVar/dataclass imports - scene_analyzer.py: keep only the second AdaptiveDetector import (first was duplicate) - direct_video_exporter.py: remove unused _caption_gen, _ass_path, dead temp_dir code - export_panel.py: implement apply_queue_settings and edit_preset_data stubs - error_handler.py: remove _last_error = e (never read after assignment) - pulse_indicator.py: prefix unused _center variables with _ - animation_helper.py: prefix unused _width with _ [-39/+37]
…o separate file scene_analyzer.py (350 lines, base SceneAnalyzer only) scene_analyzer_v2.py (231 lines, SceneAnalyzerV2 + backward-compat alias) - V2 inherits SceneAnalyzer, adds importance scoring + key moment extraction - Both classes remain re-exported from ai/__init__.py - All consumers (service_manager, base_maker) import from scene_analyzer only - __all__ updated to match actual contents
… tts_providers.py voice_generator.py (205 lines): VoiceGenerator orchestrator only tts_providers.py (392 lines): TTSProvider ABC + EdgeTTS/OpenAITTS/F5TTS implementations - VoiceGenerator imports concrete providers from tts_providers - External consumers (service_manager, monologue_maker) unchanged - No breaking changes to public API
…s/ subpackage subtitle_wgts.py (650L, 1 file) → widgets/ subpackage (4 files, ~688L total): time_ruler.py (133L) → TimeRulerWidget subtitle_block.py (116L) → SubtitleBlockWidget subtitle_track.py (108L) → SubtitleTrackWidget timeline_widget.py (261L) → SubtitleTimelineWidget __init__.py (21L) → re-exports all 4 widgets subtitle_wgts.py → backward-compat re-export layer (22L) - All existing imports (subtitle_wgts.py) unchanged via compat layer - widgets/.__init__ provides clean single-import for all 4 widgets
…onboard_steps.py
onboard_wiz.py (652L, 1 file) → onboard_steps.py (462L, 6 step classes)
+ onboard_wizard.py (191L, main wizard class)
+ onboard_wiz.py (26L, backward-compat re-export)
Step classes: StepIndicator, StepContent, WelcomeStep, AIProviderStep,
PreferencesStep, CompletionStep
- All existing imports unchanged via compat layer
…o model_app_pages.py
model_app_dlg.py (602L) → model_app_pages.py (458L, 6 page classes)
+ model_app_dialog.py (160L, main dialog class)
+ model_app_dlg.py (29L, backward-compat re-export)
Page classes: ApplicationStep, ProviderInfo, ProviderSelectionPage,
RequirementsPage, ApplicationFormPage, SubmitApplicationPage
ModelApplicationDialog (main wizard) now in model_app_dialog.py
- All existing imports unchanged via compat layer
- scene_analyzer_v2.py: add missing SceneScorer import (fixes runtime error) - scene_analyzer.py: remove unused Callable and SceneScorer imports - voice_generator.py: remove 4 unused imports (asyncio, ABC,abstractmethod, SecurityError)
VoiceStyle is used by monologue_maker.py - must keep re-export from voice_models for backwards compatibility
Critical bugs fixed: - model_app_dialog.py: add missing class declaration (SyntaxError fix) - widgets/*.py: fix import path .subtitle_core -> ..subtitle_core (ModuleNotFoundError fix) - onboard_wizard.py: add missing COLORS import (NameError fix) - voice_generator.py: restore import os (undefined name fix) Dead import cleanup (10 files): - subtitle_block.py: remove 15 unused Qt imports - time_ruler.py: remove 15 unused Qt imports, add Optional/List/Tuple - timeline_widget.py: remove unused QtGui imports - subtitle_track.py: remove 15 unused imports, fix path - onboard_steps.py: remove Signal, QPushButton - onboard_wizard.py: remove 6 unused Qt imports, StepContent - tts_providers.py: remove os, Optional - model_app_pages.py: remove QWizard
- subtitle_block.py: restore QPainter/QColor/QPen/QFont/QMouseEvent imports (painaintEvent/mouseEvent methods were deleted in prior cleanup) - time_ruler.py: add missing QPoint import for drawPolygon() - subtitle_track.py: remove unused SubtitleBlock import - model_app_dialog.py: remove unused webbrowser, List, Qt imports - theme_toggle.py: remove unused _border variable
…_confidence/_last_error)
…er URL, clean dead imports
…ix dead links - Replace custom logo with native SVG (geometric hexagon mark) - README.md: native SVG logo + SVG badge for license (MIT), drop img.shields.io - docs/index.md: replace dead /logo.png and /icons/* with native emoji - docs/.vitepress/config.ts: drop og:image reference, fix dead sidebar links - Create 6 missing pages: ai-configuration, interface, troubleshooting, model-updates, architecture, contributing - .gitignore: narrow docs/ blanket ignore → docs/_build/, docs/build/, docs/.vitepress/dist/ - Add docs/public/favicon.svg and docs/favicon.svg
*Total -- 95.09kb -> 82.46kb (13.28%) /resources/icons/app_icon_512.png -- 56.21kb -> 47.58kb (15.35%) /resources/icons/app_icon_128.png -- 10.13kb -> 8.91kb (12.05%) /resources/icons/app_icon_256.png -- 23.86kb -> 21.49kb (9.92%) /resources/icons/app_icon_64.png -- 3.93kb -> 3.55kb (9.5%) /docs/favicon.svg -- 0.49kb -> 0.46kb (4.42%) /docs/public/favicon.svg -- 0.49kb -> 0.46kb (4.42%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Beep boop. Your images are optimized!
Your image file size has been reduced by 13% 🎉
Details
📝 docs |
repo | 🙋🏾 issues | 🏪 marketplace
~Imgbot - Part of Optimole family