Вынести конфигурацию видеокодеков в единый каталог#38
Merged
Conversation
e904ac9 to
c36aeb1
Compare
В настройках видео список кодеков и двунаправленный маппинг были размазаны по VideoView, из-за чего любое изменение набора кодеков требовало править несколько мест и поддерживать их синхронность. Изменение выносит каталог кодеков в отдельный модуль и переводит VideoView на единый источник данных. Для стабильного CI добавлен отдельный mock-based набор unit-тестов, который поднимает diff coverage для изменённого production-кода без зависимости от реального PyQt6. Constraint: Нельзя менять пользовательские display-имена кодеков без миграции UI-логики Rejected: Хранить локальные словари в VideoView | сохраняет дублирование и риск рассинхронизации Rejected: Полагаться только на test_gui_views.py | модуль глобально skipped и не поднимает diff coverage Confidence: high Scope-risk: narrow Reversibility: clean Directive: Новые видеокодеки добавлять только через gui.models.video_codecs Tested: python -m pytest tests/unit/test_video_codecs.py tests/unit/test_video_view.py tests/unit/test_gui_views.py -q; python -m ruff check --no-cache gui/models/video_codecs.py gui/views/video_view.py tests/unit/test_video_codecs.py tests/unit/test_video_view.py tests/unit/test_gui_views.py; python -m ruff format --check --no-cache gui/models/video_codecs.py gui/views/video_view.py tests/unit/test_gui_views.py tests/unit/test_video_view.py tests/unit/test_video_codecs.py; python -m mypy gui/models/video_codecs.py gui/views/video_view.py tests/unit/test_video_view.py; python scripts/check_diff_coverage.py --coverage-json tests/.local_tmp/coverage_ci_local.json --base-sha origin/main --head-sha HEAD --min-file-coverage 35 Not-tested: Реальный интерактивный GUI с установленным PyQt6 без test skip
c36aeb1 to
654b52c
Compare
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.
Что сделано
n- VideoView переведён на общий маппинг display <-> codec idn- обновлён CHANGELOG.md и добавлены unit-тестыПроверки
n- python -m ruff check --no-cache gui/models/video_codecs.py gui/views/video_view.py tests/unit/test_video_codecs.py tests/unit/test_gui_views.pyn- python -m mypy gui/models/video_codecs.py gui/views/video_view.py`nCloses Вынести конфигурацию видеокодеков в отдельный модуль #29