diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 4b03aea..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -per-file-ignores = - wavinfo/__init__.py: F401 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9aacf94..7b0397b 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.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v2.5.0 @@ -27,8 +27,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest - python -m pip install -e . + python -m pip install --group dev + python -m pip install . - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v2 - name: Test with pytest diff --git a/.github/workflows/python-flake8.yml b/.github/workflows/python-ruff.yml similarity index 56% rename from .github/workflows/python-flake8.yml rename to .github/workflows/python-ruff.yml index cbc369a..f14cc66 100644 --- a/.github/workflows/python-flake8.yml +++ b/.github/workflows/python-ruff.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Flake8 +name: Lint with Ruff on: push: @@ -11,12 +11,11 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.13"] + python-version: ["3.13", "3.14"] steps: - uses: actions/checkout@v2.5.0 @@ -27,14 +26,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 - python -m pip install -e . - - name: Lint with flake8 + python -m pip install --group dev + python -m pip install . + - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Lint with flake8 - run: | - flake8 wavinfo + ruff check src diff --git a/README.md b/README.md index 90c99f2..e57aef6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![GitHub last commit](https://img.shields.io/github/last-commit/iluvcapra/wavinfo) [![Documentation Status](https://readthedocs.org/projects/wavinfo/badge/?version=latest)](https://wavinfo.readthedocs.io/en/latest/?badge=latest) ![](https://img.shields.io/github/license/iluvcapra/wavinfo.svg) [![Tests](https://github.com/iluvcapra/wavinfo/actions/workflows/python-package.yml/badge.svg)](https://github.com/iluvcapra/wavinfo/actions/workflows/python-package.yml) -[![Flake8](https://github.com/iluvcapra/wavinfo/actions/workflows/python-flake8.yml/badge.svg)](https://github.com/iluvcapra/wavinfo/actions/workflows/python-flake8.yml) +[![Ruff](https://github.com/iluvcapra/wavinfo/actions/workflows/python-ruff.yml/badge.svg)](https://github.com/iluvcapra/wavinfo/actions/workflows/python-ruff.yml) [![codecov](https://codecov.io/gh/iluvcapra/wavinfo/branch/master/graph/badge.svg?token=9DZQfZENYv)](https://codecov.io/gh/iluvcapra/wavinfo) # wavinfo diff --git a/pyproject.toml b/pyproject.toml index 511e7ac..6c10476 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,27 +1,26 @@ -# https://python-poetry.org/docs/pyproject/ - [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["uv_build>=0.8.18,<0.9.0"] +build-backend = "uv_build" -[tool.poetry] +[project] name = "wavinfo" -version = "3.1.0" +version = "3.1.1" description = "Probe WAVE files for all metadata" -authors = ["Jamie Hardt "] +authors = [{ name = "Jamie Hardt", email = "jamiehardt@me.com"}] license = "MIT" readme = "README.md" +requires-python = ">=3.8" classifiers = [ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', 'Topic :: Multimedia', 'Topic :: Multimedia :: Sound/Audio', - "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 :: 3.13", + "Programming Language :: Python :: 3.14" ] homepage = "https://github.com/iluvcapra/wavinfo" repository = "https://github.com/iluvcapra/wavinfo.git" @@ -39,17 +38,22 @@ keywords = [ 'broadcast' ] -[tool.poetry.extras] -doc = ['sphinx', 'sphinx_rtd_theme'] +dependencies = [ + "lxml>=6.0.2", +] -[tool.poetry.scripts] -wavinfo = 'wavinfo.__main__:main' +[dependency-groups] +dev = [ + "pytest>=8.3.5", + "ruff>=0.14.0", +] +doc = [ + "sphinx>=7.1.2", + "sphinx-rtd-theme>=3.0.2", +] -[tool.poetry.dependencies] -python = "^3.8" -lxml = "~= 5.3.0" -sphinx_rtd_theme = {version= '>= 1.1.1', optional=true} -sphinx = {version= '>= 5.3.0', optional=true} +[project.scripts] +wavinfo = "wavinfo:__main__.main" [tool.pyright] typeCheckingMode = "basic" @@ -65,3 +69,4 @@ disable = [ "R0913", # (too-many-arguments) "W0105", # (pointless-string-statement) ] + diff --git a/wavinfo/__init__.py b/src/wavinfo/__init__.py similarity index 75% rename from wavinfo/__init__.py rename to src/wavinfo/__init__.py index d5bbfaf..1e4cd8c 100644 --- a/wavinfo/__init__.py +++ b/src/wavinfo/__init__.py @@ -2,5 +2,8 @@ Probe WAVE Files for iXML, Broadcast-WAVE and other metadata. """ +__all__ = ['WavInfoReader', 'WavInfoEOFError'] + from .wave_reader import WavInfoReader from .riff_parser import WavInfoEOFError + diff --git a/wavinfo/__main__.py b/src/wavinfo/__main__.py similarity index 100% rename from wavinfo/__main__.py rename to src/wavinfo/__main__.py diff --git a/wavinfo/man/man1/wavinfo.1 b/src/wavinfo/man/man1/wavinfo.1 similarity index 100% rename from wavinfo/man/man1/wavinfo.1 rename to src/wavinfo/man/man1/wavinfo.1 diff --git a/wavinfo/man/man7/wavinfo.7 b/src/wavinfo/man/man7/wavinfo.7 similarity index 100% rename from wavinfo/man/man7/wavinfo.7 rename to src/wavinfo/man/man7/wavinfo.7 diff --git a/wavinfo/rf64_parser.py b/src/wavinfo/rf64_parser.py similarity index 100% rename from wavinfo/rf64_parser.py rename to src/wavinfo/rf64_parser.py diff --git a/wavinfo/riff_parser.py b/src/wavinfo/riff_parser.py similarity index 100% rename from wavinfo/riff_parser.py rename to src/wavinfo/riff_parser.py diff --git a/wavinfo/umid_parser.py b/src/wavinfo/umid_parser.py similarity index 100% rename from wavinfo/umid_parser.py rename to src/wavinfo/umid_parser.py diff --git a/wavinfo/wave_adm_reader.py b/src/wavinfo/wave_adm_reader.py similarity index 100% rename from wavinfo/wave_adm_reader.py rename to src/wavinfo/wave_adm_reader.py diff --git a/wavinfo/wave_bext_reader.py b/src/wavinfo/wave_bext_reader.py similarity index 100% rename from wavinfo/wave_bext_reader.py rename to src/wavinfo/wave_bext_reader.py diff --git a/wavinfo/wave_cues_reader.py b/src/wavinfo/wave_cues_reader.py similarity index 100% rename from wavinfo/wave_cues_reader.py rename to src/wavinfo/wave_cues_reader.py diff --git a/wavinfo/wave_dbmd_reader.py b/src/wavinfo/wave_dbmd_reader.py similarity index 100% rename from wavinfo/wave_dbmd_reader.py rename to src/wavinfo/wave_dbmd_reader.py diff --git a/wavinfo/wave_info_reader.py b/src/wavinfo/wave_info_reader.py similarity index 100% rename from wavinfo/wave_info_reader.py rename to src/wavinfo/wave_info_reader.py diff --git a/wavinfo/wave_ixml_reader.py b/src/wavinfo/wave_ixml_reader.py similarity index 100% rename from wavinfo/wave_ixml_reader.py rename to src/wavinfo/wave_ixml_reader.py diff --git a/wavinfo/wave_reader.py b/src/wavinfo/wave_reader.py similarity index 100% rename from wavinfo/wave_reader.py rename to src/wavinfo/wave_reader.py diff --git a/wavinfo/wave_smpl_reader.py b/src/wavinfo/wave_smpl_reader.py similarity index 100% rename from wavinfo/wave_smpl_reader.py rename to src/wavinfo/wave_smpl_reader.py diff --git a/wavinfo/wavfind.py b/src/wavinfo/wavfind.py similarity index 100% rename from wavinfo/wavfind.py rename to src/wavinfo/wavfind.py