Skip to content

Commit

Permalink
Class refactor (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe authored Nov 9, 2021
1 parent a2b0120 commit 31bda03
Show file tree
Hide file tree
Showing 217 changed files with 24,246 additions and 13,826 deletions.
38 changes: 0 additions & 38 deletions .coveragerc

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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:
build:
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions tox-conda twine build setuptools setuptools_scm[toml] wheel
- name: sdist
run: python setup.py sdist
- name: Test with tox
run: tox
- name: "Upload coverage to Codecov"
uses: "codecov/[email protected]"
with:
file: ./coverage.xml
fail_ci_if_error: true
- 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
continue-on-error: true
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.

5 changes: 5 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,7 @@ target/
*.dll

\.pytest_cache/

docs/source/api/

montreal_forced_aligner/_version.py
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
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

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

sphinx:
configuration: docs/source/conf.py

conda:
environment: rtd_environment.yml
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/api

prune dist
prune build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Montreal Forced Aligner

[![Build Status](https://travis-ci.com/MontrealCorpusTools/Montreal-Forced-Aligner.svg?branch=main)](https://travis-ci.com/MontrealCorpusTools/Montreal-Forced-Aligner)
[![Coverage Status](https://coveralls.io/repos/github/MontrealCorpusTools/Montreal-Forced-Aligner/badge.svg?branch=main)](https://coveralls.io/github/MontrealCorpusTools/Montreal-Forced-Aligner?branch=main)
[![codecov](https://codecov.io/gh/MontrealCorpusTools/Montreal-Forced-Aligner/branch/master/graph/badge.svg?token=GgfM9GXFJ4)](https://codecov.io/gh/MontrealCorpusTools/Montreal-Forced-Aligner)
[![Documentation Status](https://readthedocs.org/projects/montreal-forced-aligner/badge/?version=latest)](http://montreal-forced-aligner.readthedocs.io/en/latest/?badge=latest)
[![Interrogate Status](https://github.com/MontrealCorpusTools/montreal-forced-aligner/docs/source/_static/interrogate_badge.svg)](https://github.com/MontrealCorpusTools/montreal-forced-aligner/docs/source/_static/interrogate_badge.svg)
[![DOI](https://zenodo.org/badge/44983969.svg)](https://zenodo.org/badge/latestdoi/44983969)

The Montreal Forced Aligner is a command line utility for performing forced alignment of speech datasets using Kaldi (http://kaldi-asr.org/).
Expand Down
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

0 comments on commit 31bda03

Please sign in to comment.