Skip to content

Commit

Permalink
Release VidGear Stable v0.2.3 [#262]
Browse files Browse the repository at this point in the history
# New Features ✨
- CamGear: 
    * Added support for `4K` Streaming URLs.
- Helper: 
    * Implemented logging ColorFormatter string alignment.
        + Center aligned logging Level-name and Class-name.
        + Changed `%` formatting style with modern `{`.
        + Re-added `asctime` value to Formatter string.
        + Re-arranged parameter positions in Formatter string.
- Maintenance:
    * Added new `.gitignore`  for specifying intentionally untracked files to ignore
        + Added more files entries to `.gitignore`.
    * Added new `.gitattributes` to manage how Git reads line endings.
        + Enabled `auto` default behavior, in case people don't have `core.autocrlf` set.
        + Enforced LF line-endings for selective files types.
        + Added Binary data files that specifies they are not text, and git should not try to change them.
        + Added Language aware diff headers.
        + Added Linguist language overrides.
- Docs:
    * Added new ScreenGear with WebGear_RTC API bonus example.
    * Added support for `hl_lines` argument for highlighting specific code lines.
    * Added drop-shadow effects for its `slate` theme to improve visibility.

# Updates/Improvements ⚡️
- CamGear:
    * Replaced `youtube-dl` with `yt-dlp` as pafy backend for YouTube videos pipelining.
        + Implemented hack to trick pafy into assuming `yt-dlp` as `youtube-dl`.
        + Using `sys.modules` to present `yt-dlp` as `youtube-dl`.
        + `yt-dlp` python API functions exactly similar to `youtube-dl`.
        + Replaced `youtube-dl` dependency with `yt-dlp`.
        + Replaced `youtube-dl` imports with `yt-dlp`.
- StreamGear: 
    * Updated default `stream_count` internal dict key value to 1.
- Maintenance:
    * Introduced python short-circuiting for handling logging logic.
    * Enabled logging for `check_WriteAccess` method in WriteGear, StreamGear and NetGear APIs.
- Docs:
    * Added warning for ScreenGear outputting RGBA frames instead of default BGR frames with `mss` backend.
    * Added warnings for properly formatting `output_params` when assigning external audio-source in WriteGear.
    * Added depreciation notice for Python 3.6 legacies.
    * Restructured docs to make it more user-friendly.
    * Updated, Extended and Improved context.
    * Improved code comments.
    * Updated docs admonitions.
    * Updated `Zenodo` badge.
- CI: 
    * Migrated to new Codecov Uploader in Azure Pipelines.
        + Support for the Bash Uploader will be deprecated on February 1st, 2022. See: https://docs.codecov.com/docs/about-the-codecov-bash-uploader
        + Added commands for signature and SHASUM verification to ensure integrity of the Uploader before use.
        + Replaced related bash commands.
    * Replaced `env` with `export` in ci_linux.yml.
    * Replaced `bubkoo/needs-more-info@v1` with `wow-actions/needs-more-info@v1`.
    * Added codecov secret token through `env` variable. 
    * Added wildcard to skip CI tests for doc(`.md`) files.
    * Added `.md` files to Codecov ignore list.
    * Update vidgear's banner image.

# Breaking Updates/Changes 💥
- [ ] `check_WriteAccess` will now return as invalid path if writing directory does not exists. This will effect output file handling in WriteGear and StreamGear APIs.

# Bug-fixes 🐛
- StreamGear:
    * Fixed StreamGear Malformed URI Error with HLS Segments [PR #243 by @Vboivin]
        + Removed the extra `'%'` character from the naming convention for segment files.
        + Used `stream_count` internal dict variable to alter template for HLS segment filenames.
- WriteGear: 
    * Fixed bug in disable_force_termination logic which accidentally disables force termination.
- WebGear_RTC: 
    * Fixed `name 'VideoStreamTrack' is not defined` bug.
- Setup.py: 
    * Fixed `TypeError` bug.
    * Fixed invalid `latest_version` retrieval.
- Helper:
    * Fixed `check_WriteAccess` failing to recognize correct permission for writing the output file on windows platform. 
        + Implemented separate logic for `Windows` and `*nix` platforms.
        + Added new `stat` import.
        + Improved warnings and error handling.
        + Added logging parameter to `check_WriteAccess`.
    * Fixed bug in check_WriteAccess that throws `OSError` while handling URLs.
- Docs:
    * Fixed bugs in WriteGear's Compression Mode with Live Audio Input example.
    * Fixed "drop-shadow" property via `filter` function conflicting with sidecard button.
        + Added new CSS classes for image, admonitions and code highlight in dark theme.
    * Several internal and external webpage links typos fixed.
    * Fixed several language typos.
- CI: 
    * Fixed Azure Pipeline coverage upload bugs.
    * Fixed random errors in CamGear `stream_mode` test.
- Bash:
    * Removed the Windows carriage returns from the shell scripts to be able to execute them on Linux. 
- Fixed logging comments.
  • Loading branch information
abhiTronix committed Oct 27, 2021
2 parents 38a7f54 + d2fb75e commit 99ffcec
Show file tree
Hide file tree
Showing 94 changed files with 2,332 additions and 1,942 deletions.
41 changes: 41 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Basic .gitattributes for a vidgear repo.

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Binary data types
*.gif binary
*.ico binary
*.jpg binary
*.bmp binary
*.webp binary
*.svg binary
*.png binary
*.whl binary
*.zip binary

# Language aware diff headers
*.css diff=css
*.html diff=html
*.py diff=python
*.md diff=markdown

# Linguist language overrides
*.py linguist-language=Python
*.md linguist-language=Markdown
*.js linguist-language=JavaScript
*.sh linguist-language=Shell
*.css linguist-language=CSS
*.html linguist-language=HTML
*.yml linguist-language=YAML

# Override LF on some files
*.js text eol=lf
*.md text eol=lf
*.css text eol=lf
*.html text eol=lf
*.cfg text eol=lf
*.json text eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.manifest text eol=lf
10 changes: 6 additions & 4 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ on:
push:
branches:
- testing
paths-ignore:
- '**/*.md'
pull_request:
branches:
- testing

paths-ignore:
- '**/*.md'

jobs:
test:
Expand Down Expand Up @@ -51,7 +54,7 @@ jobs:
pip install -U pip wheel numpy
pip install -U .[asyncio]
pip uninstall opencv-python -y
pip install -U flake8 six codecov pytest pytest-asyncio pytest-cov youtube-dl mpegdash paramiko m3u8 async-asgi-testclient
pip install -U flake8 six codecov pytest pytest-asyncio pytest-cov yt_dlp mpegdash paramiko m3u8 async-asgi-testclient
if: success()
- name: run prepare_dataset_script
run: bash scripts/bash/prepare_dataset.sh
Expand All @@ -64,10 +67,9 @@ jobs:
- name: pytest with_ENV
run: |
mkdir -p $HOME/logs
export VIDGEAR_LOGFILE="$HOME/logs"
timeout 1200 pytest --verbose --cov=vidgear --cov-report=xml --cov-report term-missing vidgear/tests/ || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; else echo "EXIT_CODE=$code" >>$GITHUB_ENV; fi
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
env:
VIDGEAR_LOGFILE: $HOME/logs
if: success() && matrix.python-version == 3.7
- name: pytest without_ENV
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/need_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: bubkoo/needs-more-info@v1
- uses: wow-actions/needs-more-info@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: .github/needs-more-info.yml
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
__pycache__
.pytest_cache
.ipynb_checkpoints
.mypy_cache
.vscode
venv
Pipfile.lock
env3.*
env
.coverage
coverage.xml
.netlify
.idea

# vim temporary files
*~
.*.sw?
Loading

0 comments on commit 99ffcec

Please sign in to comment.