Skip to content

ilysenko/test-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tasks API

Небольшое FastAPI-приложение, которое используется как песочница для тестирования бота-ревьюера: к репозиторию открываются "хорошие" и "плохие" pull request-ы, а бот их комментирует.

Стек

  • Python 3.11+
  • FastAPI / Uvicorn
  • Pydantic v2
  • Pytest + httpx (тесты через TestClient)
  • Ruff (линт + формат)

Хранилище — in-memory, БД нет.

Установка

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Запуск

uvicorn app.main:app --reload

Эндпоинты

Метод Путь Назначение
GET /health Healthcheck
GET /tasks Список всех задач
POST /tasks Создать задачу
GET /tasks/{id} Получить по id
PUT /tasks/{id} Полное обновление
PATCH /tasks/{id} Частичное обновление
DELETE /tasks/{id} Удалить

Пример:

curl -X POST http://localhost:8000/tasks \
  -H 'Content-Type: application/json' \
  -d '{"title": "buy milk"}'

Тесты и линт

pytest
ruff check .
ruff format --check .

CI

GitHub Actions (.github/workflows/ci.yml) на каждый push в main и каждый pull request гоняет:

  1. ruff check .
  2. ruff format --check .
  3. pytest -q

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages