Skip to content

Commit

Permalink
Merge branch 'main' into develop-yapf-to-ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Breakthrough committed Jul 7, 2024
2 parents e4a56b7 + 63db02a commit 4378874
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/check-code-format.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -13,7 +13,6 @@ on:

jobs:
check_format:

runs-on: ubuntu-latest

steps:
Expand All @@ -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/
6 changes: 2 additions & 4 deletions dist/pre_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
installer_aip = ''
with open("dist/installer/PySceneDetect.aip", "r") as f:
installer_aip = f.read()

aip_version = f"<ROW Property=\"ProductVersion\" Value=\"{VERSION}\" Options=\"32\"/>"

assert aip_version in installer_aip, f"Installer project version does not match {VERSION}."
aip_version = f"<ROW Property=\"ProductVersion\" Value=\"{VERSION}\" Options=\"32\"/>"
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(".")
Expand Down

0 comments on commit 4378874

Please sign in to comment.