feat(invoice): implement atomic invoice tools (REFACTOR-3)

- Add create_invoice_draft, add_invoice_line, update_invoice_line, delete_invoice_line, set_invoice_project, validate_invoice tools
- Update DolibarrClient with corresponding methods
- Add tests for atomic invoice operations
- Update development docs with venv instructions
This commit is contained in:
Benju1
2025-12-05 06:08:10 +01:00
parent 2035da88ce
commit b059d9c40e
4 changed files with 341 additions and 5 deletions

View File

@@ -6,18 +6,25 @@ kept separate in `docker/`.
## Install development dependencies
It is recommended to use a virtual environment to avoid conflicts with system packages (especially on Linux systems with externally managed environments).
```bash
pip install -e '.[dev]'
```
# Create a virtual environment
python3 -m venv .venv
### Windows PowerShell
# Activate the virtual environment
source .venv/bin/activate # On Linux/macOS
# .venv\Scripts\activate # On Windows
```powershell
pip install -e .`[dev`]
# Install dependencies
pip install -r requirements.txt
pip install -e .
```
## Run the test suite
Once your virtual environment is active:
```bash
pytest
```
@@ -28,6 +35,12 @@ To gather coverage metrics:
pytest --cov=src/dolibarr_mcp --cov-report=term-missing
```
If you encounter "command not found" errors, ensure your virtual environment is activated or run via python module:
```bash
python3 -m pytest
```
## Formatting and linting
The project intentionally avoids heavy linting dependencies. Follow the coding