Skip to content

Commit 7a4d8d9

Browse files
committed
Docker Fix
1 parent a83a250 commit 7a4d8d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2140
-1307
lines changed

.dockerignore

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
env/
8+
venv/
9+
ENV/
10+
.venv
11+
pip-log.txt
12+
pip-delete-this-directory.txt
13+
.pytest_cache/
14+
.coverage
15+
.coverage.*
16+
htmlcov/
17+
.tox/
18+
.nox/
19+
*.egg-info/
20+
.eggs/
21+
*.egg
22+
23+
# Virtual environments
24+
venv/
25+
env/
26+
ENV/
27+
28+
# IDE
29+
.vscode/
30+
.idea/
31+
*.swp
32+
*.swo
33+
*~
34+
.project
35+
.pydevproject
36+
37+
# OS
38+
.DS_Store
39+
Thumbs.db
40+
41+
# Git
42+
.git/
43+
.gitignore
44+
45+
# Project specific
46+
data/
47+
input/
48+
output/
49+
temp/
50+
jobs/
51+
logs/
52+
chunks/
53+
subtitles/
54+
*.mp4
55+
*.avi
56+
*.mkv
57+
*.mov
58+
*.webm
59+
*.srt
60+
*.vtt
61+
62+
# Credentials - NEVER include in image
63+
service-account.json
64+
*.json
65+
!service-account.json.example
66+
credentials/
67+
.env
68+
.env.*
69+
70+
# Documentation - keep essential ones
71+
*.md
72+
!README.md
73+
!SECURITY.md
74+
!LICENSE
75+
76+
# Build artifacts
77+
build/
78+
dist/
79+
*.build
80+
*.dist
81+
82+
# Node (if any frontend)
83+
node_modules/
84+
85+
# Testing
86+
tests/
87+
test/
88+
*_test.py
89+
test_*.py
90+
91+
# Temporary files
92+
*.tmp
93+
*.temp
94+
*.log
95+
*.bak
96+
*.swp
97+
*.swo
98+
*~
99+
100+
# Archives
101+
*.zip
102+
*.tar
103+
*.tar.gz
104+
*.rar
105+
*.7z
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## 🚀 Feature Description
10+
A clear and concise description of what you want to happen.
11+
12+
## 💡 Motivation
13+
Is your feature request related to a problem? Please describe.
14+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
15+
16+
## 🎯 Proposed Solution
17+
Describe the solution you'd like
18+
A clear and concise description of what you want to happen.
19+
20+
## 🔄 Alternatives Considered
21+
Describe alternatives you've considered
22+
A clear and concise description of any alternative solutions or features you've considered.
23+
24+
## 🏭 Implementation Considerations
25+
- Performance impact: [Low/Medium/High]
26+
- Breaking changes: [Yes/No]
27+
- Docker compatibility: [Required/Optional]
28+
- Language support: [Which languages]
29+
30+
## 📄 Additional Context
31+
Add any other context or screenshots about the feature request here.
32+
33+
## ✅ Checklist
34+
- [ ] I have searched existing issues and feature requests
35+
- [ ] This feature aligns with the project's goals
36+
- [ ] I am willing to help implement this feature
37+
- [ ] I have considered the impact on existing users

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Pull Request
2+
3+
## 📝 Description
4+
Brief description of what this PR does.
5+
6+
## 🔗 Related Issue
7+
Closes #(issue number)
8+
9+
## 🎯 Type of Change
10+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
11+
- [ ] ✨ New feature (non-breaking change which adds functionality)
12+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
13+
- [ ] 📚 Documentation update
14+
- [ ] 🔧 Configuration/Infrastructure change
15+
- [ ] 🎨 Code style/formatting change
16+
- [ ] ♻️ Refactoring (no functional changes)
17+
18+
## 🧪 Testing
19+
- [ ] Tested locally with Docker
20+
- [ ] Tested with sample video files
21+
- [ ] Health checks pass
22+
- [ ] No breaking changes in existing functionality
23+
24+
## 📋 Checklist
25+
- [ ] My code follows the style guidelines of this project
26+
- [ ] I have performed a self-review of my own code
27+
- [ ] I have commented my code, particularly in hard-to-understand areas
28+
- [ ] I have made corresponding changes to the documentation
29+
- [ ] My changes generate no new warnings
30+
- [ ] Any dependent changes have been merged and published
31+
32+
## 🖼️ Screenshots (if applicable)
33+
Add screenshots to help explain your changes.
34+
35+
## 📄 Additional Notes
36+
Any additional information that reviewers should know.

.github/workflows/code-quality.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install flake8 black isort bandit safety
26+
27+
- name: Run Black (code formatting)
28+
run: black --check --diff src/ main.py
29+
30+
- name: Run isort (import sorting)
31+
run: isort --check-only --diff src/ main.py
32+
33+
- name: Run Flake8 (linting)
34+
run: flake8 src/ main.py --max-line-length=88 --extend-ignore=E203,W503
35+
36+
- name: Run Bandit (security)
37+
run: bandit -r src/ main.py -f json -o bandit-report.json || true
38+
39+
- name: Run Safety (dependency security)
40+
run: |
41+
pip install -r requirements.txt
42+
safety check --json --output safety-report.json || true
43+
44+
- name: Upload security reports
45+
uses: actions/upload-artifact@v3
46+
if: always()
47+
with:
48+
name: security-reports
49+
path: |
50+
bandit-report.json
51+
safety-report.json

.github/workflows/docker-build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Docker Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Build Docker image
21+
run: |
22+
docker build -t video-subtitle-generator:test .
23+
24+
- name: Create test directories
25+
run: |
26+
mkdir -p data/{input,output,config,logs,temp,jobs}
27+
28+
- name: Create mock service account
29+
run: |
30+
echo '{"type":"service_account","project_id":"test"}' > data/config/service-account.json
31+
32+
- name: Test Docker container startup
33+
run: |
34+
docker run --rm \
35+
-v $(pwd)/data:/data \
36+
video-subtitle-generator:test \
37+
python -c "from src.health_checker import quick_health_check; print('Health check passed')"
38+
39+
- name: Test help command
40+
run: |
41+
docker run --rm \
42+
-v $(pwd)/data:/data \
43+
video-subtitle-generator:test \
44+
python main.py --help
45+
46+
- name: Test configuration validation
47+
run: |
48+
docker run --rm \
49+
-v $(pwd)/data:/data \
50+
video-subtitle-generator:test \
51+
python -c "from src.config_manager import ConfigManager; cm = ConfigManager(); print('Config validation passed')"

0 commit comments

Comments
 (0)