Skip to content

Commit f5ca10e

Browse files
Initial commit
0 parents  commit f5ca10e

Some content is hidden

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

56 files changed

+5886
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the Bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Run command '...'
15+
2. Use configuration '...'
16+
3. Process video '...'
17+
4. See error
18+
19+
**Expected Behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Error Output**
23+
```
24+
Paste any error messages or logs here
25+
```
26+
27+
**System Information:**
28+
- OS: [e.g. Ubuntu 22.04]
29+
- Python Version: [e.g. 3.11.0]
30+
- FFmpeg Version: [e.g. 4.4.1]
31+
- Downie Version: [e.g. 1.0.0]
32+
33+
**Additional Context**
34+
Add any other context about the problem here.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Example Usage**
19+
How would this feature be used? Please provide example commands or code:
20+
21+
```bash
22+
downie download --new-feature value
23+
```
24+
25+
**Additional context**
26+
Add any other context or screenshots about the feature request here.

.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 Description
2+
3+
**What does this PR do?**
4+
Clearly describe the changes and their purpose.
5+
6+
**Related Issue**
7+
Fixes #(issue number)
8+
9+
**Type of Change**
10+
- [ ] Bug fix (non-breaking change fixing an issue)
11+
- [ ] New feature (non-breaking change adding functionality)
12+
- [ ] Breaking change (fix or feature causing existing functionality to change)
13+
- [ ] Documentation update
14+
- [ ] Performance improvement
15+
- [ ] Code cleanup or refactor
16+
17+
**Testing**
18+
1. List steps to test the changes
19+
2. Include relevant test cases
20+
3. Describe any special testing considerations
21+
22+
**Checklist**
23+
- [ ] I have read the [Contributing Guidelines](CONTRIBUTING.md)
24+
- [ ] My code follows the project's style guidelines
25+
- [ ] I have added tests covering my changes
26+
- [ ] All new and existing tests pass
27+
- [ ] I have updated the documentation accordingly
28+
- [ ] I have added type hints where appropriate
29+
- [ ] I have added docstrings for new functions/methods
30+
- [ ] My changes generate no new warnings or errors
31+
32+
**Screenshots/Logs**
33+
If applicable, add screenshots or logs to demonstrate the changes.
34+
35+
**Additional Notes**
36+
Add any additional context about the PR here.

.github/workflows/tests.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
schedule:
9+
- cron: '0 0 * * 0' # Run weekly on Sunday
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
python-version: ["3.8", "3.9", "3.10", "3.11"]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
28+
29+
- name: Install FFmpeg (Ubuntu)
30+
if: matrix.os == 'ubuntu-latest'
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y ffmpeg
34+
35+
- name: Install FFmpeg (macOS)
36+
if: matrix.os == 'macos-latest'
37+
run: |
38+
brew install ffmpeg
39+
40+
- name: Install FFmpeg (Windows)
41+
if: matrix.os == 'windows-latest'
42+
run: |
43+
choco install ffmpeg
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install -e ".[dev,test]"
49+
50+
# - name: Run linting
51+
# run: |
52+
# black . --check
53+
# isort . --check-only
54+
# flake8 .
55+
# mypy src/
56+
57+
- name: Run tests
58+
run: |
59+
pytest --cov=downie --cov-report=xml
60+
61+
- name: Upload coverage to Codecov
62+
uses: codecov/codecov-action@v3
63+
with:
64+
file: ./coverage.xml
65+
fail_ci_if_error: true
66+
67+
package:
68+
needs: test
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v3
72+
73+
- name: Set up Python
74+
uses: actions/setup-python@v4
75+
with:
76+
python-version: "3.11"
77+
78+
- name: Install build dependencies
79+
run: |
80+
python -m pip install --upgrade pip
81+
pip install build twine
82+
83+
- name: Build package
84+
run: python -m build
85+
86+
- name: Check package
87+
run: twine check dist/*
88+
89+
docs:
90+
needs: test
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v3
94+
95+
- name: Set up Python
96+
uses: actions/setup-python@v4
97+
with:
98+
python-version: "3.11"
99+
100+
- name: Install dependencies
101+
run: |
102+
python -m pip install --upgrade pip
103+
pip install -e ".[docs]"
104+
105+
- name: Build documentation
106+
run: |
107+
mkdocs build --strict
108+
109+
- name: Deploy to GitHub Pages
110+
if: github.ref == 'refs/heads/main'
111+
run: |
112+
mkdocs gh-deploy --force
113+
114+
security:
115+
needs: test
116+
runs-on: ubuntu-latest
117+
steps:
118+
- uses: actions/checkout@v3
119+
120+
- name: Set up Python
121+
uses: actions/setup-python@v4
122+
with:
123+
python-version: "3.11"
124+
125+
- name: Install dependencies
126+
run: |
127+
python -m pip install --upgrade pip
128+
pip install bandit safety
129+
130+
- name: Run security checks
131+
run: |
132+
bandit -r src/ -ll
133+
safety check
134+
135+
# notify:
136+
# needs: [test, package, docs, security]
137+
# if: always()
138+
# runs-on: ubuntu-latest
139+
# steps:
140+
# - name: Send notification
141+
# if: ${{ failure() }}
142+
# uses: dawidd6/action-send-mail@v3
143+
# with:
144+
# server_address: smtp.gmail.com
145+
# server_port: 465
146+
# username: ${{ secrets.EMAIL_USERNAME }}
147+
# password: ${{ secrets.EMAIL_PASSWORD }}
148+
# subject: Github Actions (downie) - ${{ github.workflow }} failed
149+
# body: Workflow ${{ github.workflow }} failed in ${{ github.repository }}
150+
# to: maintainers@example.com
151+
# from: Github Actions
152+
# secure: true
153+
154+
cleanup:
155+
needs: [test, package, docs, security]
156+
if: always()
157+
runs-on: ubuntu-latest
158+
steps:
159+
- name: Clean up resources
160+
run: |
161+
# Add cleanup steps if needed
162+
echo "Cleanup complete"

0 commit comments

Comments
 (0)