Skip to content

Commit

Permalink
Merge pull request #10 from iluvcapra/maint-poetry
Browse files Browse the repository at this point in the history
Sprucing-up Build System and Workflows
  • Loading branch information
iluvcapra authored Nov 26, 2024
2 parents ce1a0d3 + be1dc99 commit f48c164
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 50 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

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 }}
Expand All @@ -28,8 +27,7 @@ jobs:
run: |
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
python -m pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Upload Python Package
on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read
Expand All @@ -15,26 +14,29 @@ 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
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.8.6
- name: Report to Mastodon
uses: cbrgm/mastodon-github-action@v1.0.1
run: python -m build .
- name: Publish to Pypi
uses: pypa/gh-action-pypi-publish@v1.12.2
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 }}
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
57 changes: 26 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,49 +1,40 @@
[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 <jamiehardt@me.com>"]
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',
'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',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12'
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13'
]
dependencies = [
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"

]
keywords = [
'parser',
'film',
'broadcast'
]
[tool.poetry.extras]
doc = ['sphinx', 'sphinx_rtd_theme']

[tool.flit.module]
name = "pycmx"

[project.optional-dependencies]
doc = [
'sphinx >= 5.3.0',
'sphinx_rtd_theme >= 1.1.1',
]

[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]
python = "^3.8"
sphinx = { version='>= 5.3.0', optional=true}
sphinx_rtd_theme = {version ='>= 1.1.1', optional=true}

[tool.pyright]
typeCheckingMode = "basic"
Expand All @@ -59,3 +50,7 @@ disable = [
"R0913", # (too-many-arguments)
"W0105", # (pointless-string-statement)
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit f48c164

Please sign in to comment.