Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5dd214f
chore(workflows): add -vvv option to a poetry install
SupremeSoviet Oct 6, 2025
3151608
chore(workflows): add poetry lock command
SupremeSoviet Oct 6, 2025
3439621
chore(workflows): remove poetry virtualenvs options inside e2e
SupremeSoviet Oct 6, 2025
677e870
feat(workflows): go back to default poetry cache directory
SupremeSoviet Oct 6, 2025
23de427
feat(workflows): change caching directory in unit tests
SupremeSoviet Oct 6, 2025
59e17b9
chore(workflows): remove comments
SupremeSoviet Oct 6, 2025
a1fae05
fix(workflows): remove -
SupremeSoviet Oct 6, 2025
ca71a83
feat(workflows): remove python 3.9 from matrix
SupremeSoviet Oct 6, 2025
1bd0293
feat(c2pie): import annotations from __future__ to support | syntax
SupremeSoviet Oct 7, 2025
138a2b7
feat(workflows): add testing with python 3.9 and python 3.14
SupremeSoviet Oct 7, 2025
e135e22
chore(workflows): try to not specify python-version inside caching step
SupremeSoviet Oct 7, 2025
057f618
fix(workflows): specify python3.14 version
SupremeSoviet Oct 7, 2025
6b1b354
feat(c2pie): add python3.9 and python3.14
SupremeSoviet Oct 7, 2025
7d63ddd
fix(workflows): change upload-arctifact action version to 5
SupremeSoviet Oct 7, 2025
85103d6
fix(workflows): change upload-arctifact action version to 4
SupremeSoviet Oct 7, 2025
fe94f81
build(poetry): make python versions range more strictly defined
lasnown Oct 8, 2025
5a84d06
feat(workflows): move to python 3.14 from python 3.14-rc.3
SupremeSoviet Oct 9, 2025
2c15661
Merge branch 'feature/extend-python-versions' of github.com:Tourmalin…
SupremeSoviet Oct 9, 2025
f859cb6
Merge pull request #22 from TourmalineCore/feature/extend-python-vers…
SupremeSoviet Oct 9, 2025
9bd03dd
fix(workflows): fix artifact uploading condition
SupremeSoviet Oct 9, 2025
61d5fd3
fix(workflows): unzip coverage artifacts
SupremeSoviet Oct 9, 2025
2099a45
fix(workflows): specify coverage report path
SupremeSoviet Oct 9, 2025
2925de7
fix(workflows): specify extension
SupremeSoviet Oct 9, 2025
5e371a7
chore(workflows): print debug info
SupremeSoviet Oct 9, 2025
3631bd8
chore(workflows): drop unit-test and e2e-test
SupremeSoviet Oct 9, 2025
75694bf
chore(workflows): return tests
SupremeSoviet Oct 9, 2025
1404ca6
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
548a9f5
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
5869651
chore(workflows): remove debug
SupremeSoviet Oct 9, 2025
56cb168
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
aa45767
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
ac16b4a
chore(workflows): remove .coverage from upload-artifact step
SupremeSoviet Oct 9, 2025
bde0ff2
chore(workflows): add .coverage inside upload-artifact step
SupremeSoviet Oct 9, 2025
a1259b6
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
7a404f1
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
8cdfed0
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
daece29
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
50f3f89
fix(workflows): fix combining
SupremeSoviet Oct 9, 2025
a8fd916
fix(workflows): fix artifact uploading
SupremeSoviet Oct 9, 2025
919a5c6
fix(workflows): fix artifact uploading
SupremeSoviet Oct 9, 2025
0e724c6
chore(workflows): add more debug
SupremeSoviet Oct 9, 2025
a21a191
fix(workflows): fix combining
SupremeSoviet Oct 9, 2025
6911007
fix(workflows): fix artifact uploading
SupremeSoviet Oct 9, 2025
9bbf58c
fix(workflows): fix combining
SupremeSoviet Oct 9, 2025
f036060
fix(workflows): fix combining
SupremeSoviet Oct 9, 2025
390082e
fix(workflows): fix combining
SupremeSoviet Oct 9, 2025
e18e42c
docs(readme): fix workflow link in ci badge
SupremeSoviet Oct 9, 2025
a6de235
docs(readme): fix repository name
SupremeSoviet Oct 9, 2025
b2c8eee
fix(workflows): fix matrix
SupremeSoviet Oct 9, 2025
e439646
feat(workflows): upload combined coverage report
SupremeSoviet Oct 9, 2025
d938b6a
feat(workflows): upload combined coverage report in html
SupremeSoviet Oct 9, 2025
a423783
feat(workflows): fix combined html report
SupremeSoviet Oct 9, 2025
1edc93e
feat(workflows): move from html to json report
SupremeSoviet Oct 9, 2025
cf08f54
feat(workflows): move from poetry publish to pypi oidc
SupremeSoviet Oct 9, 2025
fc5ea36
feat(workflows): return matrix
SupremeSoviet Oct 9, 2025
d11cbda
build(poetry): update python versions
SupremeSoviet Oct 9, 2025
579e607
Merge branch 'master' into feature/refining-workflows
SupremeSoviet Oct 9, 2025
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
97 changes: 47 additions & 50 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Configure Poetry cache
run: poetry config cache-dir ./.cache/pypoetry

- name: Load cached poetry dependencies
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: ./.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
path: .venv
key: venv-ruff-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --only dev

- name: Ruff version
Expand All @@ -60,18 +58,18 @@ jobs:
run-unit-tests:
name: Run unit tests using matrix
needs: ruff
strategy:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

runs-on: [self-hosted, Linux, X64]
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -84,15 +82,12 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Configure Poetry cache
run: poetry config cache-dir ./.cache/pypoetry

- name: Load cached poetry dependencies
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: ./.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
path: .venv
key: venv-tests-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: poetry install --no-interaction
Expand All @@ -101,36 +96,36 @@ jobs:
run: |
poetry run pytest \
--cov=c2pie \
--cov-report=xml:coverage-unit.xml \
-m "not e2e" \
--maxfail=1 \
-v

- name: Upload coverage artifact
if: (matrix.os == 'ubuntu-latest' || runner.os == 'Linux') && matrix.python-version == '3.12'
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: coverage-unit
path: |
coverage-unit.xml
.coverage
path: .coverage

run-e2e-tests:
name: Run e2e tests
needs: ruff
strategy:

strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

runs-on: [self-hosted, Linux, X64]
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@v5

- uses: actions/setup-python@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -141,15 +136,12 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

# - name: Configure Poetry cache
# run: poetry config cache-dir ./.cache/pypoetry

# - name: Load cached poetry dependencies
# id: cached-poetry-dependencies
# uses: actions/cache@v4
# with:
# path: ./.cache/pypoetry
# key: poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-tests-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: poetry install --no-interaction
Expand All @@ -175,38 +167,36 @@ jobs:
- name: Add cargo to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Verify if c2patool is installed
- name: Verify if c2patool is installed
run: |
c2patool -V

- name: Run e2e tests with coverage
run: |
poetry run pytest tests/c2pa/e2e_test.py \
--cov=c2pie \
--cov-report=xml:coverage-e2e.xml \
-v
env:
C2PIE_KEY_FILEPATH: ${{ vars.C2PIE_KEY_FILEPATH }}
C2PIE_CERT_FILEPATH: ${{ vars.C2PIE_CERT_FILEPATH }}

- name: Upload coverage artifact
if: (matrix.os == 'ubuntu-latest' || runner.os == 'Linux') && matrix.python-version == '3.12'
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: coverage-e2e
path: |
coverage-e2e.xml
.coverage

path: .coverage

combine-coverage:
name: Combine coverage and upload to Codecov
needs: [run-unit-tests, run-e2e-tests]
runs-on: [self-hosted, Linux, X64]

runs-on: [self-hosted, Linux, X64]
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -216,28 +206,35 @@ jobs:
run: python -m pip install coverage[toml]

- name: Download unit coverage
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: coverage-unit
path: ./coverage-unit
path: coverage-unit

- name: Download e2e coverage
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: coverage-e2e
path: ./coverage-e2e
path: coverage-e2e

- name: Combine coverage reports
run: |
coverage combine ./coverage-unit/.coverage ./coverage-e2e/.coverage
coverage combine ./coverage-e2e/.coverage ./coverage-unit/.coverage
coverage xml -o coverage-combined.xml
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
coverage report
coverage json -o coverage-combined.json

- name: Upload combined coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-combined
path: coverage-combined.json

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage-combined.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

# ![Coverage](https://codecov.io/gh/TourmalineCore/c2pie/branch/master/graph/badge.svg)
35 changes: 25 additions & 10 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
linting-and-testing:
name: Linting and Testing
uses: ./.github/workflows/lint-and-test.yml
package-publishing:
release-build:
name: Build and Publish Package
if: startsWith(github.event.ref, 'refs/tags/v')
needs: linting-and-testing
Expand All @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

runs-on: ${{ matrix.os }}
timeout-minutes: 30
Expand All @@ -45,14 +45,29 @@ jobs:
with:
version: 'latest'

- name: Run Poetry install
- name: Build and Publish the Package
run: |
poetry lock && poetry install --no-interaction --no-ansi
poetry build

- name: Configure Repository Credentials
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Upload dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

- name: Build and Publish the Package
run: |
poetry publish --build
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v5
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

-------

[![Unit Tests](https://github.com/TourmalineCore/tc-c2pa-py/actions/workflows/run_unit_tests.yml/badge.svg)](https://github.com/TourmalineCore/tc-c2pa-py/actions/workflows/run_unit_tests.yml)
[![Lint](https://github.com/TourmalineCore/tc-c2pa-py/actions/workflows/lint.yml/badge.svg)](https://github.com/TourmalineCore/tc-c2pa-py/actions/workflows/lint.yml)
[![CI](https://github.com/TourmalineCore/c2pie/actions/workflows/lint-and-test.yml/badge.svg)](https://github.com/TourmalineCore/c2pie/actions/workflows/lint-and-test.yml)

<br>

Expand Down
1 change: 1 addition & 0 deletions c2pie/jumbf_boxes/super_box.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Jumbf super box class
from __future__ import annotations

from c2pie.jumbf_boxes.box import Box
from c2pie.jumbf_boxes.content_box import ContentBox
Expand Down
2 changes: 2 additions & 0 deletions c2pie/signing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import hashlib
import os
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Issues = "https://github.com/TourmalineCore/c2pie/issues"
c2pie = 'c2pie.main:main'

[tool.poetry.dependencies]
python = ">=3.9.2,<3.14"
python = ">=3.9.2,<3.15"
cbor2 = "^5.6.3"
cryptography = ">=44.0.1"
pytz = "^2024.1"
Expand Down
Loading