feat(wordcloud): 收口在途开发(布局/存储/前端)+ R4 WCD 生产任务(jobs wcd_file)与生产订单列表

This commit is contained in:
2026-08-13 14:22:48 +08:00
parent 1d17b5e20d
commit e518540235
32 changed files with 3525 additions and 592 deletions
+10
View File
@@ -53,6 +53,8 @@ class LayoutConstraintTests(unittest.TestCase):
"SEED",
"TARGET_FILL_RATIO",
"WC_FONT_PATH",
"AUTO_REPEAT_TO_FILL",
"AUTO_REPEAT_MAX",
)
}
config.WC_FONT_PATH = str(config.PROJECT_DEFAULT_FONT)
@@ -66,6 +68,7 @@ class LayoutConstraintTests(unittest.TestCase):
config.LAYOUT_SEED = 20260718
config.SEED = 20260718
config.TARGET_FILL_RATIO = 0.42
config.AUTO_REPEAT_TO_FILL = False
def tearDown(self) -> None:
for key, value in self.saved.items():
@@ -91,6 +94,13 @@ class LayoutConstraintTests(unittest.TestCase):
self.assertEqual(len(layout), len(names))
self.assertEqual(len({font_size for _, font_size, *_ in layout}), 1)
def test_auto_repeat_keeps_hd_layout_overlap_free(self) -> None:
config.AUTO_REPEAT_TO_FILL = True
config.AUTO_REPEAT_MAX = 2
names, result = self.generate(40)
self.assertGreaterEqual(len(result["hd_layout"]), len(names))
self.assertEqual(result["hd_overlap_pixels"], 0)
def test_explicit_equal_min_max_is_exact(self) -> None:
config.USER_MIN_FONT_SIZE = 12
config.USER_MAX_FONT_SIZE = 12