11 Commits

Author SHA1 Message Date
Jamie Hardt
7fa22d4b85 Update setup.py
Version 1.1.2
2022-11-13 17:50:26 -08:00
Jamie Hardt
42f2de54b5 Update README.md
Removed "Platform Lifecycle" section, this work is done
2022-11-13 17:42:46 -08:00
Jamie Hardt
f7d1432014 Update pythonpublish.yml 2022-11-13 17:41:55 -08:00
Jamie Hardt
db4eadb73e Update python-package.yml
Updated actions/setup-python version pin
2022-11-13 17:37:50 -08:00
Jamie Hardt
3305bc7920 Removing Python 3.5 from support 2022-11-13 17:33:57 -08:00
Jamie Hardt
6ba77b3568 Adding newer python versions
to setup.rb and test grid
2022-11-13 17:32:30 -08:00
Jamie Hardt
c68f8bca80 Fixed spelling of an re 2022-11-13 17:29:10 -08:00
Jamie Hardt
284267c9c0 Fixed some bugs picked up in flake8 2022-11-13 17:25:56 -08:00
Jamie Hardt
bd196f2dbf Create python-package.yml 2022-11-13 17:21:54 -08:00
Jamie Hardt
b14a9a6319 Update .gitignore 2022-01-16 17:16:14 -08:00
Jamie Hardt
0cbd01f418 Update README.md 2020-01-05 14:55:43 -08:00
7 changed files with 55 additions and 12 deletions

40
.github/workflows/python-package.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest

View File

@@ -19,8 +19,8 @@ jobs:
pip install setuptools wheel twine pip install setuptools wheel twine
- name: Build and publish - name: Build and publish
env: env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: | run: |
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel
twine upload dist/* twine upload dist/*

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@
# Vim Swapfiles # Vim Swapfiles
*.swp *.swp
.DS_Store

View File

@@ -83,3 +83,5 @@ Audio channel 7 is present
>>> events[2].edits[0].channels.video >>> events[2].edits[0].channels.video
False False
``` ```

View File

@@ -86,7 +86,7 @@ class ChannelMap:
self._audio_channel_set.remove(chan_num) self._audio_channel_set.remove(chan_num)
def _append_event(self, event_str): def _append_event(self, event_str):
alt_channel_re = compile('^A(\d+)') alt_channel_re = compile(r'^A(\d+)')
if event_str in self._chan_map: if event_str in self._chan_map:
channels = self._chan_map[event_str] channels = self._chan_map[event_str]
self.v = channels[0] self.v = channels[0]
@@ -98,8 +98,8 @@ class ChannelMap:
self.set_audio_channel(int( matchresult.group(1)), True ) self.set_audio_channel(int( matchresult.group(1)), True )
def _append_ext(self, audio_ext): def _append_ext(self, audio_ext):
self.a3 = ext.audio3 self.a3 = audio_ext.audio3
self.a4 = ext.audio4 self.a4 = audio_ext.audio4
def __or__(self, other): def __or__(self, other):
""" """

View File

@@ -70,12 +70,12 @@ class Transition:
@property @property
def key_background(self): def key_background(self):
"`True` if this edit is a key background." "`True` if this edit is a key background."
return self.transition == KeyBackground return self.transition == Transition.KeyBackground
@property @property
def key_foreground(self): def key_foreground(self):
"`True` if this edit is a key foreground." "`True` if this edit is a key foreground."
return self.transition == Key return self.transition == Transition.Key
@property @property
def key_out(self): def key_out(self):
@@ -83,4 +83,4 @@ class Transition:
`True` if this edit is a key out. This material will removed from `True` if this edit is a key out. This material will removed from
the key foreground and replaced with the key background. the key foreground and replaced with the key background.
""" """
return self.transition == KeyOut return self.transition == Transition.KeyOut

View File

@@ -4,7 +4,7 @@ with open("README.md", "r") as fh:
long_description = fh.read() long_description = fh.read()
setup(name='pycmx', setup(name='pycmx',
version='1.1.1', version='1.1.3',
author='Jamie Hardt', author='Jamie Hardt',
author_email='jamiehardt@me.com', author_email='jamiehardt@me.com',
description='CMX 3600 Edit Decision List Parser', description='CMX 3600 Edit Decision List Parser',
@@ -16,10 +16,10 @@ setup(name='pycmx',
'Topic :: Multimedia', 'Topic :: Multimedia',
'Topic :: Multimedia :: Video', 'Topic :: Multimedia :: Video',
'Topic :: Text Processing', 'Topic :: Text Processing',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8' 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'
], ],
packages=['pycmx']) packages=['pycmx'])