diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09b2483..af15a92 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,522 +1,40 @@ -# Contributing to PunimTag +# Contributing -Thank you for your interest in contributing to PunimTag! This document provides guidelines and instructions for contributing to the project. +## Setup ---- +- Python 3.12+, Node 18+, PostgreSQL, Redis +- Follow the root [README](README.md) (`./install.sh`, `.env` from `.env.example`) +- Activate the venv before backend work: `source venv/bin/activate` -## ๐Ÿ“‹ Table of Contents +## Workflow -1. [Code of Conduct](#code-of-conduct) -2. [Getting Started](#getting-started) -3. [Development Workflow](#development-workflow) -4. [Coding Standards](#coding-standards) -5. [Testing](#testing) -6. [Documentation](#documentation) -7. [Pull Request Process](#pull-request-process) -8. [Project Structure](#project-structure) +1. Branch from `main` / `master` for the change. +2. Keep commits focused; reference issues when you have them. +3. Run `npm run ci:local` before opening a PR. +4. Update docs when behavior or setup steps change. ---- +## Coding notes -## ๐Ÿค Code of Conduct +- Backend: FastAPI + SQLAlchemy under `backend/`; prefer typed Pydantic models for API I/O. +- Admin: React + Vite + TypeScript in `admin-frontend/`. +- Viewer: Next.js + Prisma in `viewer-frontend/`; regenerate Prisma clients after schema edits. +- Do not commit secrets, real `.env` files, or production photo paths with PII. -### Our Pledge -We are committed to providing a welcoming and inclusive environment for all contributors. - -### Expected Behavior -- Be respectful and considerate -- Welcome newcomers and help them learn -- Accept constructive criticism gracefully -- Focus on what's best for the project -- Show empathy towards other contributors - -### Unacceptable Behavior -- Harassment or discriminatory language -- Trolling or insulting comments -- Public or private harassment -- Publishing others' private information -- Other unprofessional conduct - ---- - -## ๐Ÿš€ Getting Started - -### Prerequisites -- Python 3.12+ -- Git -- Basic understanding of Python and Tkinter -- Familiarity with face recognition concepts (helpful) - -### Setting Up Development Environment - -1. **Fork and Clone** -```bash -git fork -git clone -cd punimtag -``` - -2. **Create Virtual Environment** -```bash -python -m venv venv -source venv/bin/activate # Windows: venv\Scripts\activate -``` - -3. **Install Dependencies** -```bash -pip install -r requirements.txt -pip install -r requirements-dev.txt # If available -``` - -4. **Verify Installation** -```bash -python src/gui/dashboard_gui.py -``` - ---- - -## ๐Ÿ”„ Development Workflow - -### Branch Strategy - -``` -main/master - Stable releases -develop - Integration branch -feature/* - New features -bugfix/* - Bug fixes -hotfix/* - Urgent fixes -release/* - Release preparation -``` - -### Creating a Feature Branch +## Tests ```bash -git checkout develop -git pull origin develop -git checkout -b feature/your-feature-name +npm run test:backend +npm run lint:python +npm run lint:all +npm run test:e2e # needs services; see e2e/README.md ``` -### Making Changes +## Pull requests -1. Make your changes in the appropriate directory: - - Business logic: `src/core/` - - GUI components: `src/gui/` - - Utilities: `src/utils/` - - Tests: `tests/` +- Describe what changed and how you verified it. +- CI lint/test gates are hard; do not mute them with `|| true`. +- Screenshots help for UI changes. -2. Follow coding standards (see below) - -3. Add/update tests - -4. Update documentation - -5. Test your changes thoroughly - -### Committing Changes - -Use clear, descriptive commit messages: - -```bash -git add . -git commit -m "feat: add face clustering algorithm" -``` - -**Commit Message Format:** -``` -: - - - -