Skip to content

Commit 1d1fa38

Browse files
authored
Removed tox for a plain github action workflow and updated flit_core (#88)
Moved from #86 - Remove Tox in favor of plain GitHub Actions for testing - Remove coverage report for now - Update flitcore and modernize pyproject toml.
1 parent 83157ca commit 1d1fa38

File tree

4 files changed

+73
-117
lines changed

4 files changed

+73
-117
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,56 @@
11
name: Build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
1010

11-
jobs:
12-
test:
13-
name: "${{ matrix.os }}: ${{ matrix.tox-env }}"
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
tox-env:
19-
[
20-
py39-test,
21-
py310-test,
22-
py311-test,
23-
py312-test,
24-
py313-test,
25-
pypy-test,
26-
]
27-
os: [ubuntu-24.04, windows-latest]
28-
29-
# Only test on a couple of versions on Windows.
30-
exclude:
31-
- os: windows-latest
32-
tox-env: pypy-test
11+
env:
12+
MAIN_PYTHON_VERSION: "3.12"
3313

34-
# Python interpreter versions. :/
35-
include:
36-
- tox-env: py39-test
37-
python: "3.9"
38-
- tox-env: py310-test
39-
python: "3.10"
40-
- tox-env: py311-test
41-
python: "3.11"
42-
- tox-env: py312-test
43-
python: "3.12"
44-
- tox-env: py313-test
45-
python: "3.13"
46-
- tox-env: pypy-test
47-
python: pypy3.9
14+
jobs:
15+
test:
16+
name: "${{ matrix.os }}: ${{ matrix.python-version }}"
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
22+
os: [ubuntu-24.04, windows-latest]
4823

49-
steps:
50-
- uses: actions/checkout@v3
51-
- name: Set up Python ${{ matrix.python }}
52-
uses: actions/setup-python@v4
53-
with:
54-
python-version: ${{ matrix.python }}
55-
- name: Install Tox
56-
run: pip install tox
57-
- name: Tox
58-
run: tox -e ${{ matrix.tox-env }}
24+
steps:
25+
- uses: actions/checkout@v5
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install .[dev]
5934
60-
style:
61-
name: Style
62-
runs-on: ubuntu-latest
63-
steps:
64-
- uses: actions/checkout@v4
65-
- name: Install Python
66-
uses: actions/setup-python@v5
67-
with:
68-
python-version: "3.9"
69-
- name: Install dependencies
70-
run: |
71-
python -m pip install --upgrade pip
72-
pip install .[dev]
73-
- name: Check style with Ruff
74-
id: ruff
75-
run: |
76-
ruff check --output-format=github .
77-
- name: Check format with Ruff
78-
id: ruff-format
79-
run: |
80-
ruff format --check .
35+
- name: Run tests
36+
run: |
37+
pytest -v
38+
style:
39+
name: Style
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v5
43+
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install .[dev]
51+
- name: Check style with Ruff
52+
run: |
53+
ruff check --output-format=github .
54+
- name: Check format with Ruff
55+
run: |
56+
ruff format --check .

pyproject.toml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
11
[build-system]
2-
requires = ["flit_core >=2,<4"]
2+
requires = ["flit_core >=3.11,<4"]
33
build-backend = "flit_core.buildapi"
44

5-
[tool.flit.metadata]
6-
module = "mediafile"
7-
author = "Adrian Sampson"
8-
author-email = "[email protected]"
9-
home-page = "https://github.com/beetbox/mediafile"
10-
description-file = "README.rst"
11-
requires = [
12-
"mutagen>=1.46",
13-
"filetype>=1.2.0",
5+
[project]
6+
name = "mediafile"
7+
authors = [
8+
{ name = "Adrian Sampson", email = "[email protected]" },
149
]
15-
requires-python = ">=3.7"
10+
readme = "README.rst"
11+
license = "MIT"
12+
requires-python = ">=3.9"
13+
description = "A simple, cross-format library for reading and writing media file metadata."
14+
dynamic = ["version"]
1615
classifiers = [
1716
'Topic :: Multimedia :: Sound/Audio',
18-
'License :: OSI Approved :: MIT License',
1917
'Environment :: Web Environment',
20-
'Programming Language :: Python :: 3.7',
21-
'Programming Language :: Python :: 3.8',
2218
'Programming Language :: Python :: 3.9',
2319
'Programming Language :: Python :: 3.10',
20+
'Programming Language :: Python :: 3.11',
21+
'Programming Language :: Python :: 3.12',
22+
'Programming Language :: Python :: 3.13',
2423
'Programming Language :: Python :: Implementation :: PyPy',
2524
]
26-
27-
[tool.flit.metadata.requires-extra]
28-
test = [
29-
"tox"
25+
dependencies = [
26+
"mutagen>=1.46",
27+
"filetype>=1.2.0",
3028
]
29+
30+
31+
[project.urls]
32+
Documentation = "https://mediafile.readthedocs.io"
33+
Source = "https://github.com/beetbox/mediafile"
34+
35+
[project.optional-dependencies]
3136
dev = [
3237
"ruff",
3338
"pytest"
@@ -52,4 +57,4 @@ ignore = [
5257
]
5358

5459
[tool.ruff.format]
55-
quote-style = "double"
60+
quote-style = "double"

setup.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)