Skip to content

Commit

Permalink
openunmix v1.3.0: update zendo links (#144)
Browse files Browse the repository at this point in the history
* update urls

* black

* update black

* bump python

* relax regressiontest

* remove matrix build

* simplify black

* black

* reduce py version

* dynamic

* hubconf

* remove setup.py

* find cli

* no need to check yml

* no need to run conda tests

* update tests

* fix readme

* pytest

* pytest

* find pytest

* speedup tests

* remove cli test from uni test

* support wiener_win_len

* black

* default to umxl
  • Loading branch information
faroit authored Apr 16, 2024
1 parent 9871696 commit 822ed57
Show file tree
Hide file tree
Showing 21 changed files with 208 additions and 312 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/test_black.yml
Original file line number Diff line number Diff line change
@@ -1,25 1,11 @@
name: Linter
on: [push, pull_request]

name: Lint
on: [pull_request] # yamllint disable-line rule:truthy
jobs:
code-black:
name: CI
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install Black and flake8
run: pip install black==22.3.0 flake8
- name: Run Black
run: python -m black --config=pyproject.toml --check openunmix tests scripts

- name: Lint with flake8
# Exit on important linting errors and warn about others.
run: |
python -m flake8 openunmix tests --show-source --statistics --select=F6,F7,F82,F52
python -m flake8 --config .flake8 --exit-zero openunmix tests --statistics
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
version: "~= 24.4.0"
8 changes: 5 additions & 3 deletions .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 2,20 @@ name: UMX
# thanks for @mpariente for copying this workflow
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
# Trigger the workflow on push or pull request
on: [push, pull_request]
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
src-test:
name: separation test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9]

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/test_conda.yml

This file was deleted.

43 changes: 10 additions & 33 deletions .github/workflows/test_unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 2,20 @@ name: CI
# thanks for @mpariente for copying this workflow
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
# Trigger the workflow on push or pull request
on: [push, pull_request]
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
src-test:
name: unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
pytorch-version: ["1.9.0"]
python-version: [3.9]

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -26,20 27,10 @@ jobs:
sudo apt update
sudo apt install libsndfile1-dev libsndfile1 ffmpeg sox
- name: Install python dependencies
env:
TORCH_INSTALL: ${{ matrix.pytorch-version }}
run: |
python -m pip install --upgrade --user pip --quiet
python -m pip install numpy Cython --upgrade-strategy only-if-needed --quiet
python -m pip install coverage codecov --upgrade-strategy only-if-needed --quiet
if [ $TORCH_INSTALL == "1.8.0" ]; then
INSTALL="torch==1.8.0 cpu torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html"
elif [ $TORCH_INSTALL == "1.9.0" ]; then
INSTALL="torch==1.9.0 cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html"
else
INSTALL="--pre torch torchaudio -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
fi
python -m pip install $INSTALL
python -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install -e .['tests']
python --version
pip --version
Expand All @@ -50,22 41,8 @@ jobs:
./tests/create_dummy_datasets.sh
shell: bash

- name: Source code tests
run: |
coverage run -a -m py.test tests
# chmod x ./tests/cli_test.sh
# ./tests/cli_test.sh
- name: CLI tests
run: |
chmod x ./tests/cli_test.sh
./tests/cli_test.sh
- name: Coverage report
- name: Run tests
env:
PY_COLORS: "1"
run: |
coverage report -m
coverage xml -o coverage.xml
- name: Codecov upload
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
pytest tests -vv
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 149,8 @@ Note that this requires the audio to be in the right shape and sampling rate. Fo
To perform model loading, preprocessing and separation in one step, just use:
```python
from openunmix import separate
estimates = separate.predict(audio, ...)
from openunmix.predict import separate
estimates = separate(audio, ...)
```
### Load user-trained models
Expand Down
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 4,7 @@
# `xxx` take waveform inputs and output separated waveforms

# Optional list of dependencies required by the package
dependencies = ['torch', 'numpy']
dependencies = ["torch", "numpy"]

from openunmix import umxse_spec
from openunmix import umxse
Expand Down
Loading

0 comments on commit 822ed57

Please sign in to comment.