Skip to content

Commit 79c4373

Browse files
authored
Merge pull request #545 from idiap/release/0.27.4
v0.27.4
2 parents 2ffde47 + 6fceea9 commit 79c4373

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1856
-2419
lines changed

.github/actions/setup-uv/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ runs:
44
using: 'composite'
55
steps:
66
- name: Install uv
7-
uses: astral-sh/setup-uv@v5
7+
uses: astral-sh/setup-uv@v7
88
with:
9-
version: "0.5.17"
10-
enable-cache: true
11-
cache-dependency-glob: "**/pyproject.toml"
9+
version: "0.9.24"
1210
python-version: ${{ matrix.python-version }}

.github/workflows/docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- "nvidia/cuda:12.8.1-base-ubuntu24.04" # GPU enabled
3636
- "python:3.12-slim" # CPU only
3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v6
3939
- name: Log in to the Container registry
4040
uses: docker/login-action@v3
4141
with:
@@ -89,7 +89,7 @@ jobs:
8989
base:
9090
- "nvidia/cuda:12.8.1-base-ubuntu24.04" # GPU enabled
9191
steps:
92-
- uses: actions/checkout@v4
92+
- uses: actions/checkout@v6
9393
- name: Log in to the Container registry
9494
uses: docker/login-action@v3
9595
with:

.github/workflows/pypi-release.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ defaults:
77
shell: bash
88

99
jobs:
10-
build:
10+
publish:
1111
runs-on: ubuntu-latest
12+
environment:
13+
name: release
14+
url: https://pypi.org/p/coqui-tts
15+
permissions:
16+
id-token: write
1217
steps:
13-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1419
- name: Setup uv
1520
uses: ./.github/actions/setup-uv
1621
- name: Verify tag matches version
@@ -30,25 +35,5 @@ jobs:
3035
uv venv --no-project
3136
uv pip install dist/*.tar.gz
3237
uv pip install dist/*.whl
33-
- uses: actions/upload-artifact@v4
34-
with:
35-
name: build
36-
path: dist/*
37-
publish-artifacts:
38-
name: Publish to PyPI
39-
runs-on: ubuntu-latest
40-
needs: [build]
41-
environment:
42-
name: release
43-
url: https://pypi.org/p/coqui-tts
44-
permissions:
45-
id-token: write
46-
steps:
47-
- uses: actions/download-artifact@v4
48-
with:
49-
path: "dist/"
50-
name: build
51-
- run: |
52-
ls -lh dist/
53-
- name: Publish package distributions to PyPI
54-
uses: pypa/gh-action-pypi-publish@release/v1
38+
- name: Publish
39+
run: uv publish

.github/workflows/style_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
lint:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
3131
- name: Setup uv
3232
uses: ./.github/actions/setup-uv
3333
- name: Lint check

.github/workflows/tests.yml

Lines changed: 70 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,29 @@ on:
3232
description: "Branch of Coqpit to test"
3333
required: false
3434
default: "main"
35-
paths-ignore:
36-
- '.gitignore'
37-
- 'CITATION.cff'
38-
- 'CODE_OF_CONDUCT.md'
39-
- 'CONTRIBUTING.md'
40-
- 'LICENSE.txt'
41-
- 'README.md'
42-
- 'images/**'
4335

4436
jobs:
4537
unit:
4638
runs-on: ubuntu-latest
4739
strategy:
4840
fail-fast: false
4941
matrix:
50-
python-version: ["3.10", "3.11", "3.12", "3.13"]
51-
subset: ["data_tests", "inference_tests", "test_aux", "test_text"]
42+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
43+
subset: ["data_tests", "inference_tests", "test_aux", "test_text", "test_tts", "test_vc", "test_vocoder"]
44+
uv-resolution: ["highest", "lowest-direct"]
45+
exclude:
46+
- python-version: "3.10"
47+
uv-resolution: "highest"
48+
- python-version: "3.11"
49+
uv-resolution: "lowest-direct"
50+
- python-version: "3.12"
51+
uv-resolution: "lowest-direct"
52+
- python-version: "3.13"
53+
uv-resolution: "lowest-direct"
54+
- python-version: "3.14"
55+
uv-resolution: "lowest-direct"
5256
steps:
53-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v6
5458
- name: Setup uv
5559
uses: ./.github/actions/setup-uv
5660
- name: Install Espeak
@@ -71,14 +75,11 @@ jobs:
7175
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
7276
fi
7377
- name: Unit tests
74-
run: |
75-
resolution=highest
76-
if [ "${{ matrix.python-version }}" == "3.10" ]; then
77-
resolution=lowest-direct
78-
fi
79-
uv run --resolution=$resolution --extra codec --extra server --extra languages make ${{ matrix.subset }}
78+
run: >
79+
uv run --resolution=${{ matrix.uv-resolution }} --extra cpu
80+
--extra codec --extra server --extra languages make ${{ matrix.subset }}
8081
- name: Upload coverage data
81-
uses: actions/upload-artifact@v4
82+
uses: actions/upload-artifact@v6
8283
with:
8384
include-hidden-files: true
8485
name: coverage-data-${{ matrix.subset }}-${{ matrix.python-version }}
@@ -88,10 +89,16 @@ jobs:
8889
strategy:
8990
fail-fast: false
9091
matrix:
91-
python-version: ["3.10", "3.13"]
92-
shard: [0, 1, 2, 3, 4]
92+
shard: [0, 1, 2, 3, 4, 5]
93+
python-version: ["3.10", "3.14"]
94+
uv-resolution: ["highest", "lowest-direct"]
95+
exclude:
96+
- python-version: "3.10"
97+
uv-resolution: "highest"
98+
- python-version: "3.14"
99+
uv-resolution: "lowest-direct"
93100
steps:
94-
- uses: actions/checkout@v4
101+
- uses: actions/checkout@v6
95102
- name: Setup uv
96103
uses: ./.github/actions/setup-uv
97104
- name: Install Espeak
@@ -112,16 +119,16 @@ jobs:
112119
fi
113120
- name: Integration tests for shard ${{ matrix.shard }}
114121
run: |
115-
uv run pytest tests/integration --collect-only --quiet | grep "::" > integration_tests.txt
116-
total_shards=5
122+
uv run --extra cpu --extra codec \
123+
pytest tests/integration --collect-only --quiet | \
124+
grep "::" > integration_tests.txt
125+
total_shards=6
117126
shard_tests=$(awk "NR % $total_shards == ${{ matrix.shard }}" integration_tests.txt)
118-
resolution=highest
119-
if [ "${{ matrix.python-version }}" == "3.10" ]; then
120-
resolution=lowest-direct
121-
fi
122-
uv run --resolution=$resolution --extra codec --extra languages coverage run -m pytest -x -v --durations=0 $shard_tests
127+
uv run --resolution=${{ matrix.uv-resolution }} --extra cpu \
128+
--extra codec --extra languages coverage run -m \
129+
pytest -x -v --durations=0 $shard_tests
123130
- name: Upload coverage data
124-
uses: actions/upload-artifact@v4
131+
uses: actions/upload-artifact@v6
125132
with:
126133
include-hidden-files: true
127134
name: coverage-data-integration-${{ matrix.shard }}-${{ matrix.python-version }}
@@ -131,10 +138,10 @@ jobs:
131138
strategy:
132139
fail-fast: false
133140
matrix:
134-
python-version: ["3.13"]
141+
python-version: ["3.14"]
135142
partition: ["0", "1", "2"]
136143
steps:
137-
- uses: actions/checkout@v4
144+
- uses: actions/checkout@v6
138145
- name: Setup uv
139146
uses: ./.github/actions/setup-uv
140147
- name: Install Espeak
@@ -154,25 +161,53 @@ jobs:
154161
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
155162
fi
156163
- name: Zoo tests
157-
run: uv run --extra codec --extra server --extra languages make test_zoo
164+
run: uv run --extra cpu --extra codec --extra server --extra languages make test_zoo
158165
env:
159166
NUM_PARTITIONS: 3
160167
TEST_PARTITION: ${{ matrix.partition }}
161168
- name: Upload coverage data
162-
uses: actions/upload-artifact@v4
169+
uses: actions/upload-artifact@v6
163170
with:
164171
include-hidden-files: true
165172
name: coverage-data-zoo-${{ matrix.partition }}
166173
path: .coverage.*
174+
notebook:
175+
runs-on: ubuntu-latest
176+
strategy:
177+
fail-fast: false
178+
matrix:
179+
python-version: ["3.14"]
180+
steps:
181+
- uses: actions/checkout@v6
182+
- name: Setup uv
183+
uses: ./.github/actions/setup-uv
184+
- name: Install Espeak
185+
run: |
186+
sudo apt-get update
187+
sudo apt-get install espeak espeak-ng
188+
- name: Install dependencies
189+
run: |
190+
sudo apt-get install -y --no-install-recommends git make gcc
191+
make system-deps
192+
- name: Install custom Trainer and/or Coqpit if requested
193+
run: |
194+
if [[ -n "${{ github.event.inputs.trainer_branch }}" ]]; then
195+
uv add git+https://github.com/idiap/coqui-ai-Trainer --branch ${{ github.event.inputs.trainer_branch }}
196+
fi
197+
if [[ -n "${{ github.event.inputs.coqpit_branch }}" ]]; then
198+
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
199+
fi
200+
- name: Notebook tests
201+
run: make test_notebook
167202
coverage:
168203
if: always()
169204
needs: [unit, integration, zoo]
170205
runs-on: ubuntu-latest
171206
steps:
172-
- uses: actions/checkout@v4
207+
- uses: actions/checkout@v6
173208
- name: Setup uv
174209
uses: ./.github/actions/setup-uv
175-
- uses: actions/download-artifact@v4
210+
- uses: actions/download-artifact@v7
176211
with:
177212
pattern: coverage-data-*
178213
merge-multiple: true

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: "https://github.com/pre-commit/pre-commit-hooks"
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-json
66
files: "TTS/.models.json"
77
- id: check-yaml
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.9.1
11+
rev: v0.14.11
1212
hooks:
1313
- id: ruff
1414
args: [--fix, --exit-non-zero-on-fix]

Makefile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ test: ## run tests.
1212
test_vocoder: ## run vocoder tests.
1313
coverage run -m pytest -x -v --durations=0 tests/vocoder_tests
1414

15+
test_vc: ## run voice conversion tests.
16+
coverage run -m pytest -x -v --durations=0 tests/vc_tests
17+
1518
test_tts: ## run tts tests.
1619
coverage run -m pytest -x -v --durations=0 tests/tts_tests
1720

1821
test_aux: ## run aux tests.
1922
coverage run -m pytest -x -v --durations=0 tests/aux_tests
2023

2124
test_zoo: ## run zoo tests.
22-
coverage run -m pytest -x -v --durations=0 tests/zoo_tests/test_models.py
25+
coverage run -m pytest -v --durations=0 tests/zoo_tests/test_models.py
2326

2427
test_zoo_big: ## run tests for models that are too big for CI.
2528
coverage run -m pytest -x -v --durations=0 tests/zoo_tests/test_big_models.py
@@ -33,9 +36,19 @@ data_tests: ## run data tests.
3336
test_text: ## run text tests.
3437
coverage run -m pytest -x -v --durations=0 tests/text_tests
3538

39+
test_notebook: ## run Jupyter notebook tests
40+
NB_OUTPUT_DIR=/tmp/coqui uv run --with nbval \
41+
--extra cpu --extra codec --extra languages --extra notebooks \
42+
pytest --nbval-lax notebooks/ \
43+
--ignore-glob "notebooks/Tutorial*" \
44+
--ignore notebooks/dataset_analysis/CheckDatasetSNR.ipynb
45+
3646
test_failed: ## only run tests failed the last time.
3747
coverage run -m pytest -x -v --last-failed tests
3848

49+
jupyter: ## launch Jupyter lab
50+
uv run --all-extras --no-extra cuda --no-extra codec-cuda --with jupyter jupyter lab
51+
3952
style: ## update code style.
4053
uv run --only-dev ruff format ${target_dirs}
4154

@@ -54,4 +67,5 @@ install_dev: ## install 🐸 TTS for development.
5467
uv run pre-commit install
5568

5669
docs: ## build the docs
57-
uv run --group docs $(MAKE) -C docs clean && uv run --group docs $(MAKE) -C docs html
70+
uv run --extra cpu --extra codec --group docs $(MAKE) -C docs clean
71+
uv run --extra cpu --extra codec --group docs $(MAKE) -C docs html

0 commit comments

Comments
 (0)