Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 49 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,56 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: "${{ matrix.os }}: ${{ matrix.tox-env }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
tox-env:
[
py39-test,
py310-test,
py311-test,
py312-test,
py313-test,
pypy-test,
]
os: [ubuntu-24.04, windows-latest]

# Only test on a couple of versions on Windows.
exclude:
- os: windows-latest
tox-env: pypy-test
env:
MAIN_PYTHON_VERSION: "3.12"

# Python interpreter versions. :/
include:
- tox-env: py39-test
python: "3.9"
- tox-env: py310-test
python: "3.10"
- tox-env: py311-test
python: "3.11"
- tox-env: py312-test
python: "3.12"
- tox-env: py313-test
python: "3.13"
- tox-env: pypy-test
python: pypy3.9
jobs:
test:
name: "${{ matrix.os }}: ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-24.04, windows-latest]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Tox
run: pip install tox
- name: Tox
run: tox -e ${{ matrix.tox-env }}
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]

style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Check style with Ruff
id: ruff
run: |
ruff check --output-format=github .
- name: Check format with Ruff
id: ruff-format
run: |
ruff format --check .
- name: Run tests
run: |
pytest -v
style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Check style with Ruff
run: |
ruff check --output-format=github .
- name: Check format with Ruff
run: |
ruff format --check .
43 changes: 24 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
[build-system]
requires = ["flit_core >=2,<4"]
requires = ["flit_core >=3.11,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "mediafile"
author = "Adrian Sampson"
author-email = "[email protected]"
home-page = "https://github.com/beetbox/mediafile"
description-file = "README.rst"
requires = [
"mutagen>=1.46",
"filetype>=1.2.0",
[project]
name = "mediafile"
authors = [
{ name = "Adrian Sampson", email = "[email protected]" },
]
requires-python = ">=3.7"
readme = "README.rst"
license = "MIT"
requires-python = ">=3.9"
description = "A simple, cross-format library for reading and writing media file metadata."
dynamic = ["version"]
classifiers = [
'Topic :: Multimedia :: Sound/Audio',
'License :: OSI Approved :: MIT License',
'Environment :: Web Environment',
'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.13',
'Programming Language :: Python :: Implementation :: PyPy',
]

[tool.flit.metadata.requires-extra]
test = [
"tox"
dependencies = [
"mutagen>=1.46",
"filetype>=1.2.0",
]


[project.urls]
Documentation = "https://mediafile.readthedocs.io"
Source = "https://github.com/beetbox/mediafile"

[project.optional-dependencies]
dev = [
"ruff",
"pytest"
Expand All @@ -52,4 +57,4 @@ ignore = [
]

[tool.ruff.format]
quote-style = "double"
quote-style = "double"
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

21 changes: 0 additions & 21 deletions tox.ini

This file was deleted.