diff --git a/.github/workflows/create_draft_release.yaml b/.github/workflows/create_draft_release.yaml deleted file mode 100644 index 1db0000..0000000 --- a/.github/workflows/create_draft_release.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Create draft release - -on: - push: - tags: - - '*' - -jobs: - build: - env: - plugin_name: "otio_template_plugin" - - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: otio-template-plugin{{ github.ref }} - body: | - Changes in this release - * something - * something - - Please upgrade your adapter with `pip install --upgrade ${{ env.plugin_name }}` - draft: true - prerelease: false diff --git a/.github/workflows/deploy_package.yaml b/.github/workflows/deploy_package.yaml index abca17f..fe4a58a 100644 --- a/.github/workflows/deploy_package.yaml +++ b/.github/workflows/deploy_package.yaml @@ -8,24 +8,26 @@ on: jobs: deploy: runs-on: ubuntu-latest + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - # You need to add a token to your repo's secrets - # Make sure you match the name of your secret to the token name below. - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + python -m pip install build + - name: Build dist package run: | - python setup.py sdist bdist_wheel --universal - - # Make sure everything works on testpypi before releasing on pypi - twine upload --repository pypi dist/* + python -m build + - name: Upload Built Artifacts + uses: actions/upload-artifact@v3 + with: + name: dist + path: | + ./dist/*.whl + ./dist/*.gz + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/setup.py b/setup.py index 89c917e..5827594 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ name="otio-aaf-adapter", author="Contributors to the OpenTimelineIO project", author_email="otio-discussion@lists.aswf.io", - version="0.15.0.dev1", + version="1.0.0", description="OpenTimelineIO Advanced Authoring Format (AAF) Adapter", long_description=long_description, long_description_content_type="text/markdown", diff --git a/src/otio_aaf_adapter/adapters/advanced_authoring_format.py b/src/otio_aaf_adapter/adapters/advanced_authoring_format.py index 9d4ddc2..0175a3d 100644 --- a/src/otio_aaf_adapter/adapters/advanced_authoring_format.py +++ b/src/otio_aaf_adapter/adapters/advanced_authoring_format.py @@ -870,8 +870,8 @@ def _transcribe(item, parents, edit_rate, indent=0): elif media_kind in ("SoundMasterTrack", "Sound"): result.kind = otio.schema.TrackKind.Audio else: - # Timecode, Edgecode, others? - result.kind = "" + # Timecode, Edgecode, Data, ... + result.kind = f"AAF_{media_kind}" # Done! return result diff --git a/tests/sample_data/avid_data_track_example.aaf b/tests/sample_data/avid_data_track_example.aaf new file mode 100755 index 0000000..37a55ef Binary files /dev/null and b/tests/sample_data/avid_data_track_example.aaf differ diff --git a/tests/test_aaf_adapter.py b/tests/test_aaf_adapter.py index d1ac0dd..0cd0649 100644 --- a/tests/test_aaf_adapter.py +++ b/tests/test_aaf_adapter.py @@ -205,6 +205,11 @@ "nested_audio_dissolve.aaf" ) +AVID_DATA_TRACK_EXAMPLE_PATH = os.path.join( + SAMPLE_DATA_DIR, + "avid_data_track_example.aaf" +) + try: lib_path = os.environ.get("OTIO_AAF_PYTHON_LIB") @@ -1583,6 +1588,12 @@ def get_expected_dict(timeline): self.assertEqual(get_expected_dict(tl_unbaked), expected_unbaked) self.assertEqual(get_expected_dict(tl_baked), expected_baked) + def test_non_av_track_kind(self): + timeline = otio.adapters.read_from_file(AVID_DATA_TRACK_EXAMPLE_PATH) + self.assertEqual([t.kind for t in timeline.tracks], + ["Video", "AAF_DataEssenceTrack"] + ) + class AAFWriterTests(unittest.TestCase): def test_aaf_writer_gaps(self):