Repository navigation
feat(magika): make magika an optional dependency - #1355
SyedaAnshrahGillani (SyedaAnshrahGillani) wants to merge 4 commits into
Conversation
@microsoft-github-policy-service agree |
|
Of all PRs I'd like to see merged for this repo, this is the one I definitely would like to see merged the most. |
Moved 'magika' dependency to optional dependencies section.
|
Could this PR get some love, pretty please? Adam Fourney (@afourney) Calling in a favour as a .NET member and otherwise MS champion in GNU Emacs 😄 |
|
Could we please get this merged so we can use magika 1.x with libraries that use this :( |
|
I believe this fixes/implements: |
Abdul Rauf (armujahid)
left a comment
There was a problem hiding this comment.
This now conflicts with main; please update it.
Please also fix the duplicate [project.optional-dependencies] table, which makes the TOML invalid, and include Magika in [all].
Making Magika optional makes sense, but when no converter accepts a stream and Magika isn't installed, please add guidance to the UnsupportedFormatException suggesting markitdown[magika] or explicit format information. ImportWarning is hidden by default, so it doesn't provide that guidance. Conversions that can succeed without Magika should keep working.
Please add tests with and without Magika, including streams without format hints and charset handling.
Description:
This pull request makes the magika library an optional dependency in the markitdown package.
Previously, magika (and its dependency onnxruntime) was a mandatory installation, even for users who
did not utilize its functionality.
By making magika optional, users can now choose to install it only if they require its features,
leading to a smaller and more efficient installation for most users.
Changes:
it, gracefully skipping its functionality if not installed.