From f78c7f783533bf3a804249de6fe36880c8f26756 Mon Sep 17 00:00:00 2001 From: Breakthrough Date: Mon, 10 Jun 2024 23:45:38 -0400 Subject: [PATCH 1/3] [docs] Update changelog and image URI. --- website/pages/changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/changelog.md b/website/pages/changelog.md index 54047e65..6e58c1a9 100644 --- a/website/pages/changelog.md +++ b/website/pages/changelog.md @@ -10,9 +10,9 @@ Releases Includes new histogram and perceptual hash based detectors (thanks @wjs018 and @ash2703), adds flash filter to content detector, and includes various bugfixes. Below shows the scores of the new detectors normalized against `detect-content` for comparison on a difficult segment with 3 cuts: -comparison of new detector scores +comparison of new detector scores -Thanks to everyone who contributed for their help and support! +Feedback on the new detection methods and their default values is most welcome. Thanks to everyone who contributed for their help and support! #### Changelog From 8d7d26c191f858dd36dcb277ae676d8e76ac52d1 Mon Sep 17 00:00:00 2001 From: Breakthrough Date: Wed, 26 Jun 2024 22:15:01 -0400 Subject: [PATCH 2/3] [build] Fix incorrect installer version check. --- dist/pre_release.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dist/pre_release.py b/dist/pre_release.py index d7fc6735..c40751e1 100644 --- a/dist/pre_release.py +++ b/dist/pre_release.py @@ -10,10 +10,8 @@ installer_aip = '' with open("dist/installer/PySceneDetect.aip", "r") as f: installer_aip = f.read() - -aip_version = f"" - -assert aip_version in installer_aip, f"Installer project version does not match {VERSION}." + aip_version = f"" + assert aip_version in installer_aip, f"Installer project version does not match {VERSION}." with open("dist/.version_info", "wb") as f: v = VERSION.split(".") From 63db02a012945d6ca1f7d72c77682c611a0ebee1 Mon Sep 17 00:00:00 2001 From: Breakthrough Date: Sun, 7 Jul 2024 18:08:54 -0400 Subject: [PATCH 3/3] [build] Support ruff for format/lint checks. --- .github/workflows/check-code-format.yml | 34 ++++++++++++++----------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check-code-format.yml b/.github/workflows/check-code-format.yml index 49c51b61..7d19726d 100644 --- a/.github/workflows/check-code-format.yml +++ b/.github/workflows/check-code-format.yml @@ -1,5 +1,5 @@ -# Use YAPF to format PySceneDetect. -name: Check Code Format +# Check PySceneDetect code lint warnings and formatting. +name: Static Analysis on: pull_request: @@ -13,7 +13,6 @@ on: jobs: check_format: - runs-on: ubuntu-latest steps: @@ -24,17 +23,22 @@ jobs: python-version: '3.12' cache: 'pip' - - name: Update pip - run: python -m pip install --upgrade pip - - name: Install yapf - run: python -m pip install --upgrade yapf toml + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install av opencv-python-headless --only-binary ":all:" + python -m pip install -r requirements_headless.txt + + - name: Check Code Format (yapf) + if: ${{ hashFiles('.style.yapf') != '' }} + run: | + python -m pip install --upgrade yapf toml + python -m yapf --diff --recursive scenedetect/ tests/ - - name: Install Binary Dependencies - run: python -m pip install av opencv-python-headless --only-binary ":all:" - - name: Install Remaining Dependencies - run: python -m pip install -r requirements_headless.txt + - name: Static Analysis (ruff) + if: ${{ hashFiles('.style.yapf') == '' }} + run: | + python -m pip install --upgrade ruff + python -m ruff check + python -m ruff format --check - - name: Check Code Format (scenedetect) - run: python -m yapf --diff --recursive scenedetect/ - - name: Check Code Format (tests) - run: python -m yapf --diff --recursive tests/