sprocket-systems.coda.sdk 2.0.7__py3-none-any.whl → 2.0.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
coda/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # The versions below will be replaced automatically in CI.
2
2
  # You do not need to modify any of the versions below.
3
- __version__ = "2.0.7"
4
- CODA_APP_SUITE_VERSION = "+coda-2.0.12"
3
+ __version__ = "2.0.10"
4
+ CODA_APP_SUITE_VERSION = "+coda-2.0.14"
5
5
  FINAL_VERSION = __version__ + CODA_APP_SUITE_VERSION
coda/sdk/essence.py CHANGED
@@ -6,7 +6,7 @@ import subprocess
6
6
 
7
7
  from pathlib import Path
8
8
  from typing import List, Dict
9
- from .enums import Format, SourceType, InputStemType
9
+ from .enums import Format, SourceType, InputStemType, FrameRate, Language
10
10
  from .constants import (
11
11
  ENV_CODA_CLI_EXE,
12
12
  ENV_NO_CODA_EXE,
@@ -65,10 +65,17 @@ class Essence:
65
65
  "program": program,
66
66
  "description": description,
67
67
  "type": stem_type,
68
- },
69
- "timing_info": timing_info
68
+ }
70
69
  }
71
70
 
71
+ if timing_info is not None:
72
+ if timing_info.get("frame_rate"):
73
+ self.payload["definition"]["frame_rate"] = timing_info.get("frame_rate")
74
+ if timing_info.get("ffoa_timecode"):
75
+ self.payload["definition"]["ffoa_timecode"] = timing_info.get("ffoa_timecode")
76
+ if timing_info.get("lfoa_timecode"):
77
+ self.payload["definition"]["lfoa_timecode"] = timing_info.get("lfoa_timecode")
78
+
72
79
  def add_interleaved_resource(
73
80
  self,
74
81
  file: str | dict,
@@ -249,7 +256,7 @@ class Essence:
249
256
  """
250
257
  self.payload["definition"]["format"] = format
251
258
 
252
- def override_language(self, language) -> None:
259
+ def override_language(self, language: Language) -> None:
253
260
  """Override the language of the essence.
254
261
 
255
262
  Args:
@@ -261,7 +268,7 @@ class Essence:
261
268
 
262
269
  def override_timing_info(
263
270
  self,
264
- source_frame_rate=None,
271
+ frame_rate: FrameRate | None = None,
265
272
  ffoa_timecode: str | None = None,
266
273
  lfoa_timecode: str | None = None
267
274
  ) -> None:
@@ -270,22 +277,18 @@ class Essence:
270
277
  All parameters are optional. Only provided values will be set.
271
278
 
272
279
  Args:
273
- source_frame_rate: The source frame rate (e.g., FrameRate.TWENTY_FOUR).
280
+ frame_rate: The source frame rate (e.g., FrameRate.TWENTY_FOUR).
274
281
  ffoa_timecode (str, optional): First frame of action timecode.
275
282
  lfoa_timecode (str, optional): Last frame of action timecode.
276
283
 
277
284
  """
278
- # Initialize timing_info if it's None
279
- if self.payload["timing_info"] is None:
280
- self.payload["timing_info"] = {}
281
-
282
- if source_frame_rate is not None:
283
- fr_value = source_frame_rate.value if hasattr(source_frame_rate, 'value') else source_frame_rate
284
- self.payload["timing_info"]["source_frame_rate"] = fr_value
285
+ if frame_rate is not None:
286
+ fr_value = frame_rate.value if hasattr(frame_rate, 'value') else frame_rate
287
+ self.payload["definition"]["frame_rate"] = fr_value
285
288
  if ffoa_timecode is not None:
286
- self.payload["timing_info"]["ffoa_timecode"] = ffoa_timecode
289
+ self.payload["definition"]["ffoa_timecode"] = ffoa_timecode
287
290
  if lfoa_timecode is not None:
288
- self.payload["timing_info"]["lfoa_timecode"] = lfoa_timecode
291
+ self.payload["definition"]["lfoa_timecode"] = lfoa_timecode
289
292
 
290
293
  def override_bext_time_reference(self, bext_time_reference: int) -> None:
291
294
  """Set BEXT time reference on all resources.
@@ -406,7 +409,7 @@ class Essence:
406
409
  raise ValueError("`coda inspect` was unable to retrieve the sources information.")
407
410
 
408
411
  timing_info = {
409
- "source_frame_rate": j.get("source_frame_rate"),
412
+ "frame_rate": j.get("source_frame_rate"),
410
413
  "ffoa_timecode": j.get("ffoa_timecode"),
411
414
  "lfoa_timecode": j.get("lfoa_timecode")
412
415
  }
coda/sdk/job.py CHANGED
@@ -368,17 +368,6 @@ class JobPayloadBuilder:
368
368
  if self._time_options.get("lfoa"):
369
369
  lfoa = self._time_options.get("lfoa")
370
370
 
371
- for e in self._essences:
372
- current_timing = e.payload.get("timing_info") or {}
373
- new_timing = dict(current_timing)
374
- if not new_timing.get("ffoa_timecode"):
375
- new_timing["ffoa_timecode"] = ffoa
376
- if not new_timing.get("lfoa_timecode"):
377
- new_timing["lfoa_timecode"] = lfoa
378
- if not new_timing.get("source_frame_rate"):
379
- new_timing["source_frame_rate"] = fr
380
- e.payload["timing_info"] = new_timing
381
-
382
371
  sources = [e.dict() for e in self._essences]
383
372
 
384
373
  start_time = self._time_options.get("start_time")
@@ -397,11 +386,15 @@ class JobPayloadBuilder:
397
386
  },
398
387
  "venue": self._venue,
399
388
  "sources": sources,
400
- "source_frame_rate": fr,
401
- "ffoa_timecode": ffoa,
402
- "lfoa_timecode": lfoa,
403
389
  }
404
390
 
391
+ if fr is not None:
392
+ wf_in["source_frame_rate"] = fr
393
+ if ffoa is not None:
394
+ wf_in["ffoa_timecode"] = ffoa
395
+ if lfoa is not None:
396
+ wf_in["lfoa_timecode"] = lfoa
397
+
405
398
  if self._edits:
406
399
  wf_in["edits"] = self._edits
407
400
 
coda/sdk/workflow.py CHANGED
@@ -1151,7 +1151,7 @@ class WorkflowDefinitionBuilder:
1151
1151
  if s3_auth:
1152
1152
  dest_def["auth"] = s3_auth
1153
1153
  if options:
1154
- dest_def["url_options"] = options
1154
+ dest_def["opts"] = options
1155
1155
 
1156
1156
  if io_location_id is not None and s3_url is None:
1157
1157
  dest_type = "io_location"
coda/sdk.py ADDED
@@ -0,0 +1 @@
1
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sprocket-systems.coda.sdk
3
- Version: 2.0.7
3
+ Version: 2.0.10
4
4
  Summary: The Coda SDK provides a Python interface to define Coda workflows, create jobs and run them.
5
5
  Keywords: python,coda,sdk
6
6
  Author-Email: Sprocket Systems <support@sprocket.systems>
@@ -0,0 +1,16 @@
1
+ coda/__init__.py,sha256=SeWiNY4akuDgclSMoXe0ldFAys-Rvy1snQWmaYgG8hE,230
2
+ coda/sdk.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ coda/sdk/__init__.py,sha256=wOCrh1piLbgLVOMhKuLFYA62n60IN89eXGHpFKwFAE4,691
4
+ coda/sdk/constants.py,sha256=DW-goGI4vTlt8KeR4z0sf89Duov4TgZdsjv1VJDuAQI,596
5
+ coda/sdk/enums.py,sha256=1l4pK8pNofV56WVAiQXitlY6m9iTfEv9I159GWkTZKE,6582
6
+ coda/sdk/essence.py,sha256=6BscH02GFFhiPoOzO-GJa2uzZhqcJ9q-dmbD1lVRy6k,21036
7
+ coda/sdk/job.py,sha256=oCGaAgpUJNkd27un6RhqoN4AEafhABzw3RsiVCZbnd4,21136
8
+ coda/sdk/preset.py,sha256=OtaRVJU6luBBD_6Ehd8ZkcjXL_YVoXfziI14E-GS4Xw,8934
9
+ coda/sdk/utils.py,sha256=uC9hHJtMkGu3pLvJOwq9kIdf6r7KxMRAbzaRyf95EdQ,10565
10
+ coda/sdk/workflow.py,sha256=T5red6BB8CVEgPTRSiRh9h47i9_FjLg2r5woO2j8vvA,63164
11
+ coda/tc_tools.py,sha256=hEtVE6xtPqg93WfJ-lQdRQroPdQTkH5HkMLWCIkwIlo,22010
12
+ sprocket_systems_coda_sdk-2.0.10.dist-info/METADATA,sha256=6QzVpksqH8swXyEWqzw_ZGwrQLQENhG9tuwUaLpTQiQ,1107
13
+ sprocket_systems_coda_sdk-2.0.10.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
14
+ sprocket_systems_coda_sdk-2.0.10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
15
+ sprocket_systems_coda_sdk-2.0.10.dist-info/licenses/LICENSE,sha256=wrFjizFlraIAPW8JIteGftNH2laAZBBRhdEnPVUsKTM,10198
16
+ sprocket_systems_coda_sdk-2.0.10.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- coda/__init__.py,sha256=Yh8vyckIapgq2CptJp72Gm6OgtnxtzocwjzOIrof1X8,229
2
- coda/sdk/__init__.py,sha256=wOCrh1piLbgLVOMhKuLFYA62n60IN89eXGHpFKwFAE4,691
3
- coda/sdk/constants.py,sha256=DW-goGI4vTlt8KeR4z0sf89Duov4TgZdsjv1VJDuAQI,596
4
- coda/sdk/enums.py,sha256=1l4pK8pNofV56WVAiQXitlY6m9iTfEv9I159GWkTZKE,6582
5
- coda/sdk/essence.py,sha256=vSx2lp1I0yJvFNMcAWqF-I3BV9q_bRnZbtSEf_QArHg,20764
6
- coda/sdk/job.py,sha256=WArS06ufJUZLDdx6wJHgwk2olYjtX3w_sJqPF_XEu6A,21538
7
- coda/sdk/preset.py,sha256=OtaRVJU6luBBD_6Ehd8ZkcjXL_YVoXfziI14E-GS4Xw,8934
8
- coda/sdk/utils.py,sha256=uC9hHJtMkGu3pLvJOwq9kIdf6r7KxMRAbzaRyf95EdQ,10565
9
- coda/sdk/workflow.py,sha256=QpGvjkNuFKh5XyawC7HXyx-nmC4EKbdRc-6eIjaQ79Q,63171
10
- coda/tc_tools.py,sha256=hEtVE6xtPqg93WfJ-lQdRQroPdQTkH5HkMLWCIkwIlo,22010
11
- sprocket_systems_coda_sdk-2.0.7.dist-info/METADATA,sha256=DJRra7QdThUQVFDJZiQxWmy4X11iq6gu_SZNlrVPcaw,1106
12
- sprocket_systems_coda_sdk-2.0.7.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
13
- sprocket_systems_coda_sdk-2.0.7.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
14
- sprocket_systems_coda_sdk-2.0.7.dist-info/licenses/LICENSE,sha256=wrFjizFlraIAPW8JIteGftNH2laAZBBRhdEnPVUsKTM,10198
15
- sprocket_systems_coda_sdk-2.0.7.dist-info/RECORD,,