refactor: improve development workflow and code quality
- Add Spanish documentation for AGENTS.md and README.md - Add pytest to main dependencies and taskipy for dev tasks - Clean up unused imports across codebase - Fix default config values for local development - Update test fixtures to use standard pytest
This commit is contained in:
73
README.md
73
README.md
@@ -0,0 +1,73 @@
|
||||
# TrytonMCP
|
||||
|
||||
MCP server que permite a LLMs interactuar con Tryton ERP a través de llamadas RPC.
|
||||
|
||||
## Requisitos
|
||||
|
||||
- Python 3.14+
|
||||
- uv (gestor de paquetes)
|
||||
|
||||
## Instalación
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
cp .env.example .env
|
||||
# Editar .env con las credenciales de Tryton
|
||||
```
|
||||
|
||||
## Desarrollo
|
||||
|
||||
### Configuración del entorno
|
||||
|
||||
```bash
|
||||
# Activar entorno virtual
|
||||
source .venv/bin/activate
|
||||
|
||||
# Instalar dependencias de desarrollo
|
||||
uv pip install -e ".[test]"
|
||||
```
|
||||
|
||||
### Comandos disponibles
|
||||
|
||||
```bash
|
||||
# Ejecutar servidor MCP
|
||||
uv run fastmcp run src/tryton_mcp/server.py
|
||||
|
||||
# Ejecutar tests
|
||||
python -m pytest tests/ -v
|
||||
|
||||
# Verificar código con ruff
|
||||
ruff check src/ tests/
|
||||
|
||||
# Format código
|
||||
ruff format src/ tests/
|
||||
```
|
||||
|
||||
## Estructura del proyecto
|
||||
|
||||
```
|
||||
src/tryton_mcp/
|
||||
├── __init__.py
|
||||
├── config.py # Configuración singleton
|
||||
├── server.py # Servidor MCP principal
|
||||
└── services/
|
||||
├── base.py # TrytonService base
|
||||
├── provider.py # Provider service
|
||||
├── party.py # Customer/Party operations
|
||||
├── product.py # Products/Services
|
||||
├── schedule.py # Appointments
|
||||
└── service_center.py # Service centers
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Todos los tests
|
||||
python -m pytest tests/ -v
|
||||
|
||||
# Tests específicos
|
||||
python -m pytest tests/test_server.py -v
|
||||
|
||||
# Con coverage
|
||||
python -m pytest tests/ --cov=src --cov-report=html
|
||||
```
|
||||
Reference in New Issue
Block a user