Skip to content

Commit

Permalink
Merge pull request #30 from bmcfee/ci-upates
Browse files Browse the repository at this point in the history
updated CI and tests
  • Loading branch information
bmcfee authored Sep 30, 2024
2 parents 3637b16 + c731399 commit 54cab2b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 111 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-minimal.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI-minimal
name: CI

on:
push:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -24,7 +24,7 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install rubberband-cli and ffmpeg
run: sudo apt-get update && sudo apt-get install -y rubberband-cli ffmpeg
run: sudo apt-get update && sudo apt-get install -y rubberband-cli

- name: Install dependencies
run: pip install -e .[tests]
Expand Down
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .travis_dependencies.sh

This file was deleted.

16 changes: 5 additions & 11 deletions pyrubberband/pyrb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
import os
import subprocess
import tempfile
import six
import numpy as np
import soundfile as sf


__all__ = ['time_stretch', 'pitch_shift', 'timemap_stretch']

__RUBBERBAND_UTIL = 'rubberband'

if six.PY2:
DEVNULL = open(os.devnull, 'w')
else:
DEVNULL = subprocess.DEVNULL
DEVNULL = subprocess.DEVNULL


def __rubberband(y, sr, **kwargs):
Expand Down Expand Up @@ -65,7 +60,7 @@ def __rubberband(y, sr, **kwargs):
# Execute rubberband
arguments = [__RUBBERBAND_UTIL, '-q']

for key, value in six.iteritems(kwargs):
for key, value in kwargs.items():
arguments.append(str(key))
if len(str(value).strip()):
arguments.append(str(value))
Expand All @@ -82,10 +77,9 @@ def __rubberband(y, sr, **kwargs):
y_out = np.squeeze(y_out)

except OSError as exc:
six.raise_from(RuntimeError('Failed to execute rubberband. '
'Please verify that rubberband-cli '
'is installed.'),
exc)
raise RuntimeError('Failed to execute rubberband. '
'Please verify that rubberband-cli '
'is installed.') from exc

finally:
# Remove temp files
Expand Down
7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ classifiers =
Intended Audience :: Developers
Topic :: Multimedia :: Sound/Audio :: Analysis
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -33,10 +32,9 @@ classifiers =
[options]
packages = find:
install_package_data = True
python_requires = >=3.6
python_requires = >=3.7
install_requires =
numpy
six
numpy >= 1.0
soundfile >= 0.12.1

[options.extras_require]
Expand All @@ -45,4 +43,3 @@ docs =
tests =
pytest
pytest-cov
contextlib2
2 changes: 1 addition & 1 deletion tests/test_pyrb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
import pytest

from contextlib2 import nullcontext as dnr
from contextlib import nullcontext as dnr

import pyrubberband

Expand Down

0 comments on commit 54cab2b

Please sign in to comment.