Skip to content

Commit 32ebd5a

Browse files
Add project scaffolding with CI, pre-commit hooks, and documentation
1 parent 2151f3f commit 32ebd5a

13 files changed

Lines changed: 1134 additions & 48 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behavior
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Describe the Bug
10+
11+
A clear, concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1. Run command: `audio-refinery ...`
16+
2. With file: `...`
17+
3. See error
18+
19+
## Expected Behavior
20+
21+
What you expected to happen.
22+
23+
## Actual Behavior
24+
25+
What actually happened. Include the full error message and traceback if applicable.
26+
27+
## Environment
28+
29+
- OS: [e.g., Ubuntu 22.04]
30+
- Python version: [e.g., 3.11.14]
31+
- GPU: [e.g., NVIDIA RTX 4090, 24GB VRAM]
32+
- CUDA version: [e.g., 12.1]
33+
- audio-refinery version: [e.g., 0.1.0]
34+
- Installation method: [e.g., pip, uv, git clone]
35+
36+
## Relevant Logs
37+
38+
```
39+
Paste any relevant output or error messages here
40+
```
41+
42+
## Additional Context
43+
44+
Any other context about the problem.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an enhancement or new feature
4+
title: "[Feature] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Summary
10+
11+
A clear, concise description of the feature you'd like to see.
12+
13+
## Motivation
14+
15+
What problem does this solve? What's the use case?
16+
17+
## Proposed Solution
18+
19+
Describe how you'd like this to work. Include example CLI commands or output if relevant.
20+
21+
## Alternatives Considered
22+
23+
Any alternative approaches you've thought about.
24+
25+
## Additional Context
26+
27+
Any other context, screenshots, or references.

.github/pull_request_template.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Summary
2+
3+
Brief description of what this PR does and why.
4+
5+
## Changes
6+
7+
-
8+
-
9+
10+
## Type of Change
11+
12+
- [ ] Bug fix (non-breaking change that fixes an issue)
13+
- [ ] New feature (non-breaking change that adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing behavior to change)
15+
- [ ] Documentation update
16+
17+
## Testing
18+
19+
- [ ] Unit tests pass: `make test`
20+
- [ ] All checks pass: `make all-checks`
21+
- [ ] New tests added for new functionality
22+
- [ ] Integration tests verified (if applicable — requires GPU)
23+
24+
## Checklist
25+
26+
- [ ] Code follows the project style (ruff lint + format clean)
27+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
28+
- [ ] Documentation updated if CLI options or behavior changed
29+
- [ ] No new dependency pins added without explanation
30+
31+
## Related Issues
32+
33+
Closes #

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v4
24+
25+
- name: Install dependencies
26+
run: uv sync --extra dev
27+
28+
- name: Run unit tests
29+
run: uv run pytest tests/ -m "not integration" -v --cov=src --cov-report=xml
30+
31+
- name: Upload coverage report
32+
uses: actions/upload-artifact@v4
33+
if: always()
34+
with:
35+
name: coverage-report
36+
path: coverage.xml
37+
38+
lint:
39+
name: Lint and Format Check
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.11'
49+
50+
- name: Install uv
51+
uses: astral-sh/setup-uv@v4
52+
53+
- name: Install dependencies
54+
run: uv sync --extra dev
55+
56+
- name: Check linting
57+
run: uv run ruff check src/ tests/
58+
59+
- name: Check formatting
60+
run: uv run ruff format --check src/ tests/
61+
62+
type-check:
63+
name: Type Check
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
69+
- name: Set up Python
70+
uses: actions/setup-python@v5
71+
with:
72+
python-version: '3.11'
73+
74+
- name: Install uv
75+
uses: astral-sh/setup-uv@v4
76+
77+
- name: Install dependencies
78+
run: uv sync --extra dev
79+
80+
- name: Run mypy
81+
run: uv run mypy src/ --ignore-missing-imports

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]*.[0-9]*.[0-9]*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v4
24+
25+
- name: Install dependencies
26+
run: uv sync --extra dev
27+
28+
- name: Run unit tests
29+
run: uv run pytest tests/ -m "not integration" -v
30+
31+
build:
32+
name: Build Package
33+
needs: test
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.11'
43+
44+
- name: Install build tools
45+
run: pip install build
46+
47+
- name: Build package
48+
run: python -m build
49+
50+
- name: Upload artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: dist
54+
path: dist/
55+
56+
github-release:
57+
name: Create GitHub Release
58+
needs: build
59+
runs-on: ubuntu-latest
60+
permissions:
61+
contents: write
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v4
65+
66+
- name: Download artifacts
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: dist
70+
path: dist/
71+
72+
- name: Create Release
73+
uses: softprops/action-gh-release@v1
74+
with:
75+
files: dist/*
76+
draft: false
77+
prerelease: false
78+
generate_release_notes: true
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ build/
1515
.pytest_cache/
1616
.coverage
1717
htmlcov/
18+
coverage.xml
19+
20+
# Type checking
21+
.mypy_cache/
1822

1923
# Editor
2024
.vscode/
@@ -23,5 +27,3 @@ htmlcov/
2327
*.swo
2428
.DS_Store
2529

26-
# UV
27-
uv.lock

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Pre-commit hooks for audio-refinery
2+
# Install: pre-commit install
3+
# Run manually: pre-commit run --all-files
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v6.0.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-yaml
12+
- id: check-added-large-files
13+
- id: check-json
14+
- id: check-toml
15+
- id: check-merge-conflict
16+
- id: debug-statements
17+
- id: mixed-line-ending
18+
19+
- repo: https://github.com/astral-sh/ruff-pre-commit
20+
rev: v0.9.0
21+
hooks:
22+
- id: ruff
23+
args: [--fix, --exit-non-zero-on-fix]
24+
- id: ruff-format
25+
26+
- repo: https://github.com/pre-commit/mirrors-mypy
27+
rev: v1.14.0
28+
hooks:
29+
- id: mypy
30+
additional_dependencies:
31+
- pydantic
32+
- types-click
33+
args: [--ignore-missing-imports]

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2026-02-27
11+
12+
### Added
13+
14+
- Initial release
15+
- `separate` command: GPU-accelerated vocal separation via Demucs `htdemucs`
16+
- `diarize` command: Speaker diarization via Pyannote `speaker-diarization-3.1`
17+
- `transcribe` command: Transcription with word-level alignment via WhisperX `large-v3`
18+
- `sentiment` command: Per-segment sentiment analysis via `cardiffnlp/twitter-roberta-base-sentiment-latest`
19+
- `pipeline` command: Single-GPU batch processing through all four stages
20+
- `pipeline-parallel` command: Multi-GPU batch processing with worker distribution
21+
- GPU pre-flight checks via `nvidia-smi` with active process detection
22+
- Thermal monitoring with configurable shutdown threshold (default 80°C)
23+
- Slack webhook notifications for pipeline completion and thermal events
24+
- Resume behavior for batch pipelines (skips already-completed files)
25+
- Pydantic data models for all pipeline outputs with full provenance tracking
26+
- Rich terminal output with progress spinners and result tables
27+
- VRAM usage tracking and peak memory reporting per stage
28+
- Scratch space management with automatic cleanup of intermediate files
29+
- GPU performance-based ordering via `gpu_tflops.toml` lookup table
30+
31+
[Unreleased]: https://github.com/LunarCommand/audio-refinery/compare/v0.1.0...HEAD
32+
[0.1.0]: https://github.com/LunarCommand/audio-refinery/releases/tag/v0.1.0

0 commit comments

Comments
 (0)