8000 Update dependencies version by remia · Pull Request #246 · Ymagis/ClairMeta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update dependencies version #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/linux/apt/install_test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORK_DIR=`mktemp -d`
cd "$WORK_DIR"

git clone https://github.com/cinecert/asdcplib.git && cd asdcplib
git checkout rel_2_10_35
git checkout rel_2_13_0
mkdir build && cd build

cmake ..
Expand Down
8 changes: 2 additions & 6 deletions .github/scripts/macos/install_test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@ WORK_DIR=`mktemp -d`
cd "$WORK_DIR"

git clone https://github.com/cinecert/asdcplib.git && cd asdcplib
git checkout rel_2_10_35
git checkout rel_2_13_0
mkdir build && cd build

# Hombrew OpenSSL is keg-only, need to help asdcplib's find_library
cmake \
-DOpenSSLLib_PATH=/usr/local/opt/openssl/lib/libcrypto.dylib \
-DOpenSSLLib_include_DIR=/usr/local/opt/openssl/include \
..
cmake -DCMAKE_MACOSX_RPATH=ON ..
sudo cmake --build . --target install --config Release -- -j$(sysctl -n hw.ncpu)

cd "$BASE_DIR"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/windows/install_test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORK_DIR=`mktemp -d`
cd "$WORK_DIR"

git clone https://github.com/cinecert/asdcplib.git && cd asdcplib
git checkout rel_2_10_35
git checkout rel_2_13_0
mkdir build && cd build

cmake \
Expand Down
54 changes: 30 additions & 24 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on: [push, pull_request]

jobs:
test-linux:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand All @@ -16,6 +16,10 @@ jobs:
with:
repository: Ymagis/ClairMeta_Data
path: tests/resources
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -24,20 +28,18 @@ jobs:
run: .github/scripts/linux/apt/install_test_env.sh
- name: Install python dependencies
run: |
pip install poetry codecov
poetry install
poetry env info
poetry show --tree
uv sync --all-extras --dev
uv tree
- name: Test
run: |
poetry run python -m compileall clairmeta
poetry run pytest --doctest-modules
uv run python -m compileall clairmeta
uv run pytest --doctest-modules

test-macos:
runs-on: macos-12
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.8", "3.12"]
python-version: ["3.8", "3.13"]
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand All @@ -46,6 +48,10 @@ jobs:
with:
repository: Ymagis/ClairMeta_Data
path: tests/resources
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -54,20 +60,18 @@ jobs:
run: .github/scripts/macos/install_test_env.sh
- name: Install python dependencies
run: |
pip install poetry codecov
poetry install
poetry env info
poetry show --tree
uv sync --all-extras --dev
uv tree
- name: Test
run: |
poetry run python -m compileall clairmeta
poetry run pytest --doctest-modules
uv run python -m compileall clairmeta
uv run pytest --doctest-modules

test-windows:
runs-on: windows-2022
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8", "3.12"]
python-version: ["3.8", "3.13"]
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand All @@ -76,6 +80,10 @@ jobs:
with:
repository: Ymagis/ClairMeta_Data
path: tests/resources
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -85,14 +93,12 @@ jobs:
shell: bash
- name: Install python dependencies
run: |
pip install poetry codecov
poetry install
poetry env info
poetry show --tree
uv sync --all-extras --dev
uv tree
shell: bash
- name: Test
run: |
export PATH="/c/vcpkg/installed/x64-windows/bin:$PATH"
poetry run python -m compileall clairmeta
poetry run pytest --doctest-modules
uv run python -m compileall clairmeta
uv run pytest --doctest-modules
shell: bash
8 changes: 6 additions & 2 deletions MANIFEST.IN
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
include LICENSE CONTRIBUTORS MANIFEST.in *.rst
recursive-include tests *
include LICENSE CONTRIBUTORS MANIFEST.in *.rst
graft clairmeta/xsd
graft tests
prune tests/resources
global-exclude *.py[cod]
global-exclude .DS_Store
11 changes: 6 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,13 @@ Contributing
cd clairmeta
git clone https://github.com/Ymagis/ClairMeta_Data tests/resources

pip3 install poetry
poetry install
poetry shell
uv sync --all-extras --dev

# Code... and tests
pytest --doctest-modules
# Code...

uv run ruff check
uv run black .
uv run pytest --doctest-modules

- Open a Pull Request
- Open an Issue
Expand Down
9 changes: 5 additions & 4 deletions clairmeta/dcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# See LICENSE for more information

import os
import six
import time

from clairmeta.logger import get_log
Expand Down Expand Up @@ -108,9 +107,7 @@ def init_assetmap(self):
{uuid: path for a in self._list_am for uuid, path, _ in list_am_assets(a)}
]
self._list_asset = {
k: v
for _list_asset in self._list_asset
for k, v in six.iteritems(_list_asset)
k: v for _list_asset in self._list_asset for k, v in _list_asset.items()
}

# Schema (IOP or SMPTE) is assumed to be the one found for the Assetmap
Expand Down Expand Up @@ -183,6 +180,7 @@ def cpl_link_assets(self):
self.package_type = "OV"

for cpl in self._list_cpl:
cpl_type = "OV"
for asset_type, asset in list_cpl_assets(cpl):
asset_id = asset["Id"]
asset["EssenceType"] = asset_type
Expand All @@ -195,8 +193,11 @@ def cpl_link_assets(self):
self.path, self._list_asset[asset_id]
)
else:
cpl_type = "VF"
self.package_type = "VF"

cpl["CPLType"] = cpl_type

def cpl_probe_assets(self):
"""Probe mxf assets for each reel."""
for cpl in self._list_cpl:
Expand Down
5 changes: 2 additions & 3 deletions clairmeta/dcp_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# See LICENSE for more information

import re
import six
import time
import importlib
import inspect
Expand Down Expand Up @@ -69,7 +68,7 @@ def __init__(

def load_modules(self):
prefix = DCP_CHECK_SETTINGS["module_prefix"]
for k, v in six.iteritems(DCP_CHECK_SETTINGS["modules"]):
for k, v in DCP_CHECK_SETTINGS["modules"].items():
try:
module_path = "clairmeta." + prefix + k
module = importlib.import_module(module_path)
Expand Down Expand Up @@ -123,7 +122,7 @@ def run_checks(self):
"""Execute all checks."""
self.log.info("Checking DCP : {}".format(self.dcp.path))

for _, checker in six.iteritems(self.check_modules):
for _, checker in self.check_modules.items():
self.checks += checker.run_checks()
return self.checks

Expand Down
7 changes: 3 additions & 4 deletions clairmeta/dcp_check_cpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import unicode_literals

import six
import operator
from clairmeta.utils.sys import all_keys_in_dict
from clairmeta.utils.uuid import check_uuid, extract_uuid, RFC4122_RE
Expand Down Expand Up @@ -49,7 +48,7 @@ def metadata_cmp_pair(
for reel in playlist["Info"]["CompositionPlaylist"]["ReelList"]:
metadatas = {
k: v[metadata]
for k, v in six.iteritems(reel["Assets"])
for k, v in reel["Assets"].items()
if v.get(metadata) and k in [type_a, type_b]
}

Expand Down Expand Up @@ -282,7 +281,7 @@ def check_cpl_reels_cut(self, playlist):
for reel in playlist["Info"]["CompositionPlaylist"]["ReelList"]:
assets = [
v
for k, v in six.iteritems(reel["Assets"])
for k, v in reel["Assets"].items()
for key in cut_keys
if key in v.keys()
]
Expand Down Expand Up @@ -462,7 +461,7 @@ def check_assets_cpl_metadata(self, playlist, asset):
if "Probe" not in asset:
return

for k, v in six.iteritems(metadata_map):
for k, v in metadata_map.items():
if k in asset and v in asset["Probe"]:
cpl_val = asset[k]
mxf_val = asset["Probe"][v]
Expand Down
5 changes: 1 addition & 4 deletions clairmeta/dcp_check_execution.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Clairmeta - (C) YMAGIS S.A.
# See LICENSE for more information

import six


ERROR_SILENT = 0
ERROR_INFO = 1
ERROR_WARNING = 2
Expand All @@ -16,7 +13,7 @@
"ERROR": ERROR_ERROR,
}

STR_FROM_ERROR = {v: k for k, v in six.iteritems(ERROR_FROM_STR)}
STR_FROM_ERROR = {v: k for k, v in ERROR_FROM_STR.items()}


def ErrorLevelFromString(error_str):
Expand Down
3 changes: 1 addition & 2 deletions clairmeta/dcp_check_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# See LICENSE for more information

import os
import six
import re

from clairmeta.dcp_utils import list_cpl_assets, cpl_probe_asset
Expand Down Expand Up @@ -79,7 +78,7 @@ def check_dcp_multiple_am_or_vol(self):
"Assetmap": self.dcp._list_am,
}

for k, v in six.iteritems(restricted_lists):
for k, v in restricted_lists.items():
if len(v) == 0:
self.error("Missing {} file".format(k))
if len(v) > 1:
Expand Down
4 changes: 1 addition & 3 deletions clairmeta/dcp_check_picture.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Clairmeta - (C) YMAGIS S.A.
# See LICENSE for more information

import six

from clairmeta.utils.time import compare_ratio
from clairmeta.dcp_check import CheckerBase
from clairmeta.dcp_utils import list_cpl_assets
Expand Down Expand Up @@ -126,7 +124,7 @@ def check_picture_cpl_encoding(self, playlist, asset):
if levels == 0:
return

for k, v in six.iteritems(resolutions):
for k, v in resolutions.items():
if resolution in v:
resolution_name = k
break
Expand Down
Loading
Loading
0