Skip to content

Commit 3e41ffd

Browse files
authored
Merge pull request #3312 from motioneye-project/dev
Beta 0.44.0b1
2 parents 2528061 + 275e023 commit 3e41ffd

166 files changed

Lines changed: 18867 additions & 16940 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,44 @@ jobs:
1818
packages: write
1919

2020
steps:
21-
- uses: docker/metadata-action@v5
21+
- uses: docker/metadata-action@v6
2222
id: meta
2323
with:
2424
images: |
2525
motioneyeproject/motioneye
2626
ghcr.io/${{ github.repository_owner }}/motioneye
27+
flavor: latest=false
2728
tags: |
2829
type=edge,branch=dev
2930
type=semver,pattern={{version}}
3031
type=semver,pattern={{major}}.{{minor}}
3132
type=semver,pattern={{major}}
33+
type=match,pattern=\d+\.\d+\.\d+b\d+
34+
type=raw,value=beta,enable=${{ github.ref_type == 'tag' && contains(github.ref_name, 'b') && contains(github.ref_name, '.') && !startsWith(github.ref_name, 'v') && !contains(github.ref_name, '-') }}
35+
type=raw,value=latest,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, 'b') && contains(github.ref_name, '.') && !startsWith(github.ref_name, 'v') && !contains(github.ref_name, '-') }}
3236
33-
- uses: docker/setup-qemu-action@v3
37+
- uses: docker/setup-qemu-action@v4
3438
with:
3539
cache-image: false
3640

37-
- uses: docker/setup-buildx-action@v3
41+
- uses: docker/setup-buildx-action@v4
3842

3943
- name: Login to Docker Hub
40-
uses: docker/login-action@v3
44+
uses: docker/login-action@v4
4145
if: github.event_name == 'push' && github.repository == 'motioneye-project/motioneye' && steps.meta.outputs.tags != null
4246
with:
4347
username: ${{ secrets.DOCKER_USERNAME }}
4448
password: ${{ secrets.DOCKER_TOKEN }}
4549

4650
- name: Login to GitHub Container Registry
47-
uses: docker/login-action@v3
51+
uses: docker/login-action@v4
4852
if: github.event_name == 'push' && github.repository == 'motioneye-project/motioneye' && steps.meta.outputs.tags != null
4953
with:
5054
registry: ghcr.io
5155
username: ${{ github.actor }}
5256
password: ${{ github.token }}
5357

54-
- uses: docker/build-push-action@v6
58+
- uses: docker/build-push-action@v7
5559
with:
5660
file: ./docker/Dockerfile
5761
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64

.github/workflows/test_python.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
# error: externally-managed-environment
3131
echo -e '[global]\nbreak-system-packages=true' | sudo tee /etc/pip.conf
3232
# ERROR: Cannot uninstall pip 24.0, RECORD file not found. Hint: The package was installed by debian.
33-
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq autopurge python3-pip python3-setuptools python3-wheel
33+
- run: sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq autopurge python3-pip python3-setuptools python3-wheel
3434
- run: sudo apt-get -q update
35-
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends install curl ffmpeg motion v4l-utils
35+
- run: sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq --no-install-recommends install curl ffmpeg motion v4l-utils
3636
- uses: actions/checkout@v6
3737
- uses: actions/setup-python@v6
3838
with:
@@ -42,9 +42,5 @@ jobs:
4242
- run: python3 -m build
4343
- run: python3 -m pip install .
4444
- run: mkdir --parents --verbose .mypy_cache
45-
- run: mypy --ignore-missing-imports --install-types --non-interactive --exclude build/ . || true
46-
- run: pytest --ignore=tests/test_utils/test_mjpeg.py
47-
--ignore=tests/test_utils/test_rtmp.py . || true
48-
- run: pytest --fixtures tests/test_utils/test_mjpeg.py || true
49-
- run: pytest --fixtures tests/test_utils/test_rtmp.py || true
50-
- run: pytest . || pytest --doctest-modules . || true
45+
- run: mypy --ignore-missing-imports --install-types --non-interactive --exclude build/ .
46+
- run: pytest

.github/workflows/update_locales.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ jobs:
1919
with:
2020
python-version: '3.x'
2121
check-latest: true
22+
pip-install: babel jinja2
2223

23-
- name: Install dependencies
24+
- name: Install gettext
2425
run: |
25-
python3 -m pip install --upgrade pip setuptools
26-
python3 -m pip install --upgrade babel jinja2
2726
sudo apt-get -q update
2827
sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq --no-install-recommends install gettext
2928
@@ -35,12 +34,15 @@ jobs:
3534

3635
- name: Generate backend template
3736
run: |
38-
pybabel extract --no-wrap -F l10n/babel.cfg -o motioneye/locale/motioneye.pot motioneye/
37+
pybabel extract -F l10n/babel.cfg --omit-header --no-wrap -o motioneye/locale/motioneye.pot motioneye/
3938
# Remove python-format flag, and trailing empty line to satisfy pre-commit
4039
sed -i -e '/^#, python-format$/d' -e '${/^$/d}' motioneye/locale/motioneye.pot
4140
4241
- name: Generate frontend template
43-
run: xgettext --no-wrap --from-code=UTF-8 -o motioneye/locale/motioneye.js.pot motioneye/static/js/*.js l10n/*.js
42+
run: |
43+
find -name '*.js' ! -name '*.min.js' | xgettext --from-code=UTF-8 --no-wrap -o motioneye/locale/motioneye.js.pot -
44+
# Remove header: --omit-header enforces ASCII output, despite --from-code=UTF-8, breaking most of our Esperanto source language accent characters
45+
sed -i '/^# SOME DESCRIPTIVE TITLE.$/,/^$/d' motioneye/locale/motioneye.js.pot
4446
4547
- name: Generate frontend locales
4648
run: |
@@ -63,7 +65,7 @@ jobs:
6365
- name: Commit changes
6466
run: |
6567
git add -A
66-
git diff -I '^"POT-Creation-Date: ' --exit-code HEAD && exit 0
68+
git diff --exit-code HEAD && exit 0
6769
git config user.name 'github-actions[bot]'
6870
git config user.email 'github-actions[bot]@users.noreply.github.com'
6971
git commit -m 'Update translation files'

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ repos:
2020
- id: mixed-line-ending
2121
- id: trailing-whitespace
2222
- repo: https://github.com/PyCQA/bandit
23-
rev: 1.9.2
23+
rev: 1.9.4
2424
hooks:
2525
- id: bandit
2626
args:
2727
- --skip=B104,B105,B108,B110,B301,B310,B321,B324,B402,B403,B404,B602,B603,B604,B605,B607,B701
2828
- repo: https://github.com/python/black
29-
rev: 25.12.0
29+
rev: 26.3.0
3030
hooks:
3131
- id: black
3232
args: [--skip-string-normalization]
3333
- repo: https://github.com/codespell-project/codespell
34-
rev: v2.4.1
34+
rev: v2.4.2
3535
hooks:
3636
- id: codespell
3737
# See args in setup.cfg
@@ -50,7 +50,7 @@ repos:
5050
- --show-source
5151
- --statistics
5252
- repo: https://github.com/timothycrosley/isort
53-
rev: 7.0.0
53+
rev: 8.0.1
5454
hooks:
5555
- id: isort
5656
args: ["--profile", "black", "--filter-files"]

conftest.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""Pytest configuration."""
2+
3+
import pytest
4+
5+
6+
def pytest_collection_modifyitems(config, items):
7+
"""Modify collected test items to exclude non-test functions from source files."""
8+
filtered_items = []
9+
for item in items:
10+
# Exclude functions that are imported from motioneye package
11+
# These are utility/source functions, not actual tests
12+
if hasattr(item, 'obj') and hasattr(item.obj, '__module__'):
13+
# Skip functions from motioneye.* modules (source code)
14+
# Only include actual test functions from tests/ directory
15+
if item.obj.__module__.startswith('motioneye.'):
16+
continue
17+
filtered_items.append(item)
18+
items[:] = filtered_items

motioneye/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.43.1"
1+
VERSION = "0.44.0b1"

0 commit comments

Comments
 (0)