Skip to content
Merged
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
29 changes: 16 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@ name: Python Tests

on: [push]

jobs:
build:

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]

python: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Install Python tools
uses: BrandonLWhite/pipx-install-action@v1.0.3
- name: Setup Python with poetry caching
# poetry cache requires poetry to already be installed, weirdly
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install ffmpeg
run: sudo apt install -y --no-install-recommends ffmpeg
- name: Install tox and any other packages
run: pip install tox
- name: Run tox
# Run tox using the version of Python in `PATH`
run: tox -e py
- name: Test
run: |-
poetry install --extras=test
poe test
81 changes: 81 additions & 0 deletions .github/workflows/make_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Make a release

on:
workflow_dispatch:
inputs:
version:
description: 'Version of the new release, just as a number with no prepended "v"'
required: true

env:
PYTHON_VERSION: 3.9
NEW_VERSION: ${{ inputs.version }}
NEW_TAG: v${{ inputs.version }}

jobs:
increment-version:
name: Bump version, commit and create tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python tools
uses: BrandonLWhite/pipx-install-action@v1.0.3
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Bump project version
run: poetry version "${{ env.NEW_VERSION }}"

- uses: EndBug/add-and-commit@v9
id: commit_and_tag
name: Commit the changes and create tag
with:
message: "Increment version to ${{ env.NEW_VERSION }}"
tag: "${{ env.NEW_TAG }} --force"

build:
name: Build the distribution package
runs-on: ubuntu-latest
needs: increment-version
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.NEW_TAG }}

- name: Install Python tools
uses: BrandonLWhite/pipx-install-action@v1.0.3
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Build a binary wheel and a source tarball
run: poetry build

- name: Store the package
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish distribution 📦 to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://test.pypi.org/p/audioread
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ A second optional parameter to ``audio_open`` specifies which backends to try
``available_backends`` function to get a list backends that are usable on the
current system.

Audioread supports Python 3 (3.8+).
Audioread supports Python 3 (3.9+).

Example
-------
Expand Down
1 change: 0 additions & 1 deletion audioread/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from . import ffdec
from .exceptions import DecodeError, NoBackendError
from .version import version as __version__ # noqa
from .base import AudioFile # noqa


Expand Down
18 changes: 0 additions & 18 deletions audioread/version.py

This file was deleted.

Loading
Loading