feat: implement blog project with CI pipeline
This commit is contained in:
17
docs/api/endpoints.md
Normal file
17
docs/api/endpoints.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# API Endpoints
|
||||
|
||||
## Overview
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/` | Health check |
|
||||
|
||||
## Health Check
|
||||
|
||||
```http
|
||||
GET /
|
||||
```
|
||||
|
||||
**Response:** `200 OK`
|
||||
|
||||
Returns application status.
|
||||
13
docs/api/index.md
Normal file
13
docs/api/index.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# API Reference
|
||||
|
||||
This section contains auto-generated API documentation from source code docstrings.
|
||||
|
||||
## Modules
|
||||
|
||||
::: app.main
|
||||
handler: python
|
||||
options:
|
||||
members:
|
||||
- lifespan
|
||||
- app_factory
|
||||
- main
|
||||
43
docs/development/codestyle.md
Normal file
43
docs/development/codestyle.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Code Style
|
||||
|
||||
## Linting & Formatting
|
||||
|
||||
```bash
|
||||
# Run all linters
|
||||
uv run ruff check . --fix
|
||||
uv run ruff format .
|
||||
uv run isort . --profile black --filter-files
|
||||
|
||||
# Type checking
|
||||
uv run mypy .
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
```bash
|
||||
# Check docstring style
|
||||
uv run pydocstyle app/
|
||||
|
||||
# Check documentation coverage
|
||||
uv run interrogate app/ -v
|
||||
|
||||
# Build documentation
|
||||
uv run mkdocs build
|
||||
|
||||
# Serve documentation locally
|
||||
uv run mkdocs serve
|
||||
```
|
||||
|
||||
## Pre-commit Hooks
|
||||
|
||||
This project uses pre-commit hooks to ensure code quality:
|
||||
|
||||
- ruff check
|
||||
- ruff format
|
||||
- isort
|
||||
- mypy
|
||||
|
||||
Install hooks:
|
||||
```bash
|
||||
uv run pre-commit install
|
||||
```
|
||||
31
docs/development/setup.md
Normal file
31
docs/development/setup.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Setup Guide
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Python 3.13+
|
||||
- uv package manager
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone https://github.com/pyaqa/blog.git
|
||||
cd blog
|
||||
|
||||
# Install dependencies
|
||||
uv sync
|
||||
|
||||
# Run tests
|
||||
uv run pytest
|
||||
|
||||
# Start development server
|
||||
uv run python -m app.main
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
The server runs on `http://0.0.0.0:8000` by default.
|
||||
|
||||
Access interactive API docs at:
|
||||
- Swagger UI: `http://localhost:8000/docs`
|
||||
- ReDoc: `http://localhost:8000/redoc`
|
||||
28
docs/index.md
Normal file
28
docs/index.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Blog API
|
||||
|
||||
Welcome to the Blog API documentation.
|
||||
|
||||
## Features
|
||||
|
||||
- FastAPI-based REST API
|
||||
- Python 3.13+
|
||||
- Async support
|
||||
- Type hints throughout
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
uv sync
|
||||
|
||||
# Run development server
|
||||
uv run python -m app.main
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
See [API Reference](api/endpoints.md) for detailed endpoint documentation.
|
||||
|
||||
## Development
|
||||
|
||||
See [Development Guide](development/setup.md) for setup instructions.
|
||||
Reference in New Issue
Block a user