mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Merge branch 'master' of https://github.com/iluvcapra/ptulsconv
This commit is contained in:
2
.github/workflows/python-package.yml
vendored
2
.github/workflows/python-package.yml
vendored
@@ -37,4 +37,4 @@ jobs:
|
|||||||
flake8 ptulsconv tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
flake8 ptulsconv tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
PYTHONPATH=. pytest
|
pytest
|
||||||
|
|||||||
2
.github/workflows/pythonpublish.yml
vendored
2
.github/workflows/pythonpublish.yml
vendored
@@ -2,7 +2,7 @@ name: Upload Python Package
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
0
conftest.py
Normal file
0
conftest.py
Normal file
@@ -1,6 +1,6 @@
|
|||||||
from ptulsconv.docparser.ptuls_grammar import protools_text_export_grammar
|
from ptulsconv.docparser.ptuls_grammar import protools_text_export_grammar
|
||||||
|
|
||||||
__version__ = '1.0.4'
|
__version__ = '1.0.5'
|
||||||
__author__ = 'Jamie Hardt'
|
__author__ = 'Jamie Hardt'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = "%s %s (c) 2022 %s. All rights reserved." % (__name__, __version__, __author__)
|
__copyright__ = "%s %s (c) 2022 %s. All rights reserved." % (__name__, __version__, __author__)
|
||||||
|
|||||||
@@ -1,11 +1,21 @@
|
|||||||
from fractions import Fraction
|
"""
|
||||||
import re
|
broadcast_timecode.py
|
||||||
|
|
||||||
|
Useful functions for parsing and working with timecode.
|
||||||
|
"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
import re
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
from fractions import Fraction
|
||||||
from typing import Optional, SupportsFloat
|
from typing import Optional, SupportsFloat
|
||||||
|
|
||||||
class TimecodeFormat(namedtuple("_TimecodeFormat", "frame_duration logical_fps drop_frame")):
|
|
||||||
|
|
||||||
|
class TimecodeFormat(namedtuple("_TimecodeFormat", "frame_duration logical_fps drop_frame")):
|
||||||
|
"""
|
||||||
|
A struct reperesenting a timecode datum.
|
||||||
|
"""
|
||||||
|
|
||||||
def smpte_to_seconds(self, smpte: str) -> Optional[Fraction]:
|
def smpte_to_seconds(self, smpte: str) -> Optional[Fraction]:
|
||||||
frame_count = smpte_to_frame_count(smpte, self.logical_fps, drop_frame_hint=self.drop_frame)
|
frame_count = smpte_to_frame_count(smpte, self.logical_fps, drop_frame_hint=self.drop_frame)
|
||||||
if frame_count is None:
|
if frame_count is None:
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
coverage run -m pytest . ; coverage-lcov
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user