Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #416 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 42 44 +2
Lines 2990 3093 +103
Branches 457 459 +2
==========================================
+ Hits 2990 3093 +103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move runtime dependencies into optional extras (zim, image, video, download, filesystem, html, rewriting, i18n, all), keep beartype as the only base dependency, and raise actionable ImportErrors when an extra is missing. Resolve cross-feature imports at call time so each extra stands alone. Add metadata/import tests, a CI matrix, docs, and changelog entries. Fixes openzim#244
pawank925
force-pushed
the
issue-244-full
branch
from
November 24, 2026 12:16
7b9c16e to
f41e9c1
Compare
Contributor
Author
benoit74
approved these changes
Nov 26, 2026
benoit74
left a comment
Collaborator
There was a problem hiding this comment.
I do not have experience with Python extras, but this looks good to me.
Merging this probably means we need to make a major release, but this is already in the pipe for Python 3.15 which in turns introduce breaking changes with libzim 4.
@rgaudin any feedback to share for something I might have missed?
rgaudin
requested changes
Nov 26, 2026
- Move to ubuntu-26.04 and drop unnecessary explicit x64 architecture. - Move the missing_extra import into image conversion's except block. - Make path_from dependency-free so video can import it without filesystem. - Restore conftest imports and install download in the focused extras job. - Mark the extras change as breaking and clarify the README download row. - Keep DEFAULT_DEV_ZIM_METADATA explicit and eager without requiring i18n or image.
FFmpeg on ubuntu-26.04 reports the MP3 fixture bitrate about 1.9% higher than the expected value. Widen the existing test tolerance from 1% to 5%.
This branch has not been deployed
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.
Fixes #244, building on the import-boundary work in #403.
changes
zim,image,video,download,filesystem,html,rewriting,i18n, plusall.pip install zimscraperlibnow only requiresbeartype.allcovers every runtime extra;videohas no Python dependencies (FFmpeg remains a system dependency).tinycss2is declared explicitly inrewritingbecauserewriting/css.pyimports it directly.ImportErrornaming the extra and the exact install command.filesystem,download,i18n,image) are resolved where they are used, so each extra stands on its own. Public APIs are preserved, includingDEFAULT_DEV_ZIM_METADATA.Tests and CI
all.ruff check,ruff format --check, strictpyright, pytest, package build, and fresh virtual environments for the core install and every extra.