Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ VidGear Core: Virtually isolated API specific dependencies [#243]
- ⚡️ New behavior to virtually isolate optional API specific dependencies by silencing `ImportError` on all VidGear's APIs import. - 🎨 Implemented algorithm to cache all imports on startup but silence any `ImportError` on missing optional dependency. -⚠️ Now `ImportError` will be raised only when certain API specific dependency is missing during given API's initialization. - ✨ New `import_dependency_safe` to imports specified dependency safely with `importlib` module. - ⚡️Replaced all APIs imports with `import_dependency_safe`. - ⚡️ Added support for relative imports in `import_dependency_safe`. - ✨ Implemented `error` parameter to by default `ImportError` with a meaningful message if a dependency is missing, Otherwise if `error = log` a warning will be logged and on `error = silent` everything will be quit. But If a dependency is present, but older than specified, an error is raised if specified. - ✨ Implemented behavior that if a dependency is present, but older than `min_version` specified, an error is raised always. - ✨ Implemented `custom_message` to display custom message on error instead of default one. - 🔥 Removed redundant `logger_handler`, `mkdir_safe`, `retrieve_best_interpolation`, `capPropId` helper functions from asyncio package. - 🎨 Relatively imported helper functions from non-asyncio package. - ⚡️ Implemented separate `import_core_dependency` function to import and check for specified core dependency. `ImportError` will be raised immediately if core dependency not found. - WebGear_RTC: - 🐛 Fixed Assertion error bug - 🚑️ Source must raise MediaStreamError when stream ends instead of returning None-type. - 👷 Updated CI tests. - 📝 Updated Docs Examples. - Helper: - ⚰️ Removed unused `aiohttp` dependency. - 🔊 Removed `asctime` from logging. - 🎨 CamGear: Enforced logging for YouTube live. - Setup.py: - 🔥 Removed version check on certain dependencies. - ⏪️ Re-added `aiortc` to auto-install latest version. - ➖ Removed all redundant dependencies like `colorama`, `aiofiles`, `aiohttp`. - ➕ Added new `cython` and `msgpack` dependency. - 🎨 Added `msgpack` and `msgpack_numpy` to auto-install latest. - CI: - 👷 Imported correct `logger_handler` for asyncio tests. - 🐛 Fixed invalid import bug. - 🐛 CI: Fixed bug in PiGear tests. - 🐛 Fixed `fake_picamera` class logger calling `vidgear` imports prematurely before importing `picamera` class in tests. - 🚑️ Implemented new `fake_picamera` class logger inherently with `logging` module. - 🎨 Moved `sys.module` logic for faking to `init.py`. - ☂️ Added `__init__.py` to ignore in Codecov. - Docs: - 🗃️ Updated changelog.md and fixed clutter. - 📝 Updated URL and context for CamGear example. - ✏️ Fixed typos in usage examples. - 💡 Updated code comments. - ⏪️ Reverted UI change in CSS. - 💄 New assets and typos fixed. - 🚸 Added `pip` upgrade related docs - 📝 Added docs for installing vidgear with only selective dependencies - 💄 Added new `advance`/`experiment` admonition with new background color. - 🍱 Added new icons svg for `advance` and `warning` admonition. - ⚰️ Removed redundant data table tweaks from `custom.css`. - 🎨 Beautify `custom.css`. - ✏️ Fixed typos in URL links. - 🚸 Added bonus examples to help section. - 🚸 Implemented a curated list of more advanced examples with unusual configuration for each API. - 💄 Updated admonitions colors and beautified `custom.css`. - ⚡️ Replaced VideoGear & CamGear with OpenCV in CPU intensive examples. - 📝 Updated `mkdocs.yml` with new changes and URLs. - 🚚 Moved FAQ examples to bonus. - 📝 Added several new contents and updated context. - ✏️ Fixed typos and updated links. - 🚸 Added Gitter sidecard embed widget. - 🍱 Imported gitter-sidecar script to `main.html`. - 💄 Updated `custom.js` to set global window option. - 💄 Updated Sidecard UI in `custom.css`. - ⚰️ Removed dead code from docs. - ✏️ Fixed more typos.
- Loading branch information