- pm2d/dxf.py: rasterizzazione DXF -> template (ezdxf, flattening entita', scala/centratura, render edge antialiased) - POST /upload_dxf: carica CAD come modello (size 128..2048) - roi_poly su /match, /match_simple e POST /recipes: train con mask cv2.fillPoly (validazione 400 su poligoni degeneri), cache key inclusa - UI: upload .dxf, modalita' ROI poligonale su canvas (click=vertice, dblclick=chiudi, reset), bottone Esporta JSON dei risultati - .gitea/workflows/ci.yml: uv sync + ruff + pytest su push/PR Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# CI Gitea Actions: lint (ruff) + test sintetici (pytest).
|
||||
# I test non richiedono le immagini in Test/ (sono generati a runtime).
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Installa uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Sync dipendenze
|
||||
run: uv sync
|
||||
|
||||
- name: Lint (ruff)
|
||||
# Ignore da CLI (pyproject.toml non va toccato): E501/E741 +
|
||||
# stile pre-esistente del progetto (E702 statement con ';',
|
||||
# E402 import dopo setup env, F841/F401 nei moduli legacy).
|
||||
run: uv run ruff check pm2d/
|
||||
|
||||
- name: Test (pytest)
|
||||
run: uv run pytest tests/ -v
|
||||
Reference in New Issue
Block a user