β¨ Release DeFFcode Stable v0.2.7#61
Conversation
- Enable navigation.prune for better sidebar performance - Add creation date and fallback to git-revision-date plugin - Configure mkdocstrings filters and fix options nesting - Add mermaid diagram support via superfences custom fences - Enable generic arithmatex and magiclink shorthand options - Replace exclude plugin with exclude_docs directive - Fix typo: "Recipies" -> "Recipes" in nav section
β¦ining-ffdecoder-with-writegear 57 bug high cpu usage when chaining ffdecoder with writegear
- Drop Python 3.8/3.9, add 3.12/3.13 to CI matrix - Update Codecov download URLs from uploader.codecov.io to cli.codecov.io - Switch to new Codecov CLI upload-process command with --fail-on-error flag
- Bump ubuntu-20.04 to ubuntu-22.04 - Update Python matrix to 3.10β3.13 - Upgrade checkout, setup-python, and codecov actions
β¦thon-39x-and-38x-legacies-2 58 idea dropped support for python 39x and 38x legacies
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
==========================================
- Coverage 95.83% 86.18% -9.66%
==========================================
Files 6 6
Lines 793 948 +155
==========================================
+ Hits 760 817 +57
- Misses 33 131 +98 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (1)
tests/test_ffhelper.py (1)
144-146:β οΈ Potential issue | π‘ MinorUse
logger.exception(...)instead oflogger.exceptions(...).Line 145 calls a non-existent
logging.Loggermethod. In the timeout path, this raisesAttributeErrorand masks the original timeout failure.Proposed fix
- elif isinstance(e, requests.exceptions.Timeout): - logger.exceptions(str(e)) + elif isinstance(e, requests.exceptions.Timeout): + logger.exception(str(e))π€ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_ffhelper.py` around lines 144 - 146, The timeout-except branch in tests/test_ffhelper.py is calling a non-existent method logger.exceptions and should call logger.exception instead; update the except block that checks isinstance(e, requests.exceptions.Timeout) to call logger.exception(str(e)) (or logger.exception("timeout", exc_info=e)) so the original Timeout exception and traceback are logged rather than raising an AttributeError from logger.exceptions; reference the logger variable and the exception variable e in that branch.
π§Ή Nitpick comments (2)
docs/index.md (2)
26-26: Consider hyphenating the compound adjective.The phrase "lightning fast video frames" uses a compound adjective. Standard grammar suggests hyphenating it as "lightning-fast" when it precedes the noun it modifies.
π Proposed grammar fix
-> A cross-platform **:fontawesome-solid-gauge-high: High-performance Video Frames Decoder** that flexibly executes FFmpeg pipeline inside a subprocess pipe for generating real-time, low-overhead, lightning fast video frames with robust error-handling in just a few lines of python code :fontawesome-solid-fire-flame-curved: +> A cross-platform **:fontawesome-solid-gauge-high: High-performance Video Frames Decoder** that flexibly executes FFmpeg pipeline inside a subprocess pipe for generating real-time, low-overhead, lightning-fast video frames with robust error-handling in just a few lines of python code :fontawesome-solid-fire-flame-curved:π€ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/index.md` at line 26, The phrase "lightning fast video frames" in the docs title should use a hyphenated compound adjective; update the text segment "lightning fast video frames" to "lightning-fast video frames" in the string containing "High-performance Video Frames Decoder ... lightning fast video frames" so the compound adjective correctly precedes its noun.
200-212: Plan to update Zenodo citation when v0.2.7 is published.The current DOI (10.5281/zenodo.12689394) correctly references v0.2.6, which is the latest version published to Zenodo. However, once this release is published to Zenodo as v0.2.7, the citation metadata in this file will need to be updated with the new DOI and version. Consider adding a comment or tracking this as a post-release task.
π€ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/index.md` around lines 200 - 212, Update the BibTeX entry that currently contains DOI 10.5281/zenodo.12689394 and version v0.2.6 (entry key "deffcode" / title "abhiTronix/deffcode: v0.2.6") once Zenodo publishes v0.2.7: replace the doi field with the new DOI, update the version and title fields to v0.2.7, and optionally add a small TODO comment above the BibTeX block noting this is a post-release update to ensure the citation is kept in sync.
π€ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/CIlinux.yml:
- Around line 63-67: The workflow uses `sudo pip` and `sudo python` which
install into the system Python instead of the matrix-selected interpreter;
replace all usages of `sudo pip install -U ...` and `sudo python ...` with the
matrix interpreterβs pip by invoking `python -m pip install -U ...` (and `python
-m <module>` where appropriate) so the actions/setup-python selected version
(matrix) is used for installs and commands; update the lines that call `sudo pip
install -U numpy`, `sudo pip install -U .`, `sudo pip install -U
opencv-python-headless`, `sudo pip install -U vidgear[core]`, `sudo pip install
-U ruff six codecov pytest pytest-cov` and the later `sudo python` invocation to
use `python -m pip` / `python -m` respectively.
In `@docs/contribution/PR.md`:
- Around line 85-87: Replace the confusing artifact ``#!sh resolves `#123``` with
a plain issue-linking keyword example such as ``resolves `#123``` (or ``fixes
`#123```) in the commit guidance so the inline text is clear; update the line
containing the ``#!sh resolves `#123``` example to use the plain keyword example
instead.
- Line 81: The link uses the fragment "#testing-formatting-linting" which
markdownlint flags as invalid; fix it by adding an explicit HTML anchor/id
immediately before the "Testing & Linting" header (for example insert <a
name="testing-formatting-linting"></a> or <div
id="testing-formatting-linting"></div> directly above the "Testing & Linting"
header) so the existing link target resolves reliably across renderers.
---
Outside diff comments:
In `@tests/test_ffhelper.py`:
- Around line 144-146: The timeout-except branch in tests/test_ffhelper.py is
calling a non-existent method logger.exceptions and should call logger.exception
instead; update the except block that checks isinstance(e,
requests.exceptions.Timeout) to call logger.exception(str(e)) (or
logger.exception("timeout", exc_info=e)) so the original Timeout exception and
traceback are logged rather than raising an AttributeError from
logger.exceptions; reference the logger variable and the exception variable e in
that branch.
---
Nitpick comments:
In `@docs/index.md`:
- Line 26: The phrase "lightning fast video frames" in the docs title should use
a hyphenated compound adjective; update the text segment "lightning fast video
frames" to "lightning-fast video frames" in the string containing
"High-performance Video Frames Decoder ... lightning fast video frames" so the
compound adjective correctly precedes its noun.
- Around line 200-212: Update the BibTeX entry that currently contains DOI
10.5281/zenodo.12689394 and version v0.2.6 (entry key "deffcode" / title
"abhiTronix/deffcode: v0.2.6") once Zenodo publishes v0.2.7: replace the doi
field with the new DOI, update the version and title fields to v0.2.7, and
optionally add a small TODO comment above the BibTeX block noting this is a
post-release update to ensure the citation is kept in sync.
πͺ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
βΉοΈ Review info
βοΈ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f7bc4974-5d58-48da-89b7-fb3f653f2825
π Files selected for processing (9)
.github/workflows/CIlinux.ymlREADME.mddeffcode/ffhelper.pydocs/contribution/PR.mddocs/contribution/issue.mddocs/index.mddocs/recipes/advanced/transcode-hw-acceleration.mdpyproject.tomltests/test_ffhelper.py
β Files skipped from review due to trivial changes (2)
- README.md
- pyproject.toml
π§ Files skipped from review as they are similar to previous changes (2)
- docs/recipes/advanced/transcode-hw-acceleration.md
- deffcode/ffhelper.py
There was a problem hiding this comment.
Actionable comments posted: 2
π€ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/installation/index.md`:
- Line 42: The sentence referencing Python support is awkwardly worded; replace
the phrase ":fontawesome-brands-python: [**Python
3.10+**](https://www.python.org/downloads/) are only supported legacies for
installing DeFFcode `v0.2.7` and above." with a clear line such as "Python 3.10+
is the only supported Python version for DeFFcode v0.2.7 and newer." Keep the
reference to the Python download link and the `v0.2.7` version string so readers
can locate the change using the "Python 3.10+" token and the `v0.2.7`
identifier.
- Around line 184-187: Convert the fenced triple-backtick shell code blocks that
contain the "poetry add deffcode" snippet and the subsequent "git clone ... /
poetry install" snippet into indented code blocks to satisfy markdownlint MD046;
locate the fenced blocks (the ones starting with ```sh and containing the lines
"# Add latest stable release as a project dependency / poetry add deffcode" and
the later block with "# clone the repository and get inside / git clone ... &&
cd deffcode" and replace each fenced block with four-space-indented lines
preserving the exact shell commands and blank lines.
πͺ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
βΉοΈ Review info
βοΈ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b31eeb7a-0139-4523-9924-1e1c39617d6a
π Files selected for processing (4)
.github/workflows/CIlinux.ymldocs/installation/index.mdmkdocs.ymlpyproject.toml
β Files skipped from review due to trivial changes (2)
- pyproject.toml
- .github/workflows/CIlinux.yml
π§ Files skipped from review as they are similar to previous changes (1)
- mkdocs.yml
There was a problem hiding this comment.
β»οΈ Duplicate comments (1)
.github/workflows/CIlinux.yml (1)
63-67:β οΈ Potential issue | π MajorUse the matrix interpreter consistently and harden the pytest exit-code logic.
Line 63β67 and Line 74 still run through
sudo, which can bypass theactions/setup-pythoninterpreter and invalidate the 3.10β3.13 matrix. Also, on Line 74,$codecan be unset when pytest exits 0, making the numeric check brittle.Suggested patch
- name: Install Pip Dependencies run: | - sudo pip install -U numpy - sudo pip install -U . - sudo pip install -U opencv-python-headless - sudo pip install -U vidgear[core] - sudo pip install -U ruff six codecov pytest pytest-cov + python -m pip install -U pip + python -m pip install -U numpy + python -m pip install -U . + python -m pip install -U opencv-python-headless + python -m pip install -U vidgear[core] + python -m pip install -U ruff six codecov pytest pytest-cov if: success() @@ - name: Run pytest and ruff run: | - timeout 1200 sudo pytest -sv --cov=deffcode --cov-report=xml --cov-report term-missing tests/ || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; else echo "EXIT_CODE=$code" >>$GITHUB_ENV; fi - ruff check . - ruff format --check . + code=0 + timeout 1200 python -m pytest -sv --cov=deffcode --cov-report=xml --cov-report term-missing tests/ || code=$? + if [[ $code -ne 124 && $code -ne 0 ]]; then exit "$code"; fi + echo "EXIT_CODE=$code" >> "$GITHUB_ENV" + python -m ruff check . + python -m ruff format --check . if: success()#!/bin/bash set -euo pipefail echo "== configured runner interpreter ==" command -v python python -V command -v pip pip -V echo "== interpreter/pip under sudo (should differ if misconfigured) ==" sudo bash -lc 'command -v python; python -V; command -v pip; pip -V' echo "== reproduce unset-code branch behavior ==" bash -lc 'unset code; if [[ $code -ne 124 && $code -ne 0 ]]; then echo fail; else echo pass; fi' || trueAlso applies to: 74-76
π€ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/CIlinux.yml around lines 63 - 67, Replace the sudo pip installs with interpreter-bound installs so the matrix-controlled Python is used (use python -m pip or the runner's pip instead of sudo) β update the pip install commands that currently use sudo (the numpy/opencv/vidgear/ruff/six/codecov/pytest lines) to run under the configured interpreter from actions/setup-python; also harden the pytest exit-code logic by ensuring the variable used for the check is always defined and compared numerically (use a default like ${code:-0} or explicitly set code after pytest) and change the conditional that checks code (the branch that inspects $code for 124/0) to handle an unset value safely and compare as integers.
π€ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/CIlinux.yml:
- Around line 63-67: Replace the sudo pip installs with interpreter-bound
installs so the matrix-controlled Python is used (use python -m pip or the
runner's pip instead of sudo) β update the pip install commands that currently
use sudo (the numpy/opencv/vidgear/ruff/six/codecov/pytest lines) to run under
the configured interpreter from actions/setup-python; also harden the pytest
exit-code logic by ensuring the variable used for the check is always defined
and compared numerically (use a default like ${code:-0} or explicitly set code
after pytest) and change the conditional that checks code (the branch that
inspects $code for 124/0) to handle an unset value safely and compare as
integers.
βΉοΈ Review info
βοΈ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2855d88f-5802-4052-9820-df5485a65f8e
π Files selected for processing (1)
.github/workflows/CIlinux.yml
40 multiple input streams
Brief Description
New DeFFcode stable release is here with focus on bugfixes and maintenance updates π
Requirements / Checklist
Related Issue
Context
DeFFcode's next stable release
v0.2.7.Types of changes
Miscellaneous (if available):
None
Summary by CodeRabbit
New Features
Documentation
Chores
Tests