Thank you for your interest in contributing! This document outlines how to contribute effectively to this project.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/GPT.git cd GPT - Create a branch for your changes:
or
git checkout -b feature/your-feature-name
git checkout -b fix/your-bug-fix
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install torch fastapi uvicorn numpy pydantic starlettenpm install- Follow PEP 8 conventions.
- Use type annotations on all function signatures.
- Prefer immutable data structures (use
dataclass(frozen=True),NamedTuple). - Format with black, sort imports with isort, lint with ruff.
- Use the
loggingmodule instead ofprint()statements.
- Follow the existing TypeScript strict mode configuration.
- Use
import typefor type-only imports (verbatimModuleSyntaxis enabled). - Remove unused variables β
noUnusedLocalsandnoUnusedParametersare enforced. - Lint with oxlint (
npm run lint). - Use functional components with hooks; avoid class components.
When reporting a bug, please include:
- Summary: A clear, concise description of the problem.
- Steps to Reproduce: Numbered steps that reliably trigger the bug.
- Expected Behavior: What you expected to happen.
- Actual Behavior: What actually happened (include error messages, logs, screenshots).
- Environment: OS, Python/Node version, GPU (if applicable).
- Severity: Low / Medium / High / Critical.
Use the Bug Report issue template when opening a new issue.
When proposing a feature, please include:
- Problem Statement: What problem does this solve?
- Proposed Solution: Your idea for addressing it.
- Alternatives Considered: Other approaches you evaluated.
- Scope: What is in scope and out of scope.
- Risks: Potential downsides or breaking changes.
Use the Feature Request issue template when opening a new issue.
- Add tests for new features and bug fixes.
- Run the existing test suite before submitting a pull request.
- For backend changes, verify the
/generateendpoint still works:curl "http://localhost:8010/generate?tokens=50" - For frontend changes, run
npm run buildto verify the build succeeds.
- Update the relevant documentation when changing public APIs, configuration, or architecture.
- Update CLAUDE.md if the data flow or module structure changes.
- Update README.md if dependencies or setup steps change.
- Ensure your branch is up to date with
main:git fetch origin git rebase origin/main
- Run all linters and tests.
- Fill out the pull request template completely.
- Link any related issues (e.g.,
Fixes #123). - Request a review from a maintainer.
- Address review feedback promptly.
By participating in this project, you agree to abide by our Code of Conduct.
Open a GitHub Discussion or reach out by opening an issue.
Happy contributing! π