From a79cb021393259cd396c559fa0a63eaa5b1cff89 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 10:50:38 -0800 Subject: [PATCH 1/7] Updating workflows Added 3.13 support, publish to Bluesky, Poetry build system --- .github/workflows/python-package.yml | 3 +- .github/workflows/pythonpublish.yml | 28 +++++++-------- pyproject.toml | 53 +++++++++++++--------------- 3 files changed, 40 insertions(+), 44 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 35d58e0..7764ba4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 @@ -29,7 +29,6 @@ jobs: python -m pip install --upgrade pip python -m pip install flake8 pytest python3 -m pip install -e . - # 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 diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 678b180..929d674 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -3,7 +3,6 @@ name: Upload Python Package on: release: types: [published] - workflow_dispatch: permissions: contents: read @@ -15,9 +14,9 @@ jobs: environment: name: release steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4.2.2 - name: Set up Python - uses: actions/setup-python@v4.6.0 + uses: actions/setup-python@v5.3.0 with: python-version: '3.x' - name: Install dependencies @@ -25,16 +24,17 @@ jobs: python -m pip install --upgrade pip pip install build - name: Build package - run: python -m build - - name: pypi-publish + run: python -m build . + - name: Publish to Pypi uses: pypa/gh-action-pypi-publish@v1.8.6 - - name: Report to Mastodon - uses: cbrgm/mastodon-github-action@v1.0.1 + - name: Send Bluesky Post + uses: myConsciousness/bluesky-post@v5 with: - message: | - I just released a new version of pycmx, my library for reading CMX EDLs! - #sounddesign #filmmaking #python - ${{ github.server_url }}/${{ github.repository }} - env: - MASTODON_URL: ${{ secrets.MASTODON_URL }} - MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} + text: | + I've released a new version of pycmx, my module for + reading CMX EDLs. + link-preview-url: ${{ github.server_url }}/${{ github.repository }} + identifier: ${{ secrets.BLUESKY_APP_USER }} + password: ${{ secrets.BLUESKY_APP_PASSWORD }} + service: bsky.social + retry-count: 1 diff --git a/pyproject.toml b/pyproject.toml index a66e9d5..bc0a488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,15 @@ -[build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" - -[project] +[tool.poetry] name = "pycmx" -authors = [{name = "Jamie Hardt", email = "jamiehardt@me.com"}] +version = "1.2.2" +description = "Python CMX 3600 Edit Decision List Parser" +authors = ["Jamie Hardt "] +license = "MIT" readme = "README.md" -dynamic = ["version", "description"] -requires-python = "~=3.7" +keywords = [ + 'parser', + 'film', + 'broadcast' +] classifiers = [ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', @@ -20,29 +22,20 @@ classifiers = [ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11' ] -dependencies = [ - -] -keywords = [ - 'parser', - 'film', - 'broadcast' -] +homepage = "https://github.com/iluvcapra/pycmx" +documentation = "https://pycmx.readthedocs.io/" +repository = "https://github.com/iluvcapra/pycmx.git" +urls.Tracker = "https://github.com/iluvcapra/pycmx/issues" -[tool.flit.module] -name = "pycmx" +[tool.poetry.dependencies] +python = "^3.7" -[project.optional-dependencies] -doc = [ - 'sphinx >= 5.3.0', - 'sphinx_rtd_theme >= 1.1.1', -] +[tool.poetry.extras] +doc = ['sphinx', 'sphinx_rtd_theme'] -[project.urls] -Home = "https://github.com/iluvcapra/pycmx" -Documentation = "https://pycmx.readthedocs.io/" -Source = "https://github.com/iluvcapra/pycmx.git" -Issues = "https://github.com/iluvcapra/pycmx/issues" +[tool.poetry.dependencies] +sphinx = { version='>= 5.3.0', optional=true} +sphinx_rtd_theme = {version ='>= 1.1.1', optional=true} [tool.pyright] typeCheckingMode = "basic" @@ -58,3 +51,7 @@ disable = [ "R0913", # (too-many-arguments) "W0105", # (pointless-string-statement) ] + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From 7d3a58bff8f1aad16bfe4c6bc07f8f236670b10f Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 10:57:01 -0800 Subject: [PATCH 2/7] Small change --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2f8f9cc..5a8734b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,7 +27,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install flake8 pytest - python3 -m pip install -e . + python -m pip install -e . - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names From c0d278e079bdc75561cbded59a5fe0104e9ac2e5 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 11:01:49 -0800 Subject: [PATCH 3/7] Removing 3.7 support --- .github/workflows/python-package.yml | 2 +- pyproject.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5a8734b..bff4c78 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index 3e2a392..5029ce1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ classifiers = [ 'Topic :: Multimedia', 'Topic :: Multimedia :: Video', 'Topic :: Text Processing', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -29,7 +28,7 @@ repository = "https://github.com/iluvcapra/pycmx.git" urls.Tracker = "https://github.com/iluvcapra/pycmx/issues" [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" [tool.poetry.extras] doc = ['sphinx', 'sphinx_rtd_theme'] From 1894a143b1acbec993496656a42b573266674564 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 11:02:53 -0800 Subject: [PATCH 4/7] Removed second dependencies block --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5029ce1..2a61a50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,13 +27,11 @@ documentation = "https://pycmx.readthedocs.io/" repository = "https://github.com/iluvcapra/pycmx.git" urls.Tracker = "https://github.com/iluvcapra/pycmx/issues" -[tool.poetry.dependencies] -python = "^3.8" - [tool.poetry.extras] doc = ['sphinx', 'sphinx_rtd_theme'] [tool.poetry.dependencies] +python = "^3.8" sphinx = { version='>= 5.3.0', optional=true} sphinx_rtd_theme = {version ='>= 1.1.1', optional=true} From 156828b6488f111534fb5ff38fc4bffb057bffd3 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 11:11:25 -0800 Subject: [PATCH 5/7] Update pythonpublish.yml --- .github/workflows/pythonpublish.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 929d674..1b0ffd3 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -26,15 +26,17 @@ jobs: - name: Build package run: python -m build . - name: Publish to Pypi - uses: pypa/gh-action-pypi-publish@v1.8.6 - - name: Send Bluesky Post - uses: myConsciousness/bluesky-post@v5 + uses: pypa/gh-action-pypi-publish@v1.12.2 with: - text: | - I've released a new version of pycmx, my module for - reading CMX EDLs. - link-preview-url: ${{ github.server_url }}/${{ github.repository }} - identifier: ${{ secrets.BLUESKY_APP_USER }} - password: ${{ secrets.BLUESKY_APP_PASSWORD }} - service: bsky.social - retry-count: 1 + password: ${{ secrets.PYPI_APIKEY }} + # - name: Send Bluesky Post + # uses: myConsciousness/bluesky-post@v5 + # with: + # text: | + # I've released a new version of pycmx, my module for + # reading CMX EDLs. + # link-preview-url: ${{ github.server_url }}/${{ github.repository }} + # identifier: ${{ secrets.BLUESKY_APP_USER }} + # password: ${{ secrets.BLUESKY_APP_PASSWORD }} + # service: bsky.social + # retry-count: 1 From fbdfcddffffafaf4b53cfaf3406eedd030e964e0 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 11:15:08 -0800 Subject: [PATCH 6/7] Re-activated Bluesky posting Updated classifiers in pyproject.toml --- .github/workflows/pythonpublish.yml | 22 +++++++++++----------- pyproject.toml | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 1b0ffd3..30502e2 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -29,14 +29,14 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.12.2 with: password: ${{ secrets.PYPI_APIKEY }} - # - name: Send Bluesky Post - # uses: myConsciousness/bluesky-post@v5 - # with: - # text: | - # I've released a new version of pycmx, my module for - # reading CMX EDLs. - # link-preview-url: ${{ github.server_url }}/${{ github.repository }} - # identifier: ${{ secrets.BLUESKY_APP_USER }} - # password: ${{ secrets.BLUESKY_APP_PASSWORD }} - # service: bsky.social - # retry-count: 1 + - name: Send Bluesky Post + uses: myConsciousness/bluesky-post@v5 + with: + text: | + I've released a new version of pycmx, my module for + reading CMX EDLs. + link-preview-url: ${{ github.server_url }}/${{ github.repository }} + identifier: ${{ secrets.BLUESKY_APP_USER }} + password: ${{ secrets.BLUESKY_APP_PASSWORD }} + service: bsky.social + retry-count: 1 diff --git a/pyproject.toml b/pyproject.toml index 2a61a50..d00a534 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12' + 'Programming Language :: Python :: 3.13' ] homepage = "https://github.com/iluvcapra/pycmx" documentation = "https://pycmx.readthedocs.io/" From be1dc99e943bfd887c27368ca48728fc6444a77e Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 26 Nov 2024 11:16:33 -0800 Subject: [PATCH 7/7] Update pyproject.toml Fixed typo --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d00a534..4aff2d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12' + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13' ] homepage = "https://github.com/iluvcapra/pycmx"