tesserae-ui 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. tesserae_ui-0.1.0/.github/workflows/ci.yml +70 -0
  2. tesserae_ui-0.1.0/.github/workflows/docs.yml +58 -0
  3. tesserae_ui-0.1.0/.github/workflows/release.yml +102 -0
  4. tesserae_ui-0.1.0/.gitignore +9 -0
  5. tesserae_ui-0.1.0/ARCHITECTURE.md +523 -0
  6. tesserae_ui-0.1.0/BUILD_TRACKER.md +1518 -0
  7. tesserae_ui-0.1.0/LICENSE +21 -0
  8. tesserae_ui-0.1.0/LOG.md +1393 -0
  9. tesserae_ui-0.1.0/PKG-INFO +267 -0
  10. tesserae_ui-0.1.0/PLAN.md +224 -0
  11. tesserae_ui-0.1.0/README.md +238 -0
  12. tesserae_ui-0.1.0/docs/api/app.md +204 -0
  13. tesserae_ui-0.1.0/docs/api/index.md +41 -0
  14. tesserae_ui-0.1.0/docs/api/instantiate.md +32 -0
  15. tesserae_ui-0.1.0/docs/api/repeater.md +44 -0
  16. tesserae_ui-0.1.0/docs/api/spec.md +178 -0
  17. tesserae_ui-0.1.0/docs/architecture.md +86 -0
  18. tesserae_ui-0.1.0/docs/design/building-blocks.md +327 -0
  19. tesserae_ui-0.1.0/docs/getting-started.md +88 -0
  20. tesserae_ui-0.1.0/docs/guide/app-shell.md +192 -0
  21. tesserae_ui-0.1.0/docs/guide/apps-and-screens.md +79 -0
  22. tesserae_ui-0.1.0/docs/guide/bindings.md +87 -0
  23. tesserae_ui-0.1.0/docs/guide/component-fragments.md +279 -0
  24. tesserae_ui-0.1.0/docs/guide/components.md +99 -0
  25. tesserae_ui-0.1.0/docs/guide/controls.md +97 -0
  26. tesserae_ui-0.1.0/docs/guide/hot-reload.md +168 -0
  27. tesserae_ui-0.1.0/docs/guide/interaction.md +182 -0
  28. tesserae_ui-0.1.0/docs/guide/logging.md +73 -0
  29. tesserae_ui-0.1.0/docs/guide/naming-convention.md +46 -0
  30. tesserae_ui-0.1.0/docs/guide/overlays.md +91 -0
  31. tesserae_ui-0.1.0/docs/guide/reactivity.md +78 -0
  32. tesserae_ui-0.1.0/docs/guide/repeater.md +63 -0
  33. tesserae_ui-0.1.0/docs/guide/themes-and-fonts.md +219 -0
  34. tesserae_ui-0.1.0/docs/guide/widget-catalog.md +242 -0
  35. tesserae_ui-0.1.0/docs/index.md +100 -0
  36. tesserae_ui-0.1.0/docs/installation.md +92 -0
  37. tesserae_ui-0.1.0/examples/app_shell/Home_View.yaml +25 -0
  38. tesserae_ui-0.1.0/examples/app_shell/Home_ViewModel.py +15 -0
  39. tesserae_ui-0.1.0/examples/app_shell/Notes_View.yaml +20 -0
  40. tesserae_ui-0.1.0/examples/app_shell/Notes_ViewModel.py +10 -0
  41. tesserae_ui-0.1.0/examples/app_shell/app.py +109 -0
  42. tesserae_ui-0.1.0/examples/app_shell_file/Console_View.yaml +11 -0
  43. tesserae_ui-0.1.0/examples/app_shell_file/Console_ViewModel.py +13 -0
  44. tesserae_ui-0.1.0/examples/app_shell_file/Files_View.yaml +9 -0
  45. tesserae_ui-0.1.0/examples/app_shell_file/Home_View.yaml +25 -0
  46. tesserae_ui-0.1.0/examples/app_shell_file/Home_ViewModel.py +15 -0
  47. tesserae_ui-0.1.0/examples/app_shell_file/Notes_View.yaml +20 -0
  48. tesserae_ui-0.1.0/examples/app_shell_file/Notes_ViewModel.py +10 -0
  49. tesserae_ui-0.1.0/examples/app_shell_file/Outline_View.yaml +7 -0
  50. tesserae_ui-0.1.0/examples/app_shell_file/Properties_View.yaml +7 -0
  51. tesserae_ui-0.1.0/examples/app_shell_file/Studio_Shell.yaml +15 -0
  52. tesserae_ui-0.1.0/examples/app_shell_file/app.py +96 -0
  53. tesserae_ui-0.1.0/examples/counter/Counter_View.yaml +16 -0
  54. tesserae_ui-0.1.0/examples/counter/Counter_ViewModel.py +17 -0
  55. tesserae_ui-0.1.0/examples/counter/app.py +54 -0
  56. tesserae_ui-0.1.0/examples/multi_screen/Home_View.yaml +14 -0
  57. tesserae_ui-0.1.0/examples/multi_screen/Home_ViewModel.py +18 -0
  58. tesserae_ui-0.1.0/examples/multi_screen/Settings_View.yaml +13 -0
  59. tesserae_ui-0.1.0/examples/multi_screen/Settings_ViewModel.py +12 -0
  60. tesserae_ui-0.1.0/examples/multi_screen/app.py +75 -0
  61. tesserae_ui-0.1.0/examples/todo_list/TodoItem_View.yaml +20 -0
  62. tesserae_ui-0.1.0/examples/todo_list/TodoItem_ViewModel.py +26 -0
  63. tesserae_ui-0.1.0/examples/todo_list/Todo_View.yaml +12 -0
  64. tesserae_ui-0.1.0/examples/todo_list/Todo_ViewModel.py +35 -0
  65. tesserae_ui-0.1.0/examples/todo_list/app.py +81 -0
  66. tesserae_ui-0.1.0/mkdocs.yml +76 -0
  67. tesserae_ui-0.1.0/pyproject.toml +45 -0
  68. tesserae_ui-0.1.0/src/tesserae/__init__.py +45 -0
  69. tesserae_ui-0.1.0/src/tesserae/a11y.py +148 -0
  70. tesserae_ui-0.1.0/src/tesserae/app.py +686 -0
  71. tesserae_ui-0.1.0/src/tesserae/binding.py +511 -0
  72. tesserae_ui-0.1.0/src/tesserae/component.py +69 -0
  73. tesserae_ui-0.1.0/src/tesserae/controls.py +1175 -0
  74. tesserae_ui-0.1.0/src/tesserae/docking.py +370 -0
  75. tesserae_ui-0.1.0/src/tesserae/follow.py +89 -0
  76. tesserae_ui-0.1.0/src/tesserae/fonts.py +80 -0
  77. tesserae_ui-0.1.0/src/tesserae/icons.py +31 -0
  78. tesserae_ui-0.1.0/src/tesserae/images.py +32 -0
  79. tesserae_ui-0.1.0/src/tesserae/interaction.py +298 -0
  80. tesserae_ui-0.1.0/src/tesserae/listeners.py +57 -0
  81. tesserae_ui-0.1.0/src/tesserae/log.py +73 -0
  82. tesserae_ui-0.1.0/src/tesserae/naming.py +46 -0
  83. tesserae_ui-0.1.0/src/tesserae/overlays.py +595 -0
  84. tesserae_ui-0.1.0/src/tesserae/reactive.py +280 -0
  85. tesserae_ui-0.1.0/src/tesserae/repeater.py +102 -0
  86. tesserae_ui-0.1.0/src/tesserae/shell.py +283 -0
  87. tesserae_ui-0.1.0/src/tesserae/shell_file.py +329 -0
  88. tesserae_ui-0.1.0/src/tesserae/spec/__init__.py +14 -0
  89. tesserae_ui-0.1.0/src/tesserae/spec/build.py +705 -0
  90. tesserae_ui-0.1.0/src/tesserae/spec/cascade.py +129 -0
  91. tesserae_ui-0.1.0/src/tesserae/spec/components/AccordionHeader_Component.yaml +30 -0
  92. tesserae_ui-0.1.0/src/tesserae/spec/components/BadgeDot_Component.yaml +12 -0
  93. tesserae_ui-0.1.0/src/tesserae/spec/components/BadgeLabeled_Component.yaml +21 -0
  94. tesserae_ui-0.1.0/src/tesserae/spec/components/ButtonElevated_Component.yaml +26 -0
  95. tesserae_ui-0.1.0/src/tesserae/spec/components/ButtonFilledTonal_Component.yaml +22 -0
  96. tesserae_ui-0.1.0/src/tesserae/spec/components/ButtonFilled_Component.yaml +34 -0
  97. tesserae_ui-0.1.0/src/tesserae/spec/components/ButtonOutlined_Component.yaml +24 -0
  98. tesserae_ui-0.1.0/src/tesserae/spec/components/ButtonText_Component.yaml +22 -0
  99. tesserae_ui-0.1.0/src/tesserae/spec/components/CardElevated_Component.yaml +18 -0
  100. tesserae_ui-0.1.0/src/tesserae/spec/components/CardFilled_Component.yaml +12 -0
  101. tesserae_ui-0.1.0/src/tesserae/spec/components/CardOutlined_Component.yaml +14 -0
  102. tesserae_ui-0.1.0/src/tesserae/spec/components/Checkbox_Component.yaml +11 -0
  103. tesserae_ui-0.1.0/src/tesserae/spec/components/ChipAssist_Component.yaml +31 -0
  104. tesserae_ui-0.1.0/src/tesserae/spec/components/ChipFilterSelected_Component.yaml +28 -0
  105. tesserae_ui-0.1.0/src/tesserae/spec/components/ChipFilter_Component.yaml +25 -0
  106. tesserae_ui-0.1.0/src/tesserae/spec/components/ChipInput_Component.yaml +24 -0
  107. tesserae_ui-0.1.0/src/tesserae/spec/components/ChipSuggestion_Component.yaml +23 -0
  108. tesserae_ui-0.1.0/src/tesserae/spec/components/CircularProgress_Component.yaml +9 -0
  109. tesserae_ui-0.1.0/src/tesserae/spec/components/DatePickerDayOutsideMonth_Component.yaml +28 -0
  110. tesserae_ui-0.1.0/src/tesserae/spec/components/DatePickerDaySelected_Component.yaml +35 -0
  111. tesserae_ui-0.1.0/src/tesserae/spec/components/DatePickerDayToday_Component.yaml +31 -0
  112. tesserae_ui-0.1.0/src/tesserae/spec/components/DatePickerDay_Component.yaml +31 -0
  113. tesserae_ui-0.1.0/src/tesserae/spec/components/Dialog_Component.yaml +55 -0
  114. tesserae_ui-0.1.0/src/tesserae/spec/components/Divider_Component.yaml +14 -0
  115. tesserae_ui-0.1.0/src/tesserae/spec/components/ExtendedFabPrimary_Component.yaml +26 -0
  116. tesserae_ui-0.1.0/src/tesserae/spec/components/ExtendedFabSecondary_Component.yaml +26 -0
  117. tesserae_ui-0.1.0/src/tesserae/spec/components/ExtendedFabSurface_Component.yaml +34 -0
  118. tesserae_ui-0.1.0/src/tesserae/spec/components/ExtendedFabTertiary_Component.yaml +26 -0
  119. tesserae_ui-0.1.0/src/tesserae/spec/components/FabPrimary_Component.yaml +20 -0
  120. tesserae_ui-0.1.0/src/tesserae/spec/components/FabSecondary_Component.yaml +20 -0
  121. tesserae_ui-0.1.0/src/tesserae/spec/components/FabSurface_Component.yaml +27 -0
  122. tesserae_ui-0.1.0/src/tesserae/spec/components/FabTertiary_Component.yaml +20 -0
  123. tesserae_ui-0.1.0/src/tesserae/spec/components/IconButtonFilledTonal_Component.yaml +19 -0
  124. tesserae_ui-0.1.0/src/tesserae/spec/components/IconButtonFilled_Component.yaml +22 -0
  125. tesserae_ui-0.1.0/src/tesserae/spec/components/IconButtonOutlined_Component.yaml +21 -0
  126. tesserae_ui-0.1.0/src/tesserae/spec/components/IconButtonStandard_Component.yaml +21 -0
  127. tesserae_ui-0.1.0/src/tesserae/spec/components/Image_Component.yaml +25 -0
  128. tesserae_ui-0.1.0/src/tesserae/spec/components/LinearProgress_Component.yaml +9 -0
  129. tesserae_ui-0.1.0/src/tesserae/spec/components/Link_Component.yaml +28 -0
  130. tesserae_ui-0.1.0/src/tesserae/spec/components/ListItem_Component.yaml +26 -0
  131. tesserae_ui-0.1.0/src/tesserae/spec/components/LoadingIndicator_Component.yaml +11 -0
  132. tesserae_ui-0.1.0/src/tesserae/spec/components/MenuItem_Component.yaml +20 -0
  133. tesserae_ui-0.1.0/src/tesserae/spec/components/NodeGraph_Component.yaml +33 -0
  134. tesserae_ui-0.1.0/src/tesserae/spec/components/PeriodSelectorAM_Component.yaml +43 -0
  135. tesserae_ui-0.1.0/src/tesserae/spec/components/PeriodSelectorPM_Component.yaml +34 -0
  136. tesserae_ui-0.1.0/src/tesserae/spec/components/RadioButton_Component.yaml +9 -0
  137. tesserae_ui-0.1.0/src/tesserae/spec/components/SearchBar_Component.yaml +31 -0
  138. tesserae_ui-0.1.0/src/tesserae/spec/components/SearchView_Component.yaml +17 -0
  139. tesserae_ui-0.1.0/src/tesserae/spec/components/SideSheetModal_Component.yaml +49 -0
  140. tesserae_ui-0.1.0/src/tesserae/spec/components/SideSheetStandard_Component.yaml +17 -0
  141. tesserae_ui-0.1.0/src/tesserae/spec/components/Slider_Component.yaml +11 -0
  142. tesserae_ui-0.1.0/src/tesserae/spec/components/Snackbar_Component.yaml +25 -0
  143. tesserae_ui-0.1.0/src/tesserae/spec/components/SpinBox_Component.yaml +53 -0
  144. tesserae_ui-0.1.0/src/tesserae/spec/components/SplitButtonElevated_Component.yaml +43 -0
  145. tesserae_ui-0.1.0/src/tesserae/spec/components/SplitButtonFilledTonal_Component.yaml +39 -0
  146. tesserae_ui-0.1.0/src/tesserae/spec/components/SplitButtonFilled_Component.yaml +58 -0
  147. tesserae_ui-0.1.0/src/tesserae/spec/components/SplitButtonOutlined_Component.yaml +44 -0
  148. tesserae_ui-0.1.0/src/tesserae/spec/components/SplitButtonText_Component.yaml +39 -0
  149. tesserae_ui-0.1.0/src/tesserae/spec/components/StatusBar_Component.yaml +21 -0
  150. tesserae_ui-0.1.0/src/tesserae/spec/components/Switch_Component.yaml +12 -0
  151. tesserae_ui-0.1.0/src/tesserae/spec/components/TimePickerDial_Component.yaml +10 -0
  152. tesserae_ui-0.1.0/src/tesserae/spec/components/ToolbarDocked_Component.yaml +33 -0
  153. tesserae_ui-0.1.0/src/tesserae/spec/components/ToolbarFloating_Component.yaml +28 -0
  154. tesserae_ui-0.1.0/src/tesserae/spec/components/Tooltip_Component.yaml +21 -0
  155. tesserae_ui-0.1.0/src/tesserae/spec/components/TopAppBar_Component.yaml +32 -0
  156. tesserae_ui-0.1.0/src/tesserae/spec/components/TreeNodeBranch_Component.yaml +25 -0
  157. tesserae_ui-0.1.0/src/tesserae/spec/components/TreeNodeLeaf_Component.yaml +25 -0
  158. tesserae_ui-0.1.0/src/tesserae/spec/default_theme.yaml +90 -0
  159. tesserae_ui-0.1.0/src/tesserae/spec/expand.py +441 -0
  160. tesserae_ui-0.1.0/src/tesserae/spec/images.py +84 -0
  161. tesserae_ui-0.1.0/src/tesserae/spec/load.py +109 -0
  162. tesserae_ui-0.1.0/src/tesserae/spec/themes.py +77 -0
  163. tesserae_ui-0.1.0/src/tesserae/spec/watch.py +316 -0
  164. tesserae_ui-0.1.0/src/tesserae/theme.py +197 -0
  165. tesserae_ui-0.1.0/src/tesserae/tokens.py +293 -0
  166. tesserae_ui-0.1.0/src/tesserae/view.py +785 -0
  167. tesserae_ui-0.1.0/src/tesserae/widgets/__init__.py +114 -0
  168. tesserae_ui-0.1.0/src/tesserae/widgets/_composed.py +152 -0
  169. tesserae_ui-0.1.0/src/tesserae/widgets/_controls.py +13 -0
  170. tesserae_ui-0.1.0/src/tesserae/widgets/buttons.py +466 -0
  171. tesserae_ui-0.1.0/src/tesserae/widgets/containment.py +392 -0
  172. tesserae_ui-0.1.0/src/tesserae/widgets/date_time.py +261 -0
  173. tesserae_ui-0.1.0/src/tesserae/widgets/media.py +350 -0
  174. tesserae_ui-0.1.0/src/tesserae/widgets/navigation.py +467 -0
  175. tesserae_ui-0.1.0/src/tesserae/widgets/overlays.py +173 -0
  176. tesserae_ui-0.1.0/src/tesserae/widgets/progress.py +61 -0
  177. tesserae_ui-0.1.0/src/tesserae/widgets/search.py +114 -0
  178. tesserae_ui-0.1.0/src/tesserae/widgets/selection.py +95 -0
  179. tesserae_ui-0.1.0/src/tesserae/widgets/structural.py +378 -0
  180. tesserae_ui-0.1.0/tests/conftest.py +81 -0
  181. tesserae_ui-0.1.0/tests/fixtures/pixel.png +0 -0
  182. tesserae_ui-0.1.0/tests/helpers.py +39 -0
  183. tesserae_ui-0.1.0/tests/reference/test_binding_parity.json +1219 -0
  184. tesserae_ui-0.1.0/tests/reference/test_clickable.json +8 -0
  185. tesserae_ui-0.1.0/tests/reference/test_spec_build.json +175 -0
  186. tesserae_ui-0.1.0/tests/reference/test_theme_object.json +696 -0
  187. tesserae_ui-0.1.0/tests/reference/test_tokens.json +7008 -0
  188. tesserae_ui-0.1.0/tests/reference/test_tree_parity.json +15158 -0
  189. tesserae_ui-0.1.0/tests/reference/test_view.json +38 -0
  190. tesserae_ui-0.1.0/tests/reference.py +130 -0
  191. tesserae_ui-0.1.0/tests/test_a11y.py +268 -0
  192. tesserae_ui-0.1.0/tests/test_a11y_bindings.py +261 -0
  193. tesserae_ui-0.1.0/tests/test_app.py +220 -0
  194. tesserae_ui-0.1.0/tests/test_app_theme.py +162 -0
  195. tesserae_ui-0.1.0/tests/test_binding_parity.py +204 -0
  196. tesserae_ui-0.1.0/tests/test_carousel_splitter.py +239 -0
  197. tesserae_ui-0.1.0/tests/test_clickable.py +125 -0
  198. tesserae_ui-0.1.0/tests/test_component.py +208 -0
  199. tesserae_ui-0.1.0/tests/test_component_files.py +92 -0
  200. tesserae_ui-0.1.0/tests/test_component_reload.py +262 -0
  201. tesserae_ui-0.1.0/tests/test_components_screens.py +148 -0
  202. tesserae_ui-0.1.0/tests/test_composed_widgets.py +615 -0
  203. tesserae_ui-0.1.0/tests/test_controls.py +795 -0
  204. tesserae_ui-0.1.0/tests/test_controls_in_views.py +184 -0
  205. tesserae_ui-0.1.0/tests/test_dark_mode.py +115 -0
  206. tesserae_ui-0.1.0/tests/test_date_time.py +160 -0
  207. tesserae_ui-0.1.0/tests/test_docking.py +211 -0
  208. tesserae_ui-0.1.0/tests/test_fragments_buttons.py +106 -0
  209. tesserae_ui-0.1.0/tests/test_fragments_media_graph.py +41 -0
  210. tesserae_ui-0.1.0/tests/test_fragments_navigation.py +100 -0
  211. tesserae_ui-0.1.0/tests/test_fragments_overlays.py +154 -0
  212. tesserae_ui-0.1.0/tests/test_fragments_progress.py +92 -0
  213. tesserae_ui-0.1.0/tests/test_fragments_remaining_categories.py +201 -0
  214. tesserae_ui-0.1.0/tests/test_fragments_selection.py +173 -0
  215. tesserae_ui-0.1.0/tests/test_fragments_split_button.py +71 -0
  216. tesserae_ui-0.1.0/tests/test_fragments_structural.py +227 -0
  217. tesserae_ui-0.1.0/tests/test_hot_reload_live.py +291 -0
  218. tesserae_ui-0.1.0/tests/test_images.py +207 -0
  219. tesserae_ui-0.1.0/tests/test_innermost_click.py +198 -0
  220. tesserae_ui-0.1.0/tests/test_interaction.py +231 -0
  221. tesserae_ui-0.1.0/tests/test_log.py +119 -0
  222. tesserae_ui-0.1.0/tests/test_media.py +214 -0
  223. tesserae_ui-0.1.0/tests/test_no_tre_controls.py +90 -0
  224. tesserae_ui-0.1.0/tests/test_overlays.py +392 -0
  225. tesserae_ui-0.1.0/tests/test_paint_0_3_4.py +84 -0
  226. tesserae_ui-0.1.0/tests/test_reactive.py +201 -0
  227. tesserae_ui-0.1.0/tests/test_reference.py +37 -0
  228. tesserae_ui-0.1.0/tests/test_register_reload.py +133 -0
  229. tesserae_ui-0.1.0/tests/test_repeater.py +159 -0
  230. tesserae_ui-0.1.0/tests/test_search.py +145 -0
  231. tesserae_ui-0.1.0/tests/test_segmented_pagination.py +227 -0
  232. tesserae_ui-0.1.0/tests/test_shell.py +199 -0
  233. tesserae_ui-0.1.0/tests/test_shell_file.py +144 -0
  234. tesserae_ui-0.1.0/tests/test_shell_panels.py +221 -0
  235. tesserae_ui-0.1.0/tests/test_shell_reload.py +205 -0
  236. tesserae_ui-0.1.0/tests/test_spec_build.py +248 -0
  237. tesserae_ui-0.1.0/tests/test_spec_expand.py +336 -0
  238. tesserae_ui-0.1.0/tests/test_spec_load.py +207 -0
  239. tesserae_ui-0.1.0/tests/test_stylesheet_reload.py +249 -0
  240. tesserae_ui-0.1.0/tests/test_theme_following.py +218 -0
  241. tesserae_ui-0.1.0/tests/test_theme_object.py +118 -0
  242. tesserae_ui-0.1.0/tests/test_theme_reload.py +221 -0
  243. tesserae_ui-0.1.0/tests/test_theme_typography.py +102 -0
  244. tesserae_ui-0.1.0/tests/test_themes.py +182 -0
  245. tesserae_ui-0.1.0/tests/test_thread_gc.py +50 -0
  246. tesserae_ui-0.1.0/tests/test_tokens.py +135 -0
  247. tesserae_ui-0.1.0/tests/test_tree_parity.py +145 -0
  248. tesserae_ui-0.1.0/tests/test_view.py +380 -0
  249. tesserae_ui-0.1.0/tests/test_watch.py +191 -0
  250. tesserae_ui-0.1.0/tests/test_watch_thread.py +165 -0
  251. tesserae_ui-0.1.0/tests/test_widgets_date_time.py +18 -0
  252. tesserae_ui-0.1.0/tests/test_widgets_media.py +20 -0
  253. tesserae_ui-0.1.0/tests/test_widgets_progress.py +40 -0
  254. tesserae_ui-0.1.0/tests/test_widgets_selection.py +60 -0
  255. tesserae_ui-0.1.0/tests/treediff.py +137 -0
  256. tesserae_ui-0.1.0/tools/generate_tracker_artifact.py +753 -0
  257. tesserae_ui-0.1.0/tools/record_tre_reference.py +47 -0
  258. tesserae_ui-0.1.0/tools/spikes/README.md +14 -0
  259. tesserae_ui-0.1.0/tools/spikes/cascade_cost.py +163 -0
  260. tesserae_ui-0.1.0/tools/spikes/checkbox_on_primitives.py +108 -0
  261. tesserae_ui-0.1.0/tools/spikes/color_parity.py +57 -0
@@ -0,0 +1,70 @@
1
+ name: CI
2
+
3
+ # check + test + the examples, on Linux. Since tre 0.3.5.2 the engine is
4
+ # on PyPI as `tesserae-engine` (still `import tre`), so installing
5
+ # Tesserae installs it as a user's `pip install` would: no tre checkout, no
6
+ # Rust toolchain, no maturin build.
7
+
8
+ on:
9
+ push:
10
+ branches: [main]
11
+ pull_request:
12
+ branches: [main]
13
+
14
+ jobs:
15
+ test:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ path: tesserae
21
+
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+
26
+ # See `tre`'s own ci.yml for the full real reasoning -- lavapipe
27
+ # (Mesa's software Vulkan implementation) is enough for a real
28
+ # `wgpu::Instance::request_adapter` to succeed headlessly.
29
+ - name: Install system dependencies
30
+ run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers libfontconfig1-dev
31
+
32
+ # tre's source at the release pyproject's floor names, checked out only
33
+ # for a real font file (tests/test_themes.py reads Roboto through
34
+ # TRE_SOURCE_DIR); the wheel ships no .ttf files. Nothing is built from it.
35
+ - uses: actions/checkout@v4
36
+ with:
37
+ repository: mindderivative/tre
38
+ ref: v0.3.5.2
39
+ path: tre
40
+
41
+ # Pulls `tesserae-engine` (tre) from PyPI, per pyproject's `>=` floor.
42
+ - name: Install tesserae (editable, dev extras)
43
+ working-directory: tesserae
44
+ run: pip install -e ".[dev]"
45
+
46
+ - name: Run tests
47
+ working-directory: tesserae
48
+ env:
49
+ TRE_SOURCE_DIR: ${{ github.workspace }}/tre
50
+ run: pytest tests/
51
+
52
+ - name: Run the counter example
53
+ working-directory: tesserae
54
+ run: python examples/counter/app.py
55
+
56
+ - name: Run the multi-screen example
57
+ working-directory: tesserae
58
+ run: python examples/multi_screen/app.py
59
+
60
+ - name: Run the todo-list example
61
+ working-directory: tesserae
62
+ run: python examples/todo_list/app.py
63
+
64
+ - name: Run the app-shell example
65
+ working-directory: tesserae
66
+ run: python examples/app_shell/app.py
67
+
68
+ - name: Run the app-shell file example
69
+ working-directory: tesserae
70
+ run: python examples/app_shell_file/app.py
@@ -0,0 +1,58 @@
1
+ # Builds docs/ (MkDocs) and deploys it to GitHub Pages. Mirrors tre's
2
+ # own real docs.yml -- see that repo's own workflow for the full real
3
+ # reasoning behind this exact shape (separate from ci.yml's own gate,
4
+ # scoped via `paths:` so an unrelated source commit doesn't redeploy
5
+ # the same site, `mkdocs build --strict` catches broken internal
6
+ # links). Unlike tre, this repo's docs never import tesserae/tre
7
+ # itself -- pure prose + links -- so no Rust toolchain or editable
8
+ # install is needed here at all, just the two doc-build packages.
9
+ #
10
+ # Real, stated manual step (not something this workflow can do for
11
+ # itself): GitHub Pages needs "Build and deployment: GitHub Actions"
12
+ # enabled once in this repo's own Settings > Pages before the first
13
+ # real run of the `deploy` job below will succeed -- confirmed via
14
+ # `gh api repos/mindderivative/tesserae/pages` returning 404 (not yet
15
+ # enabled) at the time this workflow was added.
16
+ name: Deploy Docs
17
+
18
+ on:
19
+ push:
20
+ branches: [main]
21
+ paths:
22
+ - "docs/**"
23
+ - "mkdocs.yml"
24
+ - ".github/workflows/docs.yml"
25
+ workflow_dispatch:
26
+
27
+ permissions:
28
+ contents: read
29
+ pages: write
30
+ id-token: write
31
+
32
+ concurrency:
33
+ group: "pages"
34
+ cancel-in-progress: true
35
+
36
+ jobs:
37
+ build:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.12"
44
+ - run: pip install mkdocs mkdocs-material
45
+ - run: mkdocs build --strict
46
+ - uses: actions/upload-pages-artifact@v3
47
+ with:
48
+ path: site
49
+
50
+ deploy:
51
+ needs: build
52
+ runs-on: ubuntu-latest
53
+ environment:
54
+ name: github-pages
55
+ url: ${{ steps.deployment.outputs.page_url }}
56
+ steps:
57
+ - id: deployment
58
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,102 @@
1
+ name: Release
2
+
3
+ # Publishes Tesserae to PyPI as `tesserae-ui` (issue #15) when a GitHub
4
+ # Release is published. Trusted publishing (OIDC): PyPI's publisher for
5
+ # `tesserae-ui` names this repository, this file (`release.yml`) and the
6
+ # `pypi` environment, so no API token is stored anywhere. The `pypi`
7
+ # environment is where a required reviewer can hold each upload.
8
+ #
9
+ # The build job checks everything before anything leaves: the release tag
10
+ # matches `pyproject.toml`'s version, no dependency is PyPI's unrelated
11
+ # `tre` (the engine publishes as `tesserae-engine`, tre#19), and the built
12
+ # wheel passes the suite and runs the examples.
13
+
14
+ on:
15
+ release:
16
+ types: [published]
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ with:
24
+ path: tesserae
25
+
26
+ - uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+
30
+ - name: Check the tag and the dependencies
31
+ working-directory: tesserae
32
+ env:
33
+ TAG: ${{ github.event.release.tag_name }}
34
+ run: |
35
+ python - <<'EOF'
36
+ import os, re, sys, tomllib
37
+
38
+ project = tomllib.load(open("pyproject.toml", "rb"))["project"]
39
+ tag = os.environ["TAG"].removeprefix("v")
40
+ if tag != project["version"]:
41
+ sys.exit(f"the release tag {os.environ['TAG']!r} doesn't match pyproject's version {project['version']!r}")
42
+ names = [re.split(r"[\s<>=!~;\[(]", d, maxsplit=1)[0].lower().replace("_", "-") for d in project["dependencies"]]
43
+ if "tre" in names:
44
+ sys.exit("pyproject still depends on 'tre': on PyPI that's an unrelated regex library. "
45
+ "Depend on 'tesserae-engine' (tre#19) before publishing.")
46
+ print(f"releasing {project['name']} {project['version']}; dependencies {names}")
47
+ EOF
48
+
49
+ - name: Build the sdist and wheel
50
+ working-directory: tesserae
51
+ run: |
52
+ pip install build twine
53
+ python -m build
54
+ twine check --strict dist/*
55
+
56
+ - name: Install system dependencies
57
+ run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers libfontconfig1-dev
58
+
59
+ # From PyPI: the wheel's dependencies, `tesserae-engine` included, as a
60
+ # user's `pip install tesserae-ui` would get them. The installed wheel
61
+ # is tested, not the checkout.
62
+ - name: Install the built wheel
63
+ run: pip install tesserae/dist/*.whl pytest
64
+
65
+ # tre's source, only for the real font file tests/test_themes.py reads.
66
+ - uses: actions/checkout@v4
67
+ with:
68
+ repository: mindderivative/tre
69
+ ref: v0.3.5.2
70
+ path: tre
71
+
72
+ - name: Test the built wheel
73
+ working-directory: tesserae
74
+ env:
75
+ TRE_SOURCE_DIR: ${{ github.workspace }}/tre
76
+ run: |
77
+ python -c "import tesserae; assert 'site-packages' in tesserae.__file__, tesserae.__file__; print(tesserae.__file__)"
78
+ pytest tests/
79
+ for example in counter multi_screen todo_list app_shell app_shell_file; do
80
+ python examples/$example/app.py
81
+ done
82
+
83
+ - uses: actions/upload-artifact@v4
84
+ with:
85
+ name: dist
86
+ path: tesserae/dist/
87
+
88
+ publish:
89
+ needs: build
90
+ runs-on: ubuntu-latest
91
+ environment:
92
+ name: pypi
93
+ url: https://pypi.org/p/tesserae-ui
94
+ permissions:
95
+ id-token: write # trusted publishing: PyPI accepts this job's OIDC token instead of an API token
96
+ steps:
97
+ - uses: actions/download-artifact@v4
98
+ with:
99
+ name: dist
100
+ path: dist/
101
+
102
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,9 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ .pytest_cache/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ /site/
9
+ /tools/build-tracker-artifact.generated.html