docs: bring README and agent guides in line with the code
- supported formats, xml_base64, xml_syntax, buyer_reference, profile - profile table, error codes and required-field rules match the code - pdf_abgleich and logging sections describe the actual behavior - NixOS section uses the shipped module instead of a hand-written unit - test files, CI commands, uv.lock and validator_schema.json listed - CLAUDE.md points to AGENTS.md instead of template placeholders Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -245,7 +245,9 @@ Four validation checks supported:
|
||||
1. **pflichtfelder** - Required fields present and non-empty
|
||||
2. **betraege** - Amount calculations correct (tolerance: 0.01)
|
||||
3. **ustid** - VAT ID format (DE, AT, CH)
|
||||
4. **pdf_abgleich** - XML vs PDF text comparison (currently only matches the English patterns `Invoice <nr>` and `Total:`; passes without comparing otherwise)
|
||||
4. **pdf_abgleich** - invoice number and net/VAT/gross totals of the XML must appear in the PDF text (`find_pdf_text_mismatches`; warnings only)
|
||||
|
||||
`ValidateRequest.profile` (the `zugferd_profil` from `/extract`) enables profile-specific rules; on `XRECHNUNG_*` the buyer reference (BT-10) is required.
|
||||
|
||||
## Environment Variables
|
||||
- `HOST` (default: `0.0.0.0`)
|
||||
@@ -257,7 +259,9 @@ Four validation checks supported:
|
||||
- No type suppression (`# type: ignore`) allowed
|
||||
- File size limit: 10MB for PDF and XML uploads
|
||||
- Parse untrusted XML only via `_parse_xml` in `src/extractor.py` (no entity/DTD resolution)
|
||||
- CI runs `uv sync --extra dev --frozen` and `uv run --extra dev pytest -q` (lockfile: factur-x 6.8; the Nix dev shell still packages factur-x 3.8)
|
||||
- CI runs `uv sync --extra dev --frozen` and `uv run --extra dev pytest -q`
|
||||
- `flake.nix` packages factur-x itself; keep its version in sync with `uv.lock` (both 6.8)
|
||||
- New files must be `git add`ed before `nix build` sees them (flake source = git tree)
|
||||
- Returns warnings (not errors) for non-critical issues
|
||||
- Uses Decimal rounding with ROUND_HALF_UP for monetary values
|
||||
|
||||
|
||||
Reference in New Issue
Block a user