Skip to content

Fix bugs and improve robustness across compress pipeline#2

Merged
Alyetama merged 3 commits into
mainfrom
fix/bugs-and-improvements
Jun 8, 2026
Merged

Fix bugs and improve robustness across compress pipeline#2
Alyetama merged 3 commits into
mainfrom
fix/bugs-and-improvements

Conversation

@Alyetama

@Alyetama Alyetama commented Jun 8, 2026

Copy link
Copy Markdown
Owner
  • Replace deprecated imghdr (removed in Python 3.13) with PIL-native Image.verify() for image validation
  • Fix original_size display truncation: str[:5] slicing produced wrong values for files >= ~100 MB (e.g. 100 MB showed as 10485 kB)
  • Fix silent mode crash: sys.stdout = None raises AttributeError on any subsequent print() or isatty() call; redirect to os.devnull instead
  • Remove dead code: size_change() bool return was computed but never used for the save/skip decision; simplify to return str only
  • Fix size_change total-summary call that indexed change[0] on what is now a plain string
  • Merge redundant os.stat() + Path.stat() double-stat into one call
  • Add Image.LANCZOS resampling filter to im.resize() for better quality
  • Add .webp/.WEBP to directory glob patterns
  • Fix compress() return type annotation: Optional[str] -> Optional[Tuple]

Alyetama and others added 3 commits June 7, 2026 23:04
- Replace deprecated imghdr (removed in Python 3.13) with PIL-native
  Image.verify() for image validation
- Fix original_size display truncation: str[:5] slicing produced wrong
  values for files >= ~100 MB (e.g. 100 MB showed as 10485 kB)
- Fix silent mode crash: sys.stdout = None raises AttributeError on any
  subsequent print() or isatty() call; redirect to os.devnull instead
- Remove dead code: size_change() bool return was computed but never
  used for the save/skip decision; simplify to return str only
- Fix size_change total-summary call that indexed change[0] on what is
  now a plain string
- Merge redundant os.stat() + Path.stat() double-stat into one call
- Add Image.LANCZOS resampling filter to im.resize() for better quality
- Add .webp/.WEBP to directory glob patterns
- Fix compress() return type annotation: Optional[str] -> Optional[Tuple]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add missing ray dependency to pyproject.toml (was in requirements.txt
  but not declared, so installed packages wouldn't pull it in and poetry
  build couldn't resolve it)
- Fix entry point: 'rayim:rayim.main' -> 'rayim.rayim:main' (correct
  module:callable format pointing at rayim/rayim.py:main)
- Regenerate poetry.lock via `poetry lock` with all transitive deps
- Remove poetry.lock from .gitignore and commit it; the .gitignore
  already had a comment noting it should be version-controlled, and
  without it CI resolves from scratch on every run which is fragile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Alyetama Alyetama merged commit 4e27163 into main Jun 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant