kwork-api/CONTRIBUTING.md
root 0975b68334 feat: complete Kwork API client with 45+ endpoints
Initial release:
- Complete async API client (45+ endpoints)
- Pydantic models for all responses
- Two-step authentication
- Comprehensive error handling
- 92% test coverage
- Gitea Actions CI/CD
- Semantic release configured
2026-03-29 00:42:54 +00:00

106 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Contributing to kwork-api
## Development Setup
```bash
# Clone repository
git clone https://git.much-data.ru/much-data/kwork-api.git
cd kwork-api
# Install UV (if not installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync --group dev
# Install pre-commit hooks
uv run pre-commit install
```
## Branch Naming
- `feature/description` — новые фичи
- `fix/description` — багфиксы
- `docs/description` — документация
- `refactor/description` — рефакторинг
## Commit Messages
Используем [Conventional Commits](https://www.conventionalcommits.org/):
```
<type>(<scope>): <description>
[optional body]
[optional footer]
```
**Types:**
- `feat` — новая фича
- `fix` — исправление бага
- `docs` — документация
- `style` — форматирование
- `refactor` — рефакторинг
- `test` — тесты
- `chore` — обслуживание
- `ci` — CI/CD
**Примеры:**
```
feat(validation): add /api/validation/checktext endpoint
fix(auth): handle expired token error
docs(api): update client examples
```
## Pre-commit Hooks
Автоматически запускаются перед коммитом:
1. **ruff check** — линтинг с авто-исправлением
2. **ruff format** — форматирование кода
3. **commitlint** — проверка формата коммита
Перед push:
- **pytest** — запуск тестов
## Pull Requests
1. Создай ветку от `main`
2. Вноси изменения с правильными коммитами
3. Запушь ветку
4. Создай PR в `main`
5. Дождись прохождения CI
6. После review — merge
## CI/CD
**PR Checks:**
- ✅ Тесты с coverage
- ✅ Линтинг
- ✅ Форматирование
- ✅ Безопасность (secrets scan)
- ✅ Commitlint (PR title)
**Release (merge в main):**
- 📦 Сборка пакета
- 🚀 Публикация в Gitea Packages
- 📚 Деплой документации
**Tag (v*):**
- 🏷️ Создание релиза
- 📦 Публикация версии
## Versioning
Используем [Semantic Versioning](https://semver.org/):
- `MAJOR.MINOR.PATCH` (например, `1.2.3`)
- Теги: `v1.2.3`
Для создания релиза:
```bash
git tag v1.2.3
git push origin v1.2.3
```