Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class refactor #346

Merged
merged 34 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dfc460f
Initial refactor
mmcauliffe Oct 28, 2021
55ee104
Refactor and documentation push
mmcauliffe Nov 8, 2021
0ad0e68
Update actions
mmcauliffe Nov 8, 2021
bbe3442
update actions
mmcauliffe Nov 8, 2021
089be0d
update order of actions
mmcauliffe Nov 8, 2021
cea6f7e
Update version check
mmcauliffe Nov 8, 2021
2403bd5
Update actions
mmcauliffe Nov 8, 2021
8421348
Update version checking
mmcauliffe Nov 8, 2021
cc81155
update versions
mmcauliffe Nov 8, 2021
7dde328
update versions
mmcauliffe Nov 8, 2021
61a06de
Fix download issue
mmcauliffe Nov 8, 2021
f6a4da7
Fix import
mmcauliffe Nov 8, 2021
09f1429
Update error detection
mmcauliffe Nov 8, 2021
1018d22
Update error detection
mmcauliffe Nov 8, 2021
3e02a21
Update error detection
mmcauliffe Nov 8, 2021
ba0532f
Update error detection
mmcauliffe Nov 8, 2021
cbcdffb
Update error detection
mmcauliffe Nov 8, 2021
9e6e5cb
Update error detection
mmcauliffe Nov 8, 2021
b4a7b09
Update error detection
mmcauliffe Nov 8, 2021
7459b8d
update fstconvert
mmcauliffe Nov 9, 2021
65d4874
Fix tests?
mmcauliffe Nov 9, 2021
22289dd
Fix tests?
mmcauliffe Nov 9, 2021
d61926e
Debugging
mmcauliffe Nov 9, 2021
2f03c6e
fix transcribe test
mmcauliffe Nov 9, 2021
6286707
fix segments test
mmcauliffe Nov 9, 2021
a7cf8a7
fix segments test
mmcauliffe Nov 9, 2021
32e32c7
Update github actions
mmcauliffe Nov 9, 2021
f2e6c90
Update github actions
mmcauliffe Nov 9, 2021
bfd21b6
Update RTD config
mmcauliffe Nov 9, 2021
668847a
Update RTD config
mmcauliffe Nov 9, 2021
ba60d7d
Update RTD config
mmcauliffe Nov 9, 2021
aa2d714
Update RTD config
mmcauliffe Nov 9, 2021
68aeaa7
Update RTD config
mmcauliffe Nov 9, 2021
f4e2372
Pass through docs
mmcauliffe Nov 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor and documentation push
  • Loading branch information
mmcauliffe committed Nov 8, 2021
commit 55ee1041eaf66d47972f1ccc586844cb613cb01a
38 changes: 0 additions & 38 deletions .coveragerc

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow rebuilds via API.
repository_dispatch:
types: rebuild


concurrency:
group: run_tests-${{ github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
name: "Pre-commit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Locally install interrogate
run: python -m pip install .
- name: Run pre-commit
uses: pre-commit/action@v2.0.3
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools setuptools_scm[toml] wheel
pip install tox tox-gh-actions tox-conda
- name: Test with tox
run: tox
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v2.0.3"
with:
file: ./coverage.xml
fail_ci_if_error: true

package:
name: "Build & Verify Package on Ubuntu"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.8"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
38 changes: 0 additions & 38 deletions .github/workflows/publish-to-test-pypi.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pretrained_models/
*.so

# Distribution / packaging
montreal_forced_aligner/version.py
.Python
env/
build/
Expand Down Expand Up @@ -76,3 +77,5 @@ target/
*.dll

\.pytest_cache/

docs/source/api/
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
default_language_version:
python: python3.8
repos:
- repo: https://github.com/psf/black
rev: 21.8b0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==20.8b1
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear == 20.1.4
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
hooks:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.19.0
hooks:
- id: setup-cfg-fmt
args:
- --min-py3-version
- "3.5"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: mixed-line-ending
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"

sphinx:
configuration: docs/source/conf.py

conda:
environment: environment.yml

python:
install:
- method: pip
path: .
extra_requirements:
- docs
66 changes: 0 additions & 66 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
include LICENSE *.md pyproject.toml *.yml *.yaml *.ini *.txt
graft .github

# Source
recursive-include montreal_forced_aligner *.py
recursive-include montreal_forced_aligner *.yaml

# Tests
include tox.ini tests/conftest.py
recursive-include tests *.py
recursive-include tests *.txt *.lab *.TextGrid
recursive-include tests *.flac *.wav *.mp3
recursive-include tests *.yaml
recursive-include tests *.zip *.arpa
recursive-include tests topo *.fst *.int
prune tests/data/generated

# Docs
recursive-include docs *.svg
recursive-include docs *.py
recursive-include docs *.pdf
recursive-include docs *.png
recursive-include docs *.rst
recursive-include docs *.css
recursive-include docs *.html
include docs/Makefile
include docs/make.bat
prune docs/build
prune docs/source/generated

prune dist
prune build
12 changes: 0 additions & 12 deletions continuous-integration/travis/install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ diagrams:
sed -i '' '/^def/,/class/{/class/!d;}' ../montreal_forced_aligner/generalUML.py; sed -i '' '/^import/,/class/{/class/!d;}' ../aligner/generalUML.py
$(PYREVERSE) -o svg -AS -k ../montreal_forced_aligner/generalUML.py
mv classes.svg $(BUILDDIR)/generalUML.svg; chmod 777 $(BUILDDIR)/generalUML.svg; rm ../montreal_forced_aligner/generalUML.py
mv $(BUILDDIR)/generalUML.svg $(BUILDDIR)/html/_images
mv $(BUILDDIR)/generalUML.svg $(BUILDDIR)/html/_images

# UML class diagram for aligner API
cat ../montreal_forced_aligner/aligner/pretrained.py ../montreal_forced_aligner/aligner/trainable.py ../montreal_forced_aligner/aligner/base.py > ../aligner/all_aligner.py
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/MFA_default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/_static/MFA_dnn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/_static/MFA_dnn_ivectors.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading