Skip to content

Commit 36109a1

Browse files
authored
Merge pull request #13 from codefortulsa/refactor-actions
create common environment action
2 parents 098013d + 9afd36d commit 36109a1

File tree

6 files changed

+43
-38
lines changed

6 files changed

+43
-38
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Setup Python with Poetry'
2+
description: 'Sets up Python environment with Poetry and installs dependencies'
3+
4+
inputs:
5+
python-version:
6+
description: 'Python version to set up'
7+
required: false
8+
default: '3.11'
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: ${{ inputs.python-version }}
17+
18+
- name: Install Poetry
19+
uses: abatilo/actions-poetry@v2
20+
21+
- name: Configure Poetry
22+
run: poetry config virtualenvs.create true
23+
shell: bash
24+
25+
- name: Load cached Poetry dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.cache/pypoetry/virtualenvs
29+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
30+
restore-keys: |
31+
poetry-${{ runner.os }}-
32+
33+
- name: Install dependencies
34+
run: poetry install --no-interaction --no-root
35+
shell: bash

.github/workflows/run-tests.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,10 @@ jobs:
1313
- name: Check out repository
1414
uses: actions/checkout@v4
1515

16-
- name: Set up Python
17-
uses: actions/setup-python@v4
16+
- name: Setup Python environment
17+
uses: ./.github/actions/setup-poetry-env
1818
with:
19-
python-version: '3.11' # Adjust as needed
20-
21-
- name: Install Poetry
22-
uses: abatilo/actions-poetry@v2
23-
24-
- name: Configure Poetry
25-
run: poetry config virtualenvs.create true
26-
27-
- name: Load cached Poetry dependencies
28-
uses: actions/cache@v3
29-
with:
30-
path: ~/.cache/pypoetry/virtualenvs
31-
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
32-
restore-keys: |
33-
poetry-${{ runner.os }}-
34-
35-
- name: Install dependencies
36-
run: poetry install --no-interaction --no-root
19+
python-version: '3.11'
3720

3821
- name: Run tests
3922
run: poetry run pytest

.github/workflows/update-summary.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/view-summaries.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Environment variables
22
.env
33

4-
data/audio/
5-
data/video/
6-
data/transcripts/
4+
data/
75
models/
6+
# Include specific directories
7+
!src/models/
8+
89
notebooks/.ipynb_checkpoints/
910

1011
# Python

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ pydub = "^0.25.1"
2222
moviepy = "^2.1.2"
2323
jupyter = "^1.1.1"
2424
jupyter-nbextensions-configurator = "^0.6.4"
25-
faster-whisper = "1.1.0"
26-
whisperx = {git = "https://github.com/m-bain/whisperx.git", rev = "main", python = ">=3.10,<3.13"}
2725
python-dotenv = "^1.0.1"
2826
aiofiles = "^24.1.0"
27+
faster-whisper = "^1.1.1"
2928

3029

3130
[tool.poetry.group.dev.dependencies]

0 commit comments

Comments
 (0)