- Create docs/development/migration/ directory - Move database-migrations.md to migration subfolder - Move svc-006-migration-plan.md to migration subfolder - Update all cross-references in: - mkdocs.yml nav configuration - docs/index.md - docs/architecture/overview.md - docs/backend/overview.md - docs/development/contributing.md - docs/development/troubleshooting.md - docs/getting-started/database-setup.md This separates migration plans from core documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
412 lines
8.4 KiB
Markdown
412 lines
8.4 KiB
Markdown
# Contributing Guide
|
||
|
||
Thank you for contributing to the Wizamart platform! This guide will help you get started.
|
||
|
||
## Getting Started
|
||
|
||
### Prerequisites
|
||
|
||
- Python 3.11 or higher
|
||
- Git
|
||
- Virtual environment tool (venv)
|
||
|
||
### Initial Setup
|
||
|
||
1. Clone the repository:
|
||
```bash
|
||
git clone <repository-url>
|
||
cd letzshop-product-import
|
||
```
|
||
|
||
2. Create and activate virtual environment:
|
||
```bash
|
||
python -m venv venv
|
||
source venv/bin/activate # On Windows: venv\Scripts\activate
|
||
```
|
||
|
||
3. Install all dependencies:
|
||
```bash
|
||
make install-all
|
||
```
|
||
|
||
4. Set up the database:
|
||
```bash
|
||
make db-setup
|
||
```
|
||
|
||
## Development Workflow
|
||
|
||
### 1. Create a Feature Branch
|
||
|
||
```bash
|
||
git checkout -b feature/your-feature-name
|
||
# or
|
||
git checkout -b fix/bug-description
|
||
```
|
||
|
||
### 2. Make Your Changes
|
||
|
||
Follow our [Code Quality](code-quality.md) guidelines:
|
||
|
||
```bash
|
||
# Format and lint your code
|
||
make check
|
||
|
||
# Run tests
|
||
make test-fast
|
||
```
|
||
|
||
### 3. Write Tests
|
||
|
||
- Add tests for new features
|
||
- Update tests for changed functionality
|
||
- Maintain or improve code coverage
|
||
|
||
```bash
|
||
# Run tests with coverage
|
||
make test-coverage
|
||
```
|
||
|
||
### 4. Commit Your Changes
|
||
|
||
Use clear, descriptive commit messages:
|
||
|
||
```bash
|
||
git add .
|
||
git commit -m "feat: add user profile endpoint"
|
||
# or
|
||
git commit -m "fix: resolve authentication token expiry issue"
|
||
```
|
||
|
||
**Commit message format:**
|
||
- `feat:` - New feature
|
||
- `fix:` - Bug fix
|
||
- `docs:` - Documentation changes
|
||
- `style:` - Code formatting (no functional changes)
|
||
- `refactor:` - Code refactoring
|
||
- `test:` - Adding or updating tests
|
||
- `chore:` - Maintenance tasks
|
||
|
||
### 5. Push and Create Pull Request
|
||
|
||
```bash
|
||
git push origin feature/your-feature-name
|
||
```
|
||
|
||
Then create a pull request on GitHub.
|
||
|
||
## Code Quality Standards
|
||
|
||
We use modern tooling to maintain high code quality. See [Code Quality Guide](code-quality.md) for details.
|
||
|
||
### Before Committing
|
||
|
||
Always run:
|
||
|
||
```bash
|
||
make check
|
||
```
|
||
|
||
This will:
|
||
1. Format your code with Ruff
|
||
2. Lint and auto-fix issues
|
||
3. Run type checking with mypy
|
||
|
||
### Pre-Commit Checklist
|
||
|
||
- [ ] Code is formatted (`make format`)
|
||
- [ ] All linting issues resolved (`make lint`)
|
||
- [ ] Tests pass (`make test`)
|
||
- [ ] Coverage hasn't decreased
|
||
- [ ] Documentation updated if needed
|
||
- [ ] Commit message is clear and follows format
|
||
|
||
## Testing Guidelines
|
||
|
||
### Test Structure
|
||
|
||
```
|
||
tests/
|
||
|