From 81fd331f6014481dd51de99f39cd4a3814fc5ee2 Mon Sep 17 00:00:00 2001 From: Ahmed Hindy Date: Tue, 16 Jun 2026 20:16:00 +0300 Subject: [PATCH 1/3] docs: add v1.1 release changelog draft --- CHANGELOG_v1.1.md | 125 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 CHANGELOG_v1.1.md diff --git a/CHANGELOG_v1.1.md b/CHANGELOG_v1.1.md new file mode 100644 index 0000000..9475b5b --- /dev/null +++ b/CHANGELOG_v1.1.md @@ -0,0 +1,125 @@ +# RenderKit v1.1.0 โ€” Release Changelog + +> Comparing `v1.0.0` โ†’ `main` ยท 67 files changed ยท ~6 500 insertions / ~1 300 deletions + +--- + +## ๐Ÿš€ New Features + +### Batch EXR Sequence Conversion (CLI) +- **New `batch convert` CLI sub-command** โ€” convert an entire directory tree of EXR sequences to MP4 in one shot. (#73, #78) +- New `src/renderkit/core/batch.py` and `src/renderkit/cli/batch.py` modules back the feature end-to-end. +- Dry-run support: validates replacement MP4s before committing any writes. (#70) + +### Verified Sequence Replacement & Cleanup +- **`src/renderkit/core/sequence_replacement.py`** โ€” new module that handles auditing, replacing, and cleaning up EXR sequences once a verified MP4 replacement exists. (#70, #100) +- Audit preflight checks were tightened so mismatched or incomplete sequences are caught early. (#72) +- Nested review-name lookup fixed for deeply-structured shot directories. (#100) + +### Contact Sheet CLI +- `renderkit contact-sheet` is now a proper CLI command with a dedicated `src/renderkit/cli/conversion.py` module. (#91) +- Label help text was clarified and one-sided range / resolution options were fixed. (#89, #90) + +### Automation-Friendly Progress Control +- `--no-progress` / `--progress` flags let headless or CI pipelines suppress the live progress bar without losing log output. (#69) + +### Nuitka Standalone Packaging +- New **`.github/workflows/nuitka-standalone-zip.yml`** CI workflow builds self-contained Windows, macOS, and Linux zips. (#60, #61) +- New `scripts/build_nuitka.ps1` and `scripts/stage_portable_ffmpeg.py` support cross-platform portable FFmpeg bundling. +- PyInstaller archive layout is preserved in artifacts; macOS executable-data collision fixed. (#61) + +--- + +## ๐Ÿ”ง Improvements & Refactors + +### UI โ€” Main Window Decomposition (#106) +- `main_window_logic.py` was split into four focused helper modules: + - `main_window_preview.py` โ€” preview-related logic + - `main_window_sequence.py` โ€” sequence loading / frame helpers + - `main_window_settings.py` โ€” settings persistence + - `main_window_ui.py` โ€” UI wiring +- `sequence_names.py` extracted from the sequence module to isolate name-normalisation helpers. + +### Preview Pipeline โ€” Thread Safety & Memory Safety (#107, #108, #109) +- QPixmap creation moved to the **UI thread**; worker threads now pass raw `bytes` / `numpy` arrays instead of Qt objects. +- `QImage` buffer lifetimes are explicitly managed so the underlying array is guaranteed to outlive the `QImage`. +- `qt_compat.py` added to centralise Qt version shims. + +### Shared Preview Frame Preparation Pipeline (#105) +- `src/renderkit/processing/frame_pipeline.py` โ€” new module that unifies the frame-prep path used by both the single-frame preview and the video encoder, eliminating the previous duplication. + +### Conversion & UI Orchestration Refactor (#103) +- Conversion kickoff logic was extracted from `main_window_logic.py` into a clean orchestration layer, reducing coupling between UI and core. + +### Magic Literal Extraction (#111) +- Numeric and string magic literals throughout the codebase replaced with named constants for readability and maintainability. + +### Duplicate Render Helper Removal (#110) +- Duplicated colour-conversion and scaling helpers across `converter.py`, `video_encoder.py`, and `image_reader.py` consolidated into shared utilities in `oiio_utils.py` and `pixels.py`. + +### OCIO Configuration (#102) +- Removed the `OCIO` environment-variable override path; the bundled config is now always used, making behaviour deterministic across environments. +- `Always use bundled OCIO config` commit closes the gap between developer and production runtime. + +### FFmpeg Robustness (#101, #88) +- Finalisation failures (e.g. `moov` atom not written) now propagate as hard errors instead of silent no-ops. +- FFmpeg encoder probe handling tightened; unexpected codec outputs no longer cause silent fallbacks. +- FFmpeg verification now has timeouts to prevent CI hangs. (#61) + +### Printf-Style Frame Pattern Resolution (#68) +- `%04d` / `%d` frame patterns in sequence paths are now resolved correctly before being passed to FFmpeg, fixing broken output filenames on certain sequence layouts. + +### Sequence Replacement Complexity (#69) +- Regex-based batch grouping removed in favour of deterministic, glob-based grouping to reduce fragility and improve performance. + +### Logging +- Debug-level log entries now correctly route to the file handler when file logging is enabled. +- `logging_utils.py` refactored for clarity. + +### Data AOV Preview Fix (#59) +- Data AOVs (normals, depth, motion vectors) with values outside `[0, 1]` now display correctly in the preview instead of clamping to black/white. + +--- + +## ๐Ÿ— Internal / Code Quality + +| Area | Change | +|---|---| +| `src/renderkit/ui/preview_image.py` | +107 lines: explicit buffer management, thread-safe pixmap creation | +| `src/renderkit/processing/video_encoder.py` | Significant refactor; shared pipeline via `frame_pipeline.py` | +| `src/renderkit/processing/color_space.py` | Deduplication of OCIO transform helpers | +| `src/renderkit/core/converter.py` | ~515 lines refactored for shared pipeline; orchestration extracted | +| `tests/` | +~2 200 lines of new tests covering batch, CLI, sequence replacement, video encoder, UI helpers, and logging | +| mypy | Baseline established (`fe02f78`); incremental type-annotation enforcement begins | +| SonarCloud | Addressed camelCase dummy fields, test helper warnings, and batch-conversion findings | +| `.gitignore` | Added entry for new generated artefacts | + +--- + +## ๐Ÿ“š Documentation + +- `docs/usage.md` โ€” expanded with batch convert, sequence replacement, and contact-sheet CLI examples (+213 lines). +- `docs/api/sequence_replacement.md` โ€” new API reference page for the sequence-replacement module. +- `docs/development.md` โ€” automation audit recipes and replacement cleanup safety notes added. +- `mkdocs.yml` โ€” wired up new API docs page. + +--- + +## ๐Ÿ› Bug Fixes + +| Issue | Fix | +|---|---| +| Data AOV preview clamps (#59) | Values outside `[0,1]` now normalised correctly for display | +| `%04d` frame patterns not resolved (#68) | Printf patterns expanded before FFmpeg invocation | +| Audit preflight false-passes (#72) | Sequence completeness validated before replacement audit | +| CLI one-sided range / resolution options (#90) | Argument parsing corrected to accept half-bounded ranges | +| Nested review-name batch lookup (#100) | Recursive directory walk now resolves deeply nested review paths | +| FFmpeg finalization silent failure (#101) | `FinalizationError` raised and surfaced to the user | +| OCIO env override ignored on some machines (#102) | Bundled config path is now the sole source of truth | +| QImage use-after-free in preview worker (#108) | Array lifetime explicitly extended past `QImage` destruction | +| Duplicate regex hotspots in sequence helpers (#106) | Pre-compiled patterns cache introduced | +| PowerShell null comparisons in CI (#61) | `$null -eq $x` ordering fixed for PowerShell strict mode | + +--- + +*Generated 2026-06-16 from `v1.0.0..HEAD` (30 merged PRs, ~80 commits).* From ee5dac702051f70d50245565a32e089399657af9 Mon Sep 17 00:00:00 2001 From: Ahmed Hindy Date: Tue, 16 Jun 2026 20:31:44 +0300 Subject: [PATCH 2/3] docs: consolidate v1.1 changelog into CHANGELOG.md --- CHANGELOG.md | 44 ++++++++++++++-- CHANGELOG_v1.1.md | 125 ---------------------------------------------- 2 files changed, 39 insertions(+), 130 deletions(-) delete mode 100644 CHANGELOG_v1.1.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 744e1a7..706fbd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,17 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.0] - 2026-06-16 + ### Added -- `renderkit replace-sequence-with-mp4` for safe replacement of detected source frame sequences with approved MP4s. -- `renderkit batch-replace` for scanning EXR sequence trees and applying the same verified replacement workflow in bulk. -- JSONL audit records for sequence replacement cleanup, including dry-run, verification, copy, deletion, and reclaimed-byte details. +- **Batch EXR โ†’ MP4 CLI** โ€” new `renderkit batch convert` sub-command converts an entire directory tree of EXR sequences in one shot, with dry-run support that validates replacement MP4s before committing any writes. +- **Sequence replacement & cleanup** โ€” `renderkit replace-sequence-with-mp4` and `renderkit batch-replace` for safe, audited replacement of EXR frame sequences with verified MP4s. JSONL audit records capture dry-run, verification, copy, deletion, and reclaimed-byte details. +- **Contact-sheet CLI** promoted to a proper `renderkit contact-sheet` sub-command via a new dedicated `cli/conversion.py` module. +- **`--no-progress` / `--progress` flags** for suppressing the live progress bar in headless / CI pipelines without losing log output. +- **Nuitka standalone packaging** โ€” new `nuitka-standalone-zip.yml` CI workflow produces self-contained zips for Windows, macOS, and Linux, backed by `scripts/build_nuitka.ps1` and `scripts/stage_portable_ffmpeg.py` for portable FFmpeg bundling. +- `src/renderkit/processing/frame_pipeline.py` โ€” shared frame-preparation pipeline used by both the single-frame preview and the video encoder. +- `src/renderkit/core/sequence_replacement.py` โ€” new module handling sequence audit, replacement, and cleanup workflows. +- `src/renderkit/core/batch.py` and `src/renderkit/cli/batch.py` backing the batch-convert feature end-to-end. +- `src/renderkit/core/sequence_names.py` extracted from the sequence module to isolate name-normalisation helpers. +- `src/renderkit/ui/qt_compat.py` to centralise Qt version shims. +- `src/renderkit/processing/pixels.py` and `src/renderkit/io/oiio_utils.py` for shared pixel and OIIO helpers. +- mypy baseline established; incremental type-annotation enforcement begins. +- New tests covering batch conversion, CLI, sequence replacement, video encoder, UI helper modules, and logging (+~2 200 lines). ### Changed +- **Main window decomposed** โ€” `main_window_logic.py` split into four focused helper modules: `main_window_preview.py`, `main_window_sequence.py`, `main_window_settings.py`, and `main_window_ui.py`. +- **Preview pipeline thread safety** โ€” QPixmap creation moved to the UI thread; worker threads now pass raw `bytes`/`numpy` arrays instead of Qt objects. `QImage` buffer lifetimes explicitly managed so the underlying array outlives the `QImage`. +- **Shared frame-prep pipeline** โ€” preview and video-encoder paths now share `frame_pipeline.py`, eliminating the previous code duplication. +- **Conversion orchestration** โ€” conversion kickoff logic extracted from `main_window_logic.py` into a clean orchestration layer, reducing UI/core coupling. +- **OCIO config simplified** โ€” removed the `OCIO` environment-variable override; the bundled config is now always used for deterministic behaviour across environments. +- **Duplicate render helpers consolidated** โ€” colour-conversion and scaling helpers that were duplicated across `converter.py`, `video_encoder.py`, and `image_reader.py` moved into `oiio_utils.py` and `pixels.py`. +- **Magic literals extracted** โ€” numeric and string magic literals replaced with named constants throughout the codebase. - Batch conversion output planning now deduplicates colliding MP4 paths within a run. -- Batch CLI implementation is split into dedicated command and shared conversion modules. +- Batch CLI implementation split into dedicated command and shared conversion modules. +- Regex-based batch sequence grouping replaced with deterministic glob-based grouping. +- Pre-compiled regex patterns introduced in sequence helpers to avoid hotspot recompilation. +- Debug-level log entries now correctly route to the file handler when file logging is enabled. +- FFmpeg finalisation failures (e.g. missing `moov` atom) now propagate as hard errors instead of silent no-ops. +- FFmpeg encoder probe handling tightened; unexpected codec outputs no longer cause silent fallbacks. +- FFmpeg verification in CI now has timeouts to prevent hangs. +- `Always use bundled OCIO config` closes the gap between developer and production runtimes. +- SonarCloud findings addressed: camelCase dummy fields, test helper warnings, batch-conversion findings. +- PyInstaller archive layout preserved in Nuitka artifacts; macOS executable-data collision fixed. +- PowerShell null comparisons in CI corrected to `$null -eq $x` ordering for strict mode. ### Fixed -- Sequence replacement validates replacement MP4 existence during dry runs and preflights audit report writability before copy/delete work. +- Data AOVs (normals, depth, motion vectors) with values outside `[0, 1]` now display correctly in the preview instead of clamping to black/white. +- `%04d` / `%d` printf-style frame patterns in sequence paths now resolved correctly before FFmpeg invocation. +- Sequence replacement validates replacement MP4 existence during dry runs and preflights audit-report writability before copy/delete work. +- Sequence replacement audit preflight now validates sequence completeness before proceeding. +- Nested review-name lookup in batch-replace now resolves deeply-nested shot directories correctly. +- CLI one-sided range and resolution options now parsed correctly. - FPS metadata probing and OCIO conversion diagnostics now log expected failure details instead of silently dropping them. ## [1.0.0] - 2026-06-06 diff --git a/CHANGELOG_v1.1.md b/CHANGELOG_v1.1.md deleted file mode 100644 index 9475b5b..0000000 --- a/CHANGELOG_v1.1.md +++ /dev/null @@ -1,125 +0,0 @@ -# RenderKit v1.1.0 โ€” Release Changelog - -> Comparing `v1.0.0` โ†’ `main` ยท 67 files changed ยท ~6 500 insertions / ~1 300 deletions - ---- - -## ๐Ÿš€ New Features - -### Batch EXR Sequence Conversion (CLI) -- **New `batch convert` CLI sub-command** โ€” convert an entire directory tree of EXR sequences to MP4 in one shot. (#73, #78) -- New `src/renderkit/core/batch.py` and `src/renderkit/cli/batch.py` modules back the feature end-to-end. -- Dry-run support: validates replacement MP4s before committing any writes. (#70) - -### Verified Sequence Replacement & Cleanup -- **`src/renderkit/core/sequence_replacement.py`** โ€” new module that handles auditing, replacing, and cleaning up EXR sequences once a verified MP4 replacement exists. (#70, #100) -- Audit preflight checks were tightened so mismatched or incomplete sequences are caught early. (#72) -- Nested review-name lookup fixed for deeply-structured shot directories. (#100) - -### Contact Sheet CLI -- `renderkit contact-sheet` is now a proper CLI command with a dedicated `src/renderkit/cli/conversion.py` module. (#91) -- Label help text was clarified and one-sided range / resolution options were fixed. (#89, #90) - -### Automation-Friendly Progress Control -- `--no-progress` / `--progress` flags let headless or CI pipelines suppress the live progress bar without losing log output. (#69) - -### Nuitka Standalone Packaging -- New **`.github/workflows/nuitka-standalone-zip.yml`** CI workflow builds self-contained Windows, macOS, and Linux zips. (#60, #61) -- New `scripts/build_nuitka.ps1` and `scripts/stage_portable_ffmpeg.py` support cross-platform portable FFmpeg bundling. -- PyInstaller archive layout is preserved in artifacts; macOS executable-data collision fixed. (#61) - ---- - -## ๐Ÿ”ง Improvements & Refactors - -### UI โ€” Main Window Decomposition (#106) -- `main_window_logic.py` was split into four focused helper modules: - - `main_window_preview.py` โ€” preview-related logic - - `main_window_sequence.py` โ€” sequence loading / frame helpers - - `main_window_settings.py` โ€” settings persistence - - `main_window_ui.py` โ€” UI wiring -- `sequence_names.py` extracted from the sequence module to isolate name-normalisation helpers. - -### Preview Pipeline โ€” Thread Safety & Memory Safety (#107, #108, #109) -- QPixmap creation moved to the **UI thread**; worker threads now pass raw `bytes` / `numpy` arrays instead of Qt objects. -- `QImage` buffer lifetimes are explicitly managed so the underlying array is guaranteed to outlive the `QImage`. -- `qt_compat.py` added to centralise Qt version shims. - -### Shared Preview Frame Preparation Pipeline (#105) -- `src/renderkit/processing/frame_pipeline.py` โ€” new module that unifies the frame-prep path used by both the single-frame preview and the video encoder, eliminating the previous duplication. - -### Conversion & UI Orchestration Refactor (#103) -- Conversion kickoff logic was extracted from `main_window_logic.py` into a clean orchestration layer, reducing coupling between UI and core. - -### Magic Literal Extraction (#111) -- Numeric and string magic literals throughout the codebase replaced with named constants for readability and maintainability. - -### Duplicate Render Helper Removal (#110) -- Duplicated colour-conversion and scaling helpers across `converter.py`, `video_encoder.py`, and `image_reader.py` consolidated into shared utilities in `oiio_utils.py` and `pixels.py`. - -### OCIO Configuration (#102) -- Removed the `OCIO` environment-variable override path; the bundled config is now always used, making behaviour deterministic across environments. -- `Always use bundled OCIO config` commit closes the gap between developer and production runtime. - -### FFmpeg Robustness (#101, #88) -- Finalisation failures (e.g. `moov` atom not written) now propagate as hard errors instead of silent no-ops. -- FFmpeg encoder probe handling tightened; unexpected codec outputs no longer cause silent fallbacks. -- FFmpeg verification now has timeouts to prevent CI hangs. (#61) - -### Printf-Style Frame Pattern Resolution (#68) -- `%04d` / `%d` frame patterns in sequence paths are now resolved correctly before being passed to FFmpeg, fixing broken output filenames on certain sequence layouts. - -### Sequence Replacement Complexity (#69) -- Regex-based batch grouping removed in favour of deterministic, glob-based grouping to reduce fragility and improve performance. - -### Logging -- Debug-level log entries now correctly route to the file handler when file logging is enabled. -- `logging_utils.py` refactored for clarity. - -### Data AOV Preview Fix (#59) -- Data AOVs (normals, depth, motion vectors) with values outside `[0, 1]` now display correctly in the preview instead of clamping to black/white. - ---- - -## ๐Ÿ— Internal / Code Quality - -| Area | Change | -|---|---| -| `src/renderkit/ui/preview_image.py` | +107 lines: explicit buffer management, thread-safe pixmap creation | -| `src/renderkit/processing/video_encoder.py` | Significant refactor; shared pipeline via `frame_pipeline.py` | -| `src/renderkit/processing/color_space.py` | Deduplication of OCIO transform helpers | -| `src/renderkit/core/converter.py` | ~515 lines refactored for shared pipeline; orchestration extracted | -| `tests/` | +~2 200 lines of new tests covering batch, CLI, sequence replacement, video encoder, UI helpers, and logging | -| mypy | Baseline established (`fe02f78`); incremental type-annotation enforcement begins | -| SonarCloud | Addressed camelCase dummy fields, test helper warnings, and batch-conversion findings | -| `.gitignore` | Added entry for new generated artefacts | - ---- - -## ๐Ÿ“š Documentation - -- `docs/usage.md` โ€” expanded with batch convert, sequence replacement, and contact-sheet CLI examples (+213 lines). -- `docs/api/sequence_replacement.md` โ€” new API reference page for the sequence-replacement module. -- `docs/development.md` โ€” automation audit recipes and replacement cleanup safety notes added. -- `mkdocs.yml` โ€” wired up new API docs page. - ---- - -## ๐Ÿ› Bug Fixes - -| Issue | Fix | -|---|---| -| Data AOV preview clamps (#59) | Values outside `[0,1]` now normalised correctly for display | -| `%04d` frame patterns not resolved (#68) | Printf patterns expanded before FFmpeg invocation | -| Audit preflight false-passes (#72) | Sequence completeness validated before replacement audit | -| CLI one-sided range / resolution options (#90) | Argument parsing corrected to accept half-bounded ranges | -| Nested review-name batch lookup (#100) | Recursive directory walk now resolves deeply nested review paths | -| FFmpeg finalization silent failure (#101) | `FinalizationError` raised and surfaced to the user | -| OCIO env override ignored on some machines (#102) | Bundled config path is now the sole source of truth | -| QImage use-after-free in preview worker (#108) | Array lifetime explicitly extended past `QImage` destruction | -| Duplicate regex hotspots in sequence helpers (#106) | Pre-compiled patterns cache introduced | -| PowerShell null comparisons in CI (#61) | `$null -eq $x` ordering fixed for PowerShell strict mode | - ---- - -*Generated 2026-06-16 from `v1.0.0..HEAD` (30 merged PRs, ~80 commits).* From 7b7a8c329da12d7c1a999203c9ee5a2d6f468730 Mon Sep 17 00:00:00 2001 From: Ahmed Hindy Date: Tue, 16 Jun 2026 21:54:10 +0300 Subject: [PATCH 3/3] docs: remove non-existent --progress flag from changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 706fbd7..58eb51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Batch EXR โ†’ MP4 CLI** โ€” new `renderkit batch convert` sub-command converts an entire directory tree of EXR sequences in one shot, with dry-run support that validates replacement MP4s before committing any writes. - **Sequence replacement & cleanup** โ€” `renderkit replace-sequence-with-mp4` and `renderkit batch-replace` for safe, audited replacement of EXR frame sequences with verified MP4s. JSONL audit records capture dry-run, verification, copy, deletion, and reclaimed-byte details. - **Contact-sheet CLI** promoted to a proper `renderkit contact-sheet` sub-command via a new dedicated `cli/conversion.py` module. -- **`--no-progress` / `--progress` flags** for suppressing the live progress bar in headless / CI pipelines without losing log output. +- **`--no-progress` flag** for suppressing the live progress bar in headless / CI pipelines without losing log output. - **Nuitka standalone packaging** โ€” new `nuitka-standalone-zip.yml` CI workflow produces self-contained zips for Windows, macOS, and Linux, backed by `scripts/build_nuitka.ps1` and `scripts/stage_portable_ffmpeg.py` for portable FFmpeg bundling. - `src/renderkit/processing/frame_pipeline.py` โ€” shared frame-preparation pipeline used by both the single-frame preview and the video encoder. - `src/renderkit/core/sequence_replacement.py` โ€” new module handling sequence audit, replacement, and cleanup workflows.