Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jan 16, 2025
1 parent e7f548e commit 5d58012
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 85 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,5 @@ tests/localfile/speaker-test.json
.aider*
transcribe_anything/WHISPER_OPTIONS.json
!.aider.conf.yml
!.aiderignore
!.aiderignore
activate
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"python.analysis.extraPaths": [
"."
],
"python.pythonPath": "venv/bin/python",
"terminal.integrated.env.windows": {
"VIRTUAL_ENV": "${workspaceFolder}/.venv"
},
"python.defaultInterpreterPath": "venv/bin/python",
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
Expand Down
20 changes: 20 additions & 0 deletions clean
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -x
rm -rf venv
rm -rf .venv
rm -rf .env_*
rm -rf transcribe_anything/venv
# remove all *.pyc files
find . -name "*.pyc" -exec rm -rf {} \;
# remove all *.egg files
find . -name "*.egg" -exec rm -rf {} \;
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -rf .eggs
rm -rf .tox
rm -rf .cache
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .coverage
rm -rf .iso_env
27 changes: 27 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -e
uv venv --python 3.11
uv pip install -r requirements.testing.txt
uv pip install .
# This is needed to force the installation to finalize.
uv run python -c "import os; _ = os.getcwd()"
set +e

# if ./activate exists, remove it
if [ -f activate ]; then
rm activate
fi
# symlink activate to .venv/bin/activate on linux/mac and .venv/Scripts/activate on windows
if [[ "$OSTYPE" == "linux-gnu"* || "$OSTYPE" == "darwin"* ]]; then
ln -s .venv/bin/activate activate
else
ln -s .venv/Scripts/activate activate
fi

# if on windows symlink .venv/bin -> .venv/Scripts
if [[ "$OSTYPE" == "msys" ]]; then
if [ -d .venv/bin ]; then
rm -rf .venv/Scripts
ln -s bin .venv/Scripts
fi
fi
7 changes: 0 additions & 7 deletions install.sh

This file was deleted.

9 changes: 3 additions & 6 deletions lint
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#! /bin/bash
set -e


echo activating venv...
. ./activate.sh

set -e

echo installing pip dependencies
pip install -r requirements.txt

Expand All @@ -24,11 +26,6 @@ else
ruff check transcribe_anything tests
fi

# echo running flake8...
# flake8 transcribe_anything tests install_cuda.py

echo running pylint...
pylint transcribe_anything tests --disable=R0801

echo running mypy...
mypy transcribe_anything tests --exclude 'transcribe_anything/venv'
70 changes: 0 additions & 70 deletions make_venv.py

This file was deleted.

0 comments on commit 5d58012

Please sign in to comment.