Thank you for your interest in contributing to whisperX-FastAPI! We welcome contributions of all kinds, including bug fixes, new features, documentation improvements, and more.
-
Fork the repository and clone it to your local machine.
-
Set up your development environment as described in the README.md.
-
Install pre-commit hooks to ensure code quality and automatic updates:
# Install pre-commit (if not already installed) pip install pre-commit # Install the git hooks pre-commit install
This will automatically:
- Format and lint your code with Ruff
- Run type checking with mypy
- Check for common issues (trailing whitespace, large files, etc.)
- Update README badges to reflect current versions from your environment
-
Create a new branch for your feature or bugfix:
git checkout -b my-feature-branch
-
Make your changes and add tests as appropriate.
-
Run the test suite to ensure everything works:
pytest
-
Commit your changes with a clear and descriptive message.
-
Push your branch to your fork and open a Pull Request (PR) against the
devbranch.
- Follow PEP8 for Python code.
- Use type hints where possible.
- Keep functions and classes small and focused.
- Add or update docstrings for public functions and classes.
- Code must pass Ruff linter and formatter checks (
ruff check .andruff format --check .). - Code coverage must be at least 55% (see CI for details).
The repository uses a pre-commit hook to automatically update README badges (Python version, CUDA version, FastAPI version, WhisperX version) from pyproject.toml.
-
Badges are updated automatically when you commit changes to
pyproject.tomlor the badge update script itself. -
The script reads version information directly from
pyproject.tomlas the single source of truth. -
If you need to manually update badges, run:
python scripts/update-badges.py
-
To see what would be updated without making changes:
python scripts/update-badges.py --dry-run
- PRs should be opened against the
devbranch. - Include a clear description of your changes and the motivation behind them.
- Reference related issues in your PR description (e.g.,
Fixes #123). - Ensure all tests pass and new code is covered by tests.
- Code must pass all CI checks:
- Ruff linter and formatter
- All tests must pass
- Coverage must be at least 55%
- If your change affects documentation, update the relevant docs.
If you find a bug or have a feature request, please open an issue and provide as much detail as possible.