-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into microphone-selection
- Loading branch information
Showing
5 changed files
with
139 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Code Quality | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "master" branch | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Cancel previous actions from the same PR or branch except 'master' branch. | ||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. | ||
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'master' && format('::{0}', github.run_id) || ''}} | ||
cancel-in-progress: ${{ github.ref_name != 'master' }} | ||
|
||
jobs: | ||
ruff: | ||
needs: [] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Get all changed and modified files. | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
list-files: shell | ||
filters: | | ||
python: | ||
- added|modified: 'assemblyai/**/*.py' | ||
# Get count of filtered files. | ||
- run: | | ||
if [ '${{ steps.filter.outputs.python_files }}' != '' ]; then | ||
echo count=$(ls ${{ steps.filter.outputs.python_files }} | wc -l) >> "$GITHUB_OUTPUT" | ||
else | ||
echo count=0 >> "$GITHUB_OUTPUT" | ||
fi | ||
id: counter | ||
if: ${{ steps.filter.outputs.python == 'true' }} | ||
shell: bash | ||
name: Run count files | ||
# Run ruff on filtered files if there are any. | ||
- uses: chartboost/ruff-action@v1 | ||
name: Run 'ruff format --check --config ./ruff.toml' | ||
if: ${{ steps.counter.outputs.count > 0 }} | ||
with: | ||
version: 0.3.5 | ||
args: 'format --check --config ./ruff.toml' | ||
src: ${{ steps.filter.outputs.python_files }} | ||
- uses: chartboost/ruff-action@v1 | ||
name: Run 'ruff' | ||
if: ${{ steps.counter.outputs.count > 0 }} | ||
with: | ||
version: 0.3.5 | ||
args: '--config ./ruff.toml' | ||
src: ${{ steps.filter.outputs.python_files }} | ||
|
||
mypy: | ||
needs: [] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Get all changed and modified files. | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
list-files: shell | ||
filters: | | ||
python: | ||
- added|modified: 'assemblyai/**/*.py' | ||
# Get count of filtered files. | ||
- run: | | ||
if [ '${{ steps.filter.outputs.python_files }}' != '' ]; then | ||
echo count=$(ls ${{ steps.filter.outputs.python_files }} | wc -l) >> "$GITHUB_OUTPUT" | ||
else | ||
echo count=0 >> "$GITHUB_OUTPUT" | ||
fi | ||
id: counter | ||
if: ${{ steps.filter.outputs.python == 'true' }} | ||
shell: bash | ||
name: Run count files | ||
# Run mypy on filtered files if there are any. | ||
- uses: actions/setup-python@v4 | ||
if: ${{ steps.counter.outputs.count > 0 }} | ||
with: | ||
python-version: '3.9' | ||
- run: pip install mypy==1.5.1 | ||
if: ${{ steps.counter.outputs.count > 0 }} | ||
- run: mypy ${{ steps.filter.outputs.python_files }} --follow-imports=silent --ignore-missing-imports | ||
if: ${{ steps.counter.outputs.count > 0 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.32.0" | ||
__version__ = "0.33.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[lint] | ||
# Enable default rules plus I (isort) and S101 (check for asserts). | ||
select = ["I", "E4", "E7", "E9", "F", "S101"] | ||
|
||
[lint.per-file-ignores] | ||
# Ignore import violations in all init files. | ||
"__init__.py" = ["E402"] | ||
# Ignore assert checks in all test files. | ||
"**/*test*.py" = ["S101"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters