From 9ac06040a2d6227e05e647e707aea036109c82f3 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Thu, 9 Oct 2025 22:16:12 -0700 Subject: [PATCH] Making changes to the workflows --- .github/workflows/python-package.yml | 4 ++-- .../{python-flake8.yml => python-ruff.yml} | 15 ++++----------- README.md | 2 +- pyproject.toml | 1 + src/wavinfo/__init__.py | 3 +++ 5 files changed, 11 insertions(+), 14 deletions(-) rename .github/workflows/{python-flake8.yml => python-ruff.yml} (60%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9aacf94..6e6638f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 60% rename from .github/workflows/python-flake8.yml rename to .github/workflows/python-ruff.yml index cbc369a..0e46afc 100644 --- a/.github/workflows/python-flake8.yml +++ b/.github/workflows/python-ruff.yml @@ -11,7 +11,6 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false @@ -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 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 306b140..48fb38b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ dependencies = [ [dependency-groups] dev = [ + "pytest>=8.3.5", "ruff>=0.14.0", ] doc = [ diff --git a/src/wavinfo/__init__.py b/src/wavinfo/__init__.py index d5bbfaf..1e4cd8c 100644 --- a/src/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 +