-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into upgrade-cartesia-lib
- Loading branch information
Showing
67 changed files
with
1,228 additions
and
644 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 |
---|---|---|
|
@@ -6,51 +6,87 @@ on: | |
pull_request: | ||
branches: [main, vocode-core-0.1.0] | ||
|
||
env: | ||
poetry-version: "1.8.3" | ||
|
||
jobs: | ||
build: | ||
lint: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
poetry-version: | ||
- "1.7.1" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install ffmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Set up Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ env.poetry-version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install -E all | ||
|
||
- name: Run mypy | ||
run: | | ||
poetry run mypy -p vocode | ||
poetry run mypy -p quickstarts | ||
poetry run mypy -p playground | ||
- name: Run black | ||
if: success() || failure() | ||
run: poetry run black --check . | ||
|
||
- name: Run isort | ||
shell: bash | ||
if: success() || failure() | ||
run: poetry run isort --check . | ||
|
||
pytest: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install ffmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Install poetry ${{ matrix.poetry-version }} | ||
run: | | ||
python -m ensurepip | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry==${{ matrix.poetry-version }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: View poetry --help | ||
run: poetry --help | ||
- name: Set up Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ env.poetry-version }} | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: python -m poetry install -E all | ||
|
||
- name: Lint with mypy | ||
run: | | ||
python -m poetry run mypy -p vocode | ||
python -m poetry run mypy -p quickstarts | ||
python -m poetry run mypy -p playground | ||
run: poetry install -E all | ||
|
||
- name: Test with pytest | ||
run: | | ||
python -m poetry run python -m pytest -v tests | ||
poetry run pytest -v tests |
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,13 +1,41 @@ | ||
default_language_version: | ||
python: python3.10 | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
args: [--ignore-missing-imports, ./] | ||
language: system | ||
pass_filenames: false | ||
stages: [pre-push] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
- id: trailing-whitespace | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: detect-private-key | ||
- id: mixed-line-ending | ||
args: | ||
- --fix=lf | ||
|
||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.13.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: | ||
- --autofix | ||
- --preserve-quotes | ||
- --indent=2 | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: | ||
- --settings-path=./pyproject.toml | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
args: | ||
- --config=./pyproject.toml |
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,8 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.black-formatter", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance" | ||
] | ||
} |
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,16 @@ | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "explicit" | ||
} | ||
}, | ||
"black-formatter.args": ["--config", "./pyproject.toml"], | ||
"isort.args": ["--settings-path", "./pyproject.toml"], | ||
"rewrap.autoWrap.enabled": true, | ||
"rewrap.wrappingColumn": 100, | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"isort.check": true | ||
} |
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
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
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
Oops, something went wrong.