Skip to content

Commit 955afe1

Browse files
authored
Merge pull request #129 from ReadAlongs/master
It's time for a release
2 parents 8d5423f + dedb065 commit 955afe1

File tree

119 files changed

+3855
-1656
lines changed

Some content is hidden

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

119 files changed

+3855
-1656
lines changed

.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
02babfb698a8dfbeb87f5be6ad21172eba82bc05
2+
ee480fbd24c2d0b1730f5ae4a6be6c6bc842eb94
3+
1862060ef717c05080c9b47497dc79328563b072
4+
3416098be96c2e8efee5c5ce1e935711575d2e47
5+
13435428e87005f168db210019759bf7578ec06f

.github/workflows/pythonpublish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
deploy:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Set up Python
14-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v4
1515
with:
1616
python-version: "3.x"
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip
20-
pip install setuptools wheel twine
20+
pip install build twine
2121
- name: Build and publish
2222
env:
2323
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2424
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2525
run: |
26-
python setup.py sdist bdist_wheel
26+
python -m build --sdist --wheel
2727
twine upload dist/*
2828
- name: Determine tag
2929
id: determine_tag

.github/workflows/tests.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Run Tests
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
# #no-ci in the commit log flags commit we don't want CI-validated
9+
if: ${{ !contains(github.event.head_commit.message, '#no-ci') }}
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- uses: FedericoCarboni/setup-ffmpeg@v2
14+
id: setup-ffmpeg
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.7"
20+
cache: "pip"
21+
22+
- name: Install Python dependencies
23+
run: |
24+
# Keep pip up to date
25+
python -m pip install --upgrade pip
26+
# Some dependencies are built using wheel
27+
pip install wheel
28+
# Install all Python dependencies in just one pip call, including Studio itself
29+
pip install -r requirements.txt \
30+
-r requirements.dev.txt \
31+
-r requirements.ci.txt \
32+
-e .
33+
34+
- name: Run tests
35+
run: |
36+
gunicorn readalongs.app:app --bind 0.0.0.0:5000 --daemon
37+
cd test && coverage run run.py prod && coverage xml
38+
39+
- name: Nitpicking
40+
run: |
41+
# coding style: we want black compliance
42+
find . -name \*.py | xargs black --check
43+
# Legal check: make sure we don't have or introduce GPL dependencies
44+
if pip-licenses | grep -v 'Artistic License' | grep -v LGPL | grep GNU; then echo 'Please avoid introducing *GPL dependencies'; false; fi
45+
46+
- uses: codecov/codecov-action@v3
47+
with:
48+
directory: ./test
49+
token: ${{ secrets.CODECOV_TOKEN }} # optional but apparently makes upload more reliable
50+
fail_ci_if_error: false # too many upload errors to keep "true"
51+
52+
test-on-windows:
53+
runs-on: windows-latest
54+
if: ${{ !contains(github.event.head_commit.message, '#no-ci') }}
55+
steps:
56+
- uses: actions/checkout@v3
57+
58+
- uses: FedericoCarboni/setup-ffmpeg@v2
59+
id: setup-ffmpeg
60+
61+
- name: Set up Python
62+
uses: actions/setup-python@v4
63+
with:
64+
python-version: "3.7"
65+
cache: "pip"
66+
67+
- name: Install Python dependencies
68+
run: |
69+
python -m pip install --upgrade pip
70+
pip install wheel
71+
pip install -r requirements.txt `
72+
-r requirements.dev.txt `
73+
-r requirements.ci.txt `
74+
-e .
75+
76+
- name: Run tests on Windows
77+
run: cd test && python run.py prod

.gitlint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[general]
2+
# Enable conventional commit linting
3+
contrib=contrib-title-conventional-commits
4+
5+
# Ignore any data sent to gitlint via stdin (helpful on Windows)
6+
ignore-stdin=true
7+
8+
# We don't require a body, just a title, even though a body is also a good idea
9+
ignore=body-is-missing

.pre-commit-config.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ repos:
1212
- id: flake8
1313
- repo: local
1414
# Using local repos because these won't work for me from remote repo -EJ
15+
# They're also more convenient because we install them via requirements.dev.txt
16+
# and they are then available on the command line as well as in pre-commit.
1517
hooks:
1618
- id: isort
1719
name: isort
@@ -25,7 +27,9 @@ repos:
2527
language: system
2628
types: [python]
2729
stages: [commit]
28-
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: 'v0.782' # Use the sha / tag you want to point at
30-
hooks:
3130
- id: mypy
31+
name: mypy
32+
entry: mypy
33+
language: system
34+
types: [python]
35+
stages: [commit]

.pylintrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
[MASTER]
22
# A lot of test cases depend on etree, let's allow pylint to load it
33
extension-pkg-allow-list=lxml.etree
4-
# We use isort for sorting our imports, so nevermind what pylint thinks
5-
disable=wrong-import-order
4+
5+
disable=
6+
# We use isort for sorting our imports, so nevermind what pylint thinks
7+
wrong-import-order,
8+
# I find the "unnecessary" else makes code more readable
9+
no-else-return,
10+
# We use single letter e for exception, f for file handles
11+
invalid-name
12+
613
# Add . to the PYTHONPATH so pylint knows test cases can import basic_test_case
714
init-hook="import sys; sys.path.append('.')"

.readthedocs.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
version: 2
22

33
build:
4-
os: ubuntu-20.04
5-
tools:
6-
python: "3.7"
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.7"
7+
jobs:
8+
post_install:
9+
- echo "Installing Studio itself in its current state"
10+
- which pip python
11+
- pip install -e .
712

813
sphinx:
9-
configuration: docs/conf.py
14+
configuration: docs/conf.py
1015

1116
python:
12-
install:
13-
- requirements: docs/requirements.txt
17+
install:
18+
- requirements: docs/requirements.txt

CITATION.cff

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
cff-version: 1.2.0
2+
message: >-
3+
If you use this software in a project of yours and write about it, please
4+
cite our SIGUL 2022 paper using the following citation data.
5+
title: ReadAlongs Studio
6+
url: https://github.com/ReadAlongs/Studio
7+
preferred-citation:
8+
type: conference-paper
9+
title: >-
10+
ReadAlong Studio: Practical Zero-Shot Text-Speech Alignment for Indigenous
11+
Language Audiobooks
12+
authors:
13+
- given-names: Patrick
14+
family-names: Littell
15+
email: Patrick.Littell@nrc-cnrc.gc.ca
16+
affiliation: National Research Council Canada
17+
- given-names: Eric
18+
family-names: Joanis
19+
email: Eric.Joanis@nrc-cnrc.gc.ca
20+
affiliation: National Research Council Canada
21+
- given-names: Aidan
22+
family-names: Pine
23+
email: Aidan.Pine@nrc-cnrc.gc.ca
24+
affiliation: National Research Council Canada
25+
- given-names: Marc
26+
family-names: Tessier
27+
email: Marc.Tessier@nrc-cnrc.gc.ca
28+
affiliation: National Research Council Canada
29+
- given-names: David
30+
family-names: Huggins-Daines
31+
email: dhdaines@gmail.com
32+
affiliation: Independent Researcher
33+
- given-names: Delasie
34+
family-names: Torkornoo
35+
email: delasie.torkornoo@carleton.ca
36+
affiliation: Carleton University
37+
collection-title: Proceedings of SIGUL2022 @LREC2022
38+
start: 23
39+
end: 32
40+
year: 2022
41+
month: 6
42+
publisher:
43+
name: European Language Resources Assiciation (ELRA)
44+
location:
45+
name: Marseille
46+
url: http://www.lrec-conf.org/proceedings/lrec2022/workshops/SIGUL/pdf/2022.sigul-1.4.pdf

Contributing.md

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ commits.
1616
Run these commands in each of your sandboxes to enable our pre-commit hooks and commitlint:
1717

1818
```sh
19+
pip install -r requirements.dev.txt
1920
pre-commit install
20-
npm install
21+
gitlint install-hook
2122
```
2223

2324
## Pre-commit hooks
2425

2526
The ReadAlong Studio team has agreed to systematically use a number of pre-commit hooks to
2627
normalize formatting of code. You need to install and enable pre-commit to have these used
27-
when you do your own commits.
28+
automatically when you do your own commits.
2829

2930
Pre-commit hooks enabled:
3031
- check-yaml validates YAML files
@@ -60,11 +61,11 @@ don't forget to do so when you clone a new sandbox!
6061

6162
## commitlint
6263

63-
The team has also agreed to use commitlint-style commit messages. Install and enable
64-
[commitlint](https://github.com/conventional-changelog/commitlint) to have your commits
65-
validated systematically.
64+
The team has also agreed to use [Conventional Commits](https://www.conventionalcommits.org/).
65+
Install and enable [gitlint](https://jorisroovers.com/gitlint/) to have your
66+
commit messages scanned automatically.
6667

67-
Commitlint commits look like this:
68+
Convential commits look like this:
6869

6970
type(optional-scope): subject (i.e., short description)
7071

@@ -107,32 +108,14 @@ These rules are inspired by these commit formatting guides:
107108

108109
### Enabling commitlint
109110

110-
We run commitlint on each commit message that you write by enabling the commit-msg hook in
111-
Git. It is run via [husky](https://www.npmjs.com/package/husky), which is a JS Git hook
112-
manager, and you need Node to run it.
113-
114-
If you don't already use Node, this is a bit more work to install that the pre-commit
115-
hooks above, but please take a moment to do this:
111+
You can run commitlint on each commit message that you write by enabling the
112+
commit-msg hook in Git.
116113

117-
- If you don't already use Node or nvm, or if you don't have admin access to the system
118-
version of node, install nvm in your ~/.nvm folder:
119-
```sh
120-
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
121-
```
122-
This will add a few lines to your `.bashrc` file, which you'll need to execute now,
123-
possibly by starting a new shell.
124-
125-
- Install Node:
126-
```sh
127-
nvm install node
128-
```
114+
Run this command in your g2p sandbox to install and enable the commit-msg hook:
129115

130-
- In your ReadAlong/Studio sandbox, install the husky commit-msg hook using npm, the node
131-
package manager you just installed using nvm. The file `package.json` in Studio is what
132-
tells npm to install husky as a pre-commit hook, and also what tells husky to invoke
133-
commitlint on your commit messages.
134116
```sh
135-
npm install
117+
pip install -r requirements/requirements.dev.txt
118+
gitlint install-hook
136119
```
137120

138121
- Now, next time you make a change and commit it, your commit log will be checked:

0 commit comments

Comments
 (0)