Skip to content

Commit 4b02a66

Browse files
authored
Fixes Issue 13 and updates CI workflow (#15)
Fixed typo in variable used to produce error message Added unittest to confirm the fixed behavior Updated OS list and python versions in CI workflow Updated github action versions in workflows Signed-off-by: apetrynet <flehnerheener@gmail.com> Co-authored-by: cgarjun <5227583+cgarjun@users.noreply.github.com> --------- Signed-off-by: apetrynet <flehnerheener@gmail.com>
1 parent ea60818 commit 4b02a66

5 files changed

Lines changed: 28 additions & 11 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ jobs:
1919
test-plugin:
2020
strategy:
2121
matrix:
22-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
23-
# Use macos-13 so we'll be on intel hardware and can pull a pre-built wheel
24-
# When OTIO has an Apple Silicon build we can switch back to macos-latest for that version
25-
os: [ubuntu-latest, macos-13, windows-latest]
26-
otio-version: ["0.17.0", "main"]
22+
python-version: ["3.9", "3.10", "3.11", "3.12"]
23+
os: [ubuntu-latest, macos-14, windows-latest, macos-latest]
24+
otio-version: ["0.18.1", "main"]
2725

2826
runs-on: ${{ matrix.os }}
2927

3028
steps:
31-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3230

3331
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
3533
with:
3634
python-version: ${{ matrix.python-version }}
3735

.github/workflows/deploy_package.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
permissions:
1212
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.x'
1919
- name: Install dependencies
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
python -m build
2525
- name: Upload Built Artifacts
26-
uses: actions/upload-artifact@v3
26+
uses: actions/upload-artifact@v4
2727
with:
2828
name: dist
2929
path: |

src/otio_cmx3600_adapter/cmx_3600.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def make_transition(self, comment_data):
645645
if self.transition_id != self.clip_num:
646646
raise EDLParseError(
647647
'transition and event id mismatch: {} vs {}'.format(
648-
self.transaction_id, self.clip_num,
648+
self.transition_id, self.clip_num,
649649
)
650650
)
651651
if re.match(r'W(\d{3})', self.transition_type):
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
TITLE: dissolve test
2+
FCM: NON-DROP FRAME
3+
001 TST V C 01:00:04:05 01:00:04:14 01:00:00:00 01:00:00:09
4+
* FROM CLIP NAME: clip_A
5+
001 TST V C 01:00:04:14 01:00:04:14 01:00:00:09 01:00:00:09
6+
002 TST V D 010 01:00:08:08 01:00:08:18 01:00:00:09 01:00:00:19
7+
* BLEND, DISSOLVE
8+
* FROM CLIP NAME: clip_A
9+
* TO CLIP NAME: clip_B
10+
003 TST V C 01:00:08:18 01:00:08:19 01:00:00:19 01:00:00:20
11+
* FROM CLIP NAME: clip_B

tests/test_cmx_3600_adapter.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
DISSOLVE_TEST_2 = os.path.join(SAMPLE_DATA_DIR, "dissolve_test_2.edl")
2525
DISSOLVE_TEST_3 = os.path.join(SAMPLE_DATA_DIR, "dissolve_test_3.edl")
2626
DISSOLVE_TEST_4 = os.path.join(SAMPLE_DATA_DIR, "dissolve_test_4.edl")
27+
DISSOLVE_TEST_FAIL = os.path.join(SAMPLE_DATA_DIR, "dissolve_test_fail.edl")
2728
GAP_TEST = os.path.join(SAMPLE_DATA_DIR, "gap_test.edl")
2829
WIPE_TEST = os.path.join(SAMPLE_DATA_DIR, "wipe_test.edl")
2930
TIMECODE_MISMATCH_TEST = os.path.join(SAMPLE_DATA_DIR, "timecode_mismatch.edl")
@@ -1108,6 +1109,13 @@ def test_three_part_transition(cmx_adapter):
11081109
assert tl.tracks[0][7].duration().value == 135.0
11091110

11101111

1112+
def test_transition_id_mismatch(cmx_adapter):
1113+
with pytest.raises(cmx_adapter.module().EDLParseError) as err:
1114+
cmx_adapter.read_from_file(DISSOLVE_TEST_FAIL)
1115+
1116+
assert 'transition and event id mismatch: ' in str(err)
1117+
1118+
11111119
def test_enabled(cmx_adapter):
11121120
tl = otio.adapters.read_from_file(ENABLED_TEST)
11131121
# Exception is raised because the OTIO file has two tracks and cmx_3600 only

0 commit comments

Comments
 (0)