Inside and video#32
Open
balparda wants to merge 42 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands TranZoom’s rendering capabilities by adding (1) interior (Set) point coloring and (2) an automated zoom animation command that outputs GIF/MP4, along with updated CLI wiring, metadata, docs, and tests.
Changes:
- Added interior (Set) coloring: new grayscale palettes,
--setalgorithm selection, set-palette support, and expanded image metadata. - Added
tranz zoom autoto render straight zoom-in animations and export as GIF/MP4 (with new animation writer utilities and metadata). - Moved palette/set options to global CLI flags and refreshed docs, examples, and regression tests accordingly.
Reviewed changes
Copilot reviewed 18 out of 43 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tranz.md | Regenerated CLI markdown reference including new global flags and zoom auto. |
| tests/cli/base_test.py | Updated image metadata extraction helper and added hash checks for new sample GIF/PNG assets. |
| tests_integration/test_installed_cli.py | Expanded installed-CLI smoke coverage to include interior coloring, GIF animation, and Julia wave render. |
| src/tranzoom/tranz.py | Added global CLI flags for palette, set-palette, and interior coloring algorithm into the shared config. |
| src/tranzoom/core/palette.py | Added grayscale / rgrayscale palettes and set-palette defaults/cycle count. |
| src/tranzoom/core/image.py | Major metadata expansion, GIF/MP4 writing helpers, GIF metadata parsing, and interior coloring pixel pipeline. |
| src/tranzoom/core/frame.py | Added SetHighlightAlgorithm enum and float→mpq approximation helper. |
| src/tranzoom/core/fractal.py | Added interior-point stats collection and optional interior-coloring signal through render pipeline. |
| src/tranzoom/core/ai.py | Propagated palette + interior-coloring options into zoom loops and logging. |
| src/tranzoom/cli/zoomcommand.py | Implemented new zoom auto command to render and export GIF/MP4 animations. |
| src/tranzoom/cli/imagecommand.py | Routed rendering through shared base.ProduceFractalImage and updated image reading helper. |
| src/tranzoom/cli/base.py | Added global set-palette + interior-coloring options and introduced shared ProduceFractalImage helper. |
| src/tranzoom/init.py | Version bump to 1.4.0. |
| scripts/make_examples.sh | Updated example-generation script to include interior coloring and animation outputs. |
| requirements.txt | Added animation dependencies and bumped pinned packages. |
| README.md | Documented new global flags, interior coloring, and zoom auto usage/examples. |
| pyproject.toml | Version bump and added animation dependencies. |
| poetry.lock | Lockfile updates for new dependencies and version bumps. |
| CHANGELOG.md | Added 1.4.0 release notes describing new features and breaking changes. |
| .vscode/settings.json | Extended spellchecker word list for new terminology. |
| .gitignore | Ignored additional generated media types at repo root. |
Comments suppressed due to low confidence (4)
src/tranzoom/core/ai.py:274
- This f-string is syntactically invalid (
f'{f', ...}) and will raise a SyntaxError at import time. Please rewrite the optional "interior" text using a standard conditional concatenation or a separate variable.
print_comm(
f'Will run {width} x {height} for [bold]{max_steps or "[red]∞[/]"}[/] step(s). '
f'{f', "{set_points.value}" interior. ' if set_points else ""}'
'Press [bold][red]Ctrl+C[/][/] to stop at any time.'
)
src/tranzoom/core/image.py:656
GetBasicDataFromImagenow supports GIFs, but the docstring still says "PNG" (including the Args description). Updating the docstring to reflect supported formats (PNG/GIF; MP4 not yet supported) will avoid confusion for callers.
This issue also appears on line 695 of the same file.
def GetBasicDataFromImage(img_bytes: bytes) -> tuple[int, int, str, tbase.JSONDict]:
"""Get basic data from a PNG image, including format, size, hash, and metadata text.
Args:
img_bytes: The PNG image data as bytes.
src/tranzoom/core/image.py:698
- This error message says "expected PNG" even though the function handles PNG and GIF (and explicitly checks for MP4). Please update the message to reflect the supported formats so failures are actionable.
raise NotImplementedError('MP4 format is not supported yet')
else:
raise Error(f'Unsupported image format {img.format!r}, expected PNG')
return (width, height, raw_hash, pil_info)
tests_integration/test_installed_cli.py:308
- This assertion error message says
tranz image mandel failed, but the command being exercised here istranz image julia. Please update the message so CI failures point to the correct command.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
No description provided.