Skip to content

Commit 55bae90

Browse files
authored
Merge branch 'develop' into feature/channel_adapt
2 parents 8baefbb + 1735a2b commit 55bae90

671 files changed

Lines changed: 47276 additions & 7270 deletions

File tree

Some content is hidden

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

.github/workflows/pre-commit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: SpeechBrain pre-commit
2+
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.8'
16+
- uses: pre-commit/action@v2.0.3

.github/workflows/pythonapp.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SpeechBrain lint and unit tests to ease continuous integration
1+
# SpeechBrain unit tests to ease continuous integration
22
# NOTE: Caching these offers no speedup
33
name: SpeechBrain toolkit CI
44

@@ -9,25 +9,6 @@ on: # yamllint disable-line rule:truthy
99
pull_request:
1010

1111
jobs:
12-
linters:
13-
name: Linters
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python 3.8
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: 3.8
21-
- name: Lint dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install -r lint-requirements.txt
25-
- name: Run linters
26-
run: |
27-
flake8 . --count --show-source --statistics
28-
black --check --diff .
29-
yamllint .
30-
3112
tests:
3213
name: Tests
3314
runs-on: ubuntu-latest
@@ -50,6 +31,9 @@ jobs:
5031
pip install -r requirements.txt
5132
pip install --editable .
5233
pip install ctc-segmentation
34+
- name: Consistency tests with pytest
35+
run: |
36+
pytest tests/consistency
5337
- name: Unittests with pytest
5438
run: |
5539
pytest tests/unittests
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Verify docs generation
2+
3+
# Runs on pushes to master and all pull requests
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches: [main, develop]
7+
pull_request:
8+
9+
jobs:
10+
docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup Python 3.8
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.8'
18+
- name: Full dependencies
19+
run: |
20+
pip install -r requirements.txt
21+
pip install --editable .
22+
pip install -r docs/docs-requirements.txt
23+
- name: Generate docs
24+
run: |
25+
cd docs
26+
make html

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ coverage.xml
5151
.hypothesis/
5252
.pytest_cache/
5353
cover/
54+
tests/tmp/
5455

5556
# Translations
5657
*.mo
@@ -117,6 +118,9 @@ ENV/
117118
env.bak/
118119
venv.bak/
119120

121+
# PyCharm project settings
122+
.idea
123+
120124
# Spyder project settings
121125
.spyderproject
122126
.spyproject
@@ -138,8 +142,16 @@ dmypy.json
138142
# pytype static type analyzer
139143
.pytype/
140144

145+
# Pretrained & models folders
146+
**/model_checkpoints/
147+
**/pretrained_model_checkpoints/
148+
**/pretrained_models/
149+
141150
# Results folders
142151
**/results/
143152

153+
# Log folders
154+
**/log/
155+
144156
# Mac OS
145157
.DS_Store

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
hooks:
1919
- id: black
2020
types: [python]
21-
21+
additional_dependencies: ['click==8.0.4']
2222
- repo: https://gitlab.com/pycqa/flake8.git
2323
rev: 3.7.9
2424
hooks:

README.md

Lines changed: 70 additions & 42 deletions
Large diffs are not rendered by default.

conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
def pytest_addoption(parser):
2+
parser.addoption("--device", action="store", default="cpu")
3+
4+
5+
def pytest_generate_tests(metafunc):
6+
# This is called for every test. Only get/set command line arguments
7+
# if the argument is specified in the list of test "fixturenames".
8+
option_value = metafunc.config.option.device
9+
if "device" in metafunc.fixturenames and option_value is not None:
10+
metafunc.parametrize("device", [option_value])
11+
12+
113
collect_ignore = ["setup.py"]
214
try:
315
import numba # noqa: F401

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ docstrings. Sphinx natively supports reStructuredText directives.
2020
Automatically generating documentation based on docstrings is not the
2121
core of Sphinx. For this, after much searching, we use better-apidoc.
2222

23+
It seems better-apidoc doesn't use autodoc\_mock\_imports so we currently just
24+
add all extra dependencies to docs-requirements.txt
25+
2326
## Future work
2427

2528
Besides automatic API documentation, Sphinx will facilitate manual prose

docs/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
import sys
1515
import hyperpyyaml
1616

17-
18-
sys.path.insert(0, os.path.abspath("../speechbrain"))
17+
sys.path.insert(-1, os.path.abspath("../"))
1918

2019

2120
# -- Project information -----------------------------------------------------
@@ -69,7 +68,7 @@
6968
autodoc_default_options = {}
7069

7170
# Autodoc mock extra dependencies:
72-
autodoc_mock_imports = ["numba", "sklearn"]
71+
autodoc_mock_imports = []
7372

7473
# Order of API items:
7574
autodoc_member_order = "bysource"

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on GitHub under your own account.
2525
(This creates a copy of SpeechBrain under your account, and GitHub
2626
knows where it came from, and we typically call this "upstream".)
2727
2. Clone your own speechbrain repository.
28-
`git clone https://github.com/<your-account>/speechbrain`
28+
`git clone https://github.com/ <your-account> /speechbrain`
2929
(This downloads the git repository to your machine, git knows where
3030
it came from, and calls it "origin".)
3131
3. Create a branch for each specific feature you are developing.

0 commit comments

Comments
 (0)