-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from pavelzbornik/dev
bulk update of the app
- Loading branch information
Showing
61 changed files
with
4,911 additions
and
3,765 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,37 @@ | ||
|
||
{ | ||
"name": "WhisperX-FastAPI", | ||
"context": "..", | ||
"dockerFile": "../dockerfile", | ||
"runArgs": ["--gpus", "all"], | ||
|
||
"forwardPorts": [8000], | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"github.copilot", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"github.vscode-github-actions", | ||
"george-alisson.html-preview-vscode", | ||
"ms-python.isort", | ||
"prettier.prettier-vscode", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"settings": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.formatOnSave": true | ||
} | ||
} | ||
}, | ||
"postCreateCommand": "pip install -r requirements/dev.txt && pre-commit install", | ||
"remoteUser": "root" | ||
} |
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,9 +1,9 @@ | ||
.env | ||
__pycache__ | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.Python | ||
.venv | ||
.pytest_cache | ||
.git | ||
.env | ||
__pycache__ | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.Python | ||
.venv | ||
.pytest_cache | ||
.git |
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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,38 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: false | ||
docker-images: false | ||
swap-storage: true | ||
- name: Build and export to Docker | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
load: true | ||
push: false | ||
tags: whisperx-fastapi:latest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
- name: Run tests | ||
run: docker run --env MY_ENV_VAR=${{ secrets.HF_TOKEN }} --env WHISPER_MODEL=tiny --env DEFAULT_LANG=en --env DEVICE=cpu --env COMPUTE_TYPE=int8 --entrypoint pytest whisperx-fastapi:latest |
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,18 @@ | ||
# Copyright © 2022 Gitleaks LLC - All Rights Reserved. | ||
# You may use this code under the terms of the GITLEAKS-ACTION END-USER LICENSE AGREEMENT. | ||
# You should have received a copy of the GITLEAKS-ACTION END-USER LICENSE AGREEMENT with this file. | ||
# If not, please visit https://gitleaks.io/COMMERCIAL-LICENSE.txt. | ||
|
||
name: gitleaks | ||
on: [pull_request, push, workflow_dispatch] | ||
jobs: | ||
scan: | ||
name: gitleaks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: gitleaks/gitleaks-action@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,4 +1,5 @@ | ||
.env | ||
__pycache__ | ||
*.ipynb | ||
*.db | ||
.env | ||
__pycache__ | ||
*.ipynb | ||
*.db | ||
*.env |
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,7 @@ | ||
|
||
title = "gitleaks config" | ||
[[rules]] | ||
id = "generic-api-key" | ||
description = "Generic API Key" | ||
regex = '''(?i)(api[_-]?key|secret|token)[\s]*[:=][\s]*['"]?[a-z0-9]{32,45}['"]?''' | ||
tags = ["key", "api", "token"] |
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,4 @@ | ||
{ | ||
"MD013": false, | ||
"MD029": false | ||
} |
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,61 @@ | ||
# .pre-commit-config.yaml | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 # Use the latest tag from the repository | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: detect-private-key | ||
- id: requirements-txt-fixer | ||
# Add black for Python code formatting | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 # Use the latest stable version of Black | ||
hooks: | ||
- id: black | ||
# Add isort for sorting imports in Python | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
# Add pydocstyle for checking docstrings | ||
- repo: https://github.com/PyCQA/pydocstyle | ||
rev: 6.3.0 # Use the latest stable version of pydocstyle | ||
hooks: | ||
- id: pydocstyle | ||
# Lint: YAML | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"] | ||
files: \.(yaml|yml)$ | ||
- repo: https://github.com/google/yamlfmt | ||
rev: v0.10.0 | ||
hooks: | ||
- id: yamlfmt | ||
# Lint: Shell scripts | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.10.0.1 | ||
hooks: | ||
- id: shellcheck | ||
args: ["-x"] | ||
# Lint: Markdown | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.42.0 | ||
hooks: | ||
- id: markdownlint | ||
args: ["--fix", "--config", ".markdownlint.json"] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli | ||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.19.0 | ||
hooks: | ||
- id: gitleaks | ||
args: ["--source", ".", "--config", ".gitleaks.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 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.analysis.extraPaths": ["app"], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
Oops, something went wrong.