Skip to content

Commit

Permalink
adding tests, doc, tutorial, and fixing bugs for speech enhancement #2
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocat93 committed Aug 9, 2024
1 parent ddce3e9 commit 37a48cc
Show file tree
Hide file tree
Showing 154 changed files with 11,567 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"onlyPublishWithReleaseLabel": true,
"baseBranch": "main",
"author": "bot <fabiocat@mit.edu>",
"noVersionPrefix": true,
"plugins": ["git-tag"]
}
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bug Report
description: This is a template for reporting a bug.
# If you want to enable automatic linking to projects,
# uncomment the following line and replace the project ID
# with the ID of your project.
# projects: ["senselab"]
title: 'Bug: '
labels: [bug]
body:
- type: textarea
id: description
attributes:
label: Description
description: Please provide a clear and concise description of the bug.
placeholder: Describe the bug here
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: Please provide detailed steps to reproduce the bug.
placeholder: Describe the steps to reproduce the bug here.
validations:
required: true
- type: textarea
id: expected-results
attributes:
label: Expected Results
description: Please describe what you expected to happen.
placeholder: Describe the expected results here.
validations:
required: true
- type: textarea
id: actual-results
attributes:
label: Actual Results
description: Please describe what actually happened.
placeholder: Describe the actual results here.
validations:
required: true
- type: textarea
id: additional-notes
attributes:
label: Additional Notes
description: Add any additional notes or context here.
placeholder: Add additional notes here.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/development_task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Development Task
description: This is a template for a development task
# If you want to enable automatic linking to projects,
# uncomment the following line and replace the project ID
# with the ID of your project.
# projects: ["senselab"]
title: 'Task: '
labels: [task]
body:
- type: textarea
id: description
attributes:
label: Description
description: What is the task about? Why is it needed? What is the current state, if any?
placeholder: Describe the task here
validations:
required: true
- type: textarea
id: tasks
attributes:
label: Tasks
description: What are the concrete (sub-)tasks that need to be performed?
placeholder: Describe the tasks here.
value: '- [ ] Task 1'
validations:
required: true
- type: textarea
id: freeform-notes
attributes:
label: Freeform Notes
description: Add any additional notes here.
placeholder: Add notes here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/general.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Other
description: This is a template for reporting a general issue.
# If you want to enable automatic linking to projects,
# uncomment the following line and replace the project ID
# with the ID of your project.
# projects: ["senselab"]
title: ''
labels: [other]
body:
- type: textarea
id: description
attributes:
label: Text
description: Please, provide a clear and concise piece of information.
placeholder: Please, provide a clear and concise piece of information.
validations:
required: false
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/support_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Support Request
description: This is a template for submitting a support request.
# If you want to enable automatic linking to projects,
# uncomment the following line and replace the project ID
# with the ID of your project.
# projects: ["senselab"]
title: 'Support: '
labels: [question]
body:
- type: textarea
id: issue-description
attributes:
label: Issue Description
description: Please provide a clear and concise description of the issue you are facing.
placeholder: Describe the issue here
validations:
required: true
- type: textarea
id: environment-details
attributes:
label: Environment Details
description: Please provide details about your environment, including system specifications, software versions, etc.
placeholder: Describe your environment details here.
validations:
required: false
- type: textarea
id: attempted-solutions
attributes:
label: Attempted Solutions
description: Describe any steps you have already taken to resolve the issue.
placeholder: Describe any attempted solutions here.
validations:
required: false
- type: textarea
id: reproduction-steps
attributes:
label: Reproduction Steps
description: If applicable, provide steps to reproduce the issue.
placeholder: Describe the steps to reproduce the issue, if applicable.
validations:
required: false
- type: textarea
id: additional-notes
attributes:
label: Additional Notes
description: Add any other context or screenshots about the support request here.
placeholder: Add additional notes or screenshots here.
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Advanced Pull Request Template

## Description
Briefly describe the changes you've made.

## Related Issue(s)
Link any related issues here.

## Motivation and Context
Explain why these changes are necessary and what problem they solve.

## How Has This Been Tested?
Describe how you have tested these changes.

## Screenshots (if appropriate):
Include any relevant screenshots.

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
- [ ] My code follows the code style of this project.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Basic Pull Request Template

## Description
Briefly describe the changes you've made.
27 changes: 27 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

# Dependabot configuration for updating dependencies and GitHub Actions
version: 2
updates:
# Configuration for Python package updates using pip
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
groups:
production-dependencies:
dependency-type: production
development-dependencies:
dependency-type: development

# Configuration for GitHub Actions updates
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5

# Enable automatic security updates
security_updates: true
95 changes: 95 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Build and Publish Docs

permissions:
contents: write
pages: write
id-token: write

on:
release:
types: [published]

jobs:
build-docs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
include:
- os: ubuntu-latest
python-version: '3.10'
deploy: true # Only deploy from this configuration
outputs:
deploy: ${{ steps.set-deploy-output.outputs.deploy }}
steps:
- uses: actions/checkout@v4
with: # no need for the history
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ffmpeg (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Install ffmpeg (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install ffmpeg
- name: Install ffmpeg (Windows)
if: startsWith(matrix.os, 'windows')
run: choco install ffmpeg
- name: Install pipx and ensure it's up to date
run: |
python -m pip install --upgrade pipx
pipx ensurepath
shell: bash
- name: Install poetry
run: pipx install poetry==1.7.1
shell: bash
- name: Install dependencies with Poetry
run: |
poetry run pip install iso-639
poetry install --with dev,docs
shell: bash
- name: Build docs
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
APP_MODULE_NAME=$(ls -1 src | sort | head -1)
echo "APP_MODULE_NAME: $APP_MODULE_NAME"
poetry run pdoc src/"$APP_MODULE_NAME" -o docs -t docs_style/pdoc-theme --docformat google --favicon https://readthedocs.org/favicon.ico
touch docs/.nojekyll
shell: bash
- name: Determine if deployment is needed
id: set-deploy-output
run: echo "::set-output name=deploy::true"
shell: bash
- uses: actions/upload-artifact@v3
with:
name: documentation
path: docs

publish-docs:
needs: build-docs
if: ${{ needs.build-docs.outputs.deploy == 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # For demonstration, other OSes are commented out
python-version: ['3.10']
include:
- os: ubuntu-latest
python-version: '3.10'
deploy: true # Only deploy from this configuration
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: documentation
path: docs
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: docs
43 changes: 43 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
pypi-release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Includes getting tags
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pipx and ensure it's up to date
run: |
python -m pip install --upgrade pipx
pipx ensurepath
shell: bash
- name: Install poetry
run: pipx install poetry
shell: bash
- name: Install poetry dynamic versioning tool
run: pipx inject poetry "poetry-dynamic-versioning[plugin]"
shell: bash
- name: Build package
run: poetry build
shell: bash
- name: Configure Poetry PyPI token
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
shell: bash
- name: Publish to PyPI
env:
POETRY_REQUESTS_TIMEOUT: 120
run: poetry publish
shell: bash
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Auto-release

on:
push:
branches:
- main

env:
AUTO_VERSION: v11.1.2

jobs:
auto-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Prepare repository
# Fetch full git history and tags
run: git fetch --unshallow --tags

- name: Unset header
# checkout@v2 adds a header that makes branch protection report errors
# because the Github action bot is not a collaborator on the repo
run: git config --local --unset http.https://github.com/.extraheader

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Download auto
run: |
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto
- name: Create release
run: |
~/auto shipit -vv
env:
GH_TOKEN: ${{ secrets.AUTO_ORG_TOKEN }}
Loading

0 comments on commit 37a48cc

Please sign in to comment.