feat: UV is 27 cm wide (Dropstar, 2026-10-28)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m27s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s

It was 28,5 cm. The Site's UV products, ready-sheet check, layout and size
shortcuts, the server's film-width check, the print file and the Tiny item
names follow; two pieces of up to 13,2 cm share a UV row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-28 11:08:07 -03:00
parent b08a258931
commit ebe8b29db2
11 changed files with 28 additions and 27 deletions

View File

@@ -259,9 +259,9 @@ try{
return {altura:+r.altura.toFixed(2),folga:+r.folga.toFixed(3),
xs:[...new Set(r.pos.map(p=>+p.x.toFixed(2)))],ys:[...new Set(r.pos.map(p=>+p.y.toFixed(2)))]};})()`),
{altura:89.42,folga:0.2,xs:[0.2,28.6],ys:[0.5,30.14,59.78]});
// UV, 28,5 cm: two 14 cm pieces still share a row, 1,67 mm apart.
assert.equal(await evaluate(`(()=>{const a={};const r=encaixar([{w:14,h:10,img:null,a},{w:14,h:10,img:null,a}],28.5);
return new Set(r.pos.map(p=>p.y)).size===1 && Math.abs(r.folga-0.5/3)<1e-9})()`),true);
// UV, 27 cm: two 13,2 cm pieces still share a row, 2 mm apart.
assert.equal(await evaluate(`(()=>{const a={};const r=encaixar([{w:13.2,h:10,img:null,a},{w:13.2,h:10,img:null,a}],27);
return new Set(r.pos.map(p=>p.y)).size===1 && Math.abs(r.folga-0.6/3)<1e-9})()`),true);
// A long piece stands up when that shortens the sheet: 30 x 10 cm, eight copies,
// five to a row turned instead of one to a row as sent.
assert.deepEqual(await evaluate(`(()=>{const a={};const r=encaixar(Array.from({length:8},()=>({w:30,h:10,img:null,a})),57);

View File

@@ -93,7 +93,7 @@ def upload_bytes(client, content, name='LOCAL-TEST.cdr', order_id=None, expected
return uid
def item_spec(mode, metres, grade, uid):
film_width=28.5 if mode in ('uvfile','uv') else 57
film_width=27 if mode in ('uvfile','uv') else 57
length_cm=float(metres)*100
return {'mode':mode,'metres':str(metres),'grade':grade,'uploads':[uid],
'production':{'version':2,'film_width_cm':film_width,'height_cm':length_cm,

View File

@@ -9,7 +9,7 @@ from app.core.models import Item
def item(mode='avulsa', mirrored=False, version=3):
upload = uuid4()
film = 28.5 if mode in ('uv', 'uvfile') else 57
film = 27 if mode in ('uv', 'uvfile') else 57
return {'mode': mode, 'metres': '0.21', 'grade': 100, 'uploads': [str(upload)],
'quality_status': 'ok', 'quality_acknowledged': False,
'production': {'version': version, 'film_width_cm': film, 'height_cm': 21,

View File

@@ -213,8 +213,8 @@ class TinyTests(FakeTinyCase):
self.products['103']['situacao'] = 'I'
with mock.patch.dict(os.environ, {'TINY_PRODUCT_UV_AVULSA': ''}):
results = check(auth=FakeAuth(), transport=httpx.MockTransport(self.handler))
self.assertIn('não está ativo', results['DTF UV 28,5 cm · folha montada'])
self.assertEqual(results['DTF UV 28,5 cm · artes avulsas'], 'TINY_PRODUCT_UV_AVULSA sem id')
self.assertIn('não está ativo', results['DTF UV 27 cm · folha montada'])
self.assertEqual(results['DTF UV 27 cm · artes avulsas'], 'TINY_PRODUCT_UV_AVULSA sem id')
self.assertEqual(results['pedidos'], 'ok')
# The order list is asked by date: unfiltered, Tiny times out on a large account.
asked = []
@@ -528,10 +528,10 @@ class TinyStepSkuTests(FakeTinyCase):
def test_settings_and_check_know_the_step_sku(self):
from app.tiny import check, required_settings
self.assertNotIn('TINY_PRODUCT_UV_FOLHA', required_settings())
self.assertEqual(check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'], 'ok')
self.assertEqual(check(orders=self.tiny)['DTF UV 27 cm · folha montada'], 'ok')
del self.products['300']
self.tiny.skus.clear()
self.assertIn('DTFIMP.UV.010CM', check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'])
self.assertIn('DTFIMP.UV.010CM', check(orders=self.tiny)['DTF UV 27 cm · folha montada'])
@product_ids
@@ -555,10 +555,10 @@ class TinyMetreAndStepSkuTests(FakeTinyCase):
def test_whole_metres_alone_and_the_check(self):
from app.tiny import check, step_lines
self.assertEqual(step_lines({'billed_metres': '2', 'unit_cents': 6990}, 'C', 'M'), [('M', 2, 6990)])
self.assertEqual(check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'], 'ok')
self.assertEqual(check(orders=self.tiny)['DTF UV 27 cm · folha montada'], 'ok')
del self.products['301']
self.tiny.skus.clear()
self.assertIn('DTFIMP.UV.1MT', check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'])
self.assertIn('DTFIMP.UV.1MT', check(orders=self.tiny)['DTF UV 27 cm · folha montada'])
@product_ids
@@ -578,7 +578,7 @@ class TinyProbeTests(FakeTinyCase):
self.assertIn('101\tDTF-101\tProduto 101', text)
code, text = self.probe('conferir')
self.assertEqual(code, 0)
self.assertIn('TINY_PRODUCT_UV_AVULSA (DTF UV 28,5 cm · artes avulsas): ok DTF-104', text)
self.assertIn('TINY_PRODUCT_UV_AVULSA (DTF UV 27 cm · artes avulsas): ok DTF-104', text)
self.assertIn('TINY_FORMA_ENVIO_RETIRADA (retirada): ok Retirar pessoalmente', text)
code, text = self.probe('formas-envio')
self.assertIn('77\t6\tRetirar pessoalmente', text)