Skip to content

Commit f99482c

Browse files
authored
Merge pull request #234 from pierreaubert/develop
Develop
2 parents 1b68120 + f39135e commit f99482c

File tree

2,232 files changed

+67935
-25880
lines changed

Some content is hidden

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

2,232 files changed

+67935
-25880
lines changed

.github/workflows/pythonapp.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,25 @@ jobs:
1717
uses: actions/setup-python@v3
1818
with:
1919
python-version: "3.10.6"
20+
- run: which python
21+
- run: pwd
22+
- run: ls -la
2023
- name: Install dependencies
2124
run: |
2225
python -m pip install --upgrade pip
26+
sudo apt-get install -y build-essential
2327
pip install -r requirements.txt
24-
pip install -r requirements-tests.txt
28+
pip install -r requirements-test.txt
2529
- name: Lint with flake8
2630
run: |
2731
pip install flake8
28-
# stop the build if there are Python syntax errors or undefined names
2932
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude spinorama-venv
30-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31-
# flake8 . --count --exit-zero --max-complexity=13 --max-line-length=127 --statistics
3233
- name: Test metadata file
3334
run: |
3435
PYTHONPATH=src ./check_meta.py
36+
- name: Compilation of cython files
37+
run: |
38+
PYTHONPATH=src cd src/spinorama && python setup.py build_ext --inplace && ln -s c_compute_scores.cpython-*.so c_compute_scores.so
3539
- name: Test with pytest
3640
run: |
3741
pip install pytest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ asrbook.toc
2222
asrbook.log
2323
asrbook.pdf
2424
book/stats
25+
flycheck_*.*
2526
node_modules
2627
geckodriver.log
2728
package-lock.json
@@ -42,3 +43,5 @@ cache.*.h5
4243
.vscode
4344
.cache
4445
.sass-cache
46+
build
47+
*.so

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# Format style used to check logging format string. `old` means using %
44
# formatting, `new` is for `{}` formatting,and `fstr` is for f-strings.
5-
logging-format-style=new
5+
logging-format-style=old

book/generate_book.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,16 @@
4747
# load all metadata from generated json file
4848
json_filename = "../docs/assets/metadata.json"
4949
if not os.path.exists(json_filename):
50-
logging.fatal("Cannot find {0}".format(json_filename))
50+
logging.fatal("Cannot find %s", json_filename)
5151
sys.exit(1)
5252

5353
meta = None
5454
with open(json_filename, "r") as f:
5555
meta = json.load(f)
5656

5757
def sort_meta(s):
58-
if "pref_rating" in s.keys():
59-
if "pref_score" in s["pref_rating"].keys():
60-
return s["pref_rating"]["pref_score"]
58+
if "pref_rating" in s and "pref_score" in s["pref_rating"]:
59+
return s["pref_rating"]["pref_score"]
6160
return -1
6261

6362
keys_sorted = sorted(meta, key=lambda a: sort_meta(meta[a]), reverse=True)
@@ -77,7 +76,7 @@ def sort_meta(s):
7776
# write index.html
7877
for template in ("asrbook",):
7978
name = "{0}.tex".format(template)
80-
logging.info("Write {0} ({1} speakers found".format(name, len(speakers.keys())))
79+
logging.info("Write %s (%d speakers found", name, len(speakers.keys()))
8180
template_tex = mako_templates.get_template(name)
8281

8382
with open("tmp/{0}".format(name), "w") as f:

check_html.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ for d in docs/*.html; do
2424
status=1;
2525
echo "$d is empty (ERROR)";
2626
else
27-
msg=$(./node_modules/.bin/html-validator --format=html --file="$d");
27+
msg=$(./node_modules/.bin/w3c-html-validator --quiet "$d");
2828
if test -n "$msg"; then
2929
status=1;
3030
echo "Linting $d (ERROR)";
31-
./node_modules/.bin/html-validator --format=html --file="$d" --verbose;
31+
./node_modules/.bin/w3c-html-validator "$d";
3232
fi
3333
fi
3434
done

0 commit comments

Comments
 (0)