briefing 0.3.0__tar.gz → 0.4.1__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 (232) hide show
  1. {briefing-0.3.0 → briefing-0.4.1}/CHANGELOG.md +112 -1
  2. {briefing-0.3.0 → briefing-0.4.1}/PKG-INFO +15 -27
  3. {briefing-0.3.0 → briefing-0.4.1}/README.md +13 -8
  4. {briefing-0.3.0 → briefing-0.4.1}/pyproject.toml +8 -19
  5. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/__init__.py +35 -8
  6. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/__main__.py +1 -1
  7. briefing-0.4.1/src/briefing/_cli.py +255 -0
  8. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/_version.py +1 -1
  9. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/__init__.py +3 -0
  10. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/asset.py +82 -0
  11. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/banner.py +1 -10
  12. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/base.py +4 -0
  13. briefing-0.4.1/src/briefing/blocks/files.py +136 -0
  14. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/layout.py +24 -12
  15. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/blocks/text.py +8 -1
  16. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/export/_render.py +5 -3
  17. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/__init__.py +12 -2
  18. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/_blocks.py +114 -11
  19. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/_render_calendar.py +14 -8
  20. briefing-0.4.1/src/briefing/lab/_render_timeheatmap.py +262 -0
  21. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/static/calendar.js +10 -7
  22. briefing-0.4.1/src/briefing/reference.md +325 -0
  23. briefing-0.4.1/src/briefing/renderers/copy_embed.py +39 -0
  24. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/fragment.py +46 -7
  25. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/html.py +144 -21
  26. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/links.py +1 -0
  27. briefing-0.4.1/src/briefing/renderers/pack.py +29 -0
  28. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/plot.py +65 -5
  29. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/registry.py +42 -8
  30. briefing-0.4.1/src/briefing/renderers/size.py +118 -0
  31. briefing-0.4.1/src/briefing/renderers/table.py +370 -0
  32. briefing-0.4.1/src/briefing/schema/v1.json +2339 -0
  33. briefing-0.4.1/src/briefing/spec/__init__.py +148 -0
  34. briefing-0.4.1/src/briefing/spec/__main__.py +33 -0
  35. briefing-0.4.1/src/briefing/spec/_check.py +152 -0
  36. briefing-0.4.1/src/briefing/spec/_convert.py +472 -0
  37. briefing-0.4.1/src/briefing/spec/_data.py +243 -0
  38. briefing-0.4.1/src/briefing/spec/_diagnostic.py +81 -0
  39. briefing-0.4.1/src/briefing/spec/_model.py +420 -0
  40. briefing-0.4.1/src/briefing/spec/_reference.py +202 -0
  41. briefing-0.4.1/src/briefing/spec/_validate.py +208 -0
  42. briefing-0.4.1/src/briefing/static/copy-embed.css +72 -0
  43. briefing-0.4.1/src/briefing/static/copy-embed.js +173 -0
  44. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/export.js +5 -2
  45. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/report.css +52 -6
  46. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/report.js +147 -25
  47. briefing-0.4.1/src/briefing/static/unpack.js +179 -0
  48. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/templates/report.html.j2 +1 -1
  49. {briefing-0.3.0 → briefing-0.4.1}/tests/golden.py +54 -8
  50. {briefing-0.3.0 → briefing-0.4.1}/tests/scenarios.py +64 -0
  51. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/alert.html +2 -2
  52. briefing-0.4.1/tests/snapshots/golden/attachment.html +46 -0
  53. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/banner.html +2 -2
  54. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/bignumber.html +2 -2
  55. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/calendar-diverging.html +3 -3
  56. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/calendar.html +3 -3
  57. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/code.html +2 -2
  58. briefing-0.4.1/tests/snapshots/golden/copy-embed.html +651 -0
  59. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-df_all_null.html +2 -2
  60. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-df_constant.html +2 -2
  61. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-df_empty.html +2 -2
  62. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-df_mixed.html +2 -2
  63. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-df_single_row.html +2 -2
  64. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datadive-infinite.html +2 -2
  65. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-df_all_null.html +2 -2
  66. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-df_constant.html +2 -2
  67. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-df_empty.html +2 -2
  68. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-df_mixed.html +2 -2
  69. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-df_single_row.html +2 -2
  70. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/dataprofile-infinite.html +2 -2
  71. briefing-0.4.1/tests/snapshots/golden/datatable-big.html +44 -0
  72. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-df_all_null.html +2 -2
  73. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-df_constant.html +2 -2
  74. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-df_empty.html +2 -2
  75. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-df_mixed.html +2 -2
  76. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-df_single_row.html +2 -2
  77. briefing-0.4.1/tests/snapshots/golden/datatable-formats.html +43 -0
  78. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/datatable-infinite.html +2 -2
  79. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/everything.html +8 -3
  80. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/export-menu.html +3 -3
  81. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/formula.html +2 -2
  82. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/group-widths.html +2 -2
  83. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/html.html +2 -2
  84. briefing-0.4.1/tests/snapshots/golden/image.html +44 -0
  85. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/links.html +2 -2
  86. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/nested-layout.html +2 -2
  87. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/pages.html +2 -2
  88. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/plot-altair.html +8 -3
  89. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/plot-matplotlib.html +2 -2
  90. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/plot-plotly.html +8 -3
  91. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/select-dropdown.html +2 -2
  92. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/select-tabs.html +2 -2
  93. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-df_all_null.html +2 -2
  94. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-df_constant.html +2 -2
  95. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-df_empty.html +2 -2
  96. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-df_mixed.html +2 -2
  97. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-df_single_row.html +2 -2
  98. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-infinite.html +2 -2
  99. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/table-styler.html +2 -2
  100. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/text-markdown-table.html +2 -2
  101. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/text.html +2 -2
  102. briefing-0.4.1/tests/snapshots/golden/time-heatmap-months.html +44 -0
  103. briefing-0.4.1/tests/snapshots/golden/time-heatmap.html +44 -0
  104. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/toggle.html +2 -2
  105. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/two-matplotlib-plots.html +2 -2
  106. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/golden/two-table-stylers.html +2 -2
  107. {briefing-0.3.0 → briefing-0.4.1}/tests/test_blocks/test_banner.py +5 -2
  108. briefing-0.4.1/tests/test_blocks/test_files.py +69 -0
  109. briefing-0.4.1/tests/test_browser/test_big_tables.py +129 -0
  110. briefing-0.4.1/tests/test_browser/test_copy_embed.py +134 -0
  111. briefing-0.4.1/tests/test_browser/test_files.py +68 -0
  112. briefing-0.4.1/tests/test_browser/test_overflow.py +28 -0
  113. briefing-0.4.1/tests/test_browser/test_packed_runtimes.py +70 -0
  114. briefing-0.4.1/tests/test_browser/test_table_cells.py +38 -0
  115. briefing-0.4.1/tests/test_browser/test_table_csv.py +96 -0
  116. briefing-0.4.1/tests/test_browser/test_timeheatmap.py +57 -0
  117. briefing-0.4.1/tests/test_cli.py +211 -0
  118. briefing-0.4.1/tests/test_copy_embed.py +123 -0
  119. {briefing-0.3.0 → briefing-0.4.1}/tests/test_deprecations.py +5 -9
  120. {briefing-0.3.0 → briefing-0.4.1}/tests/test_fragments.py +1 -1
  121. briefing-0.4.1/tests/test_install.py +18 -0
  122. briefing-0.4.1/tests/test_lab/test_timeheatmap.py +125 -0
  123. {briefing-0.3.0 → briefing-0.4.1}/tests/test_no_viz_deps.py +6 -0
  124. briefing-0.4.1/tests/test_renderers/test_big_tables.py +97 -0
  125. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_export_menu.py +3 -23
  126. briefing-0.4.1/tests/test_renderers/test_files.py +72 -0
  127. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_plot.py +59 -4
  128. briefing-0.4.1/tests/test_renderers/test_size.py +153 -0
  129. briefing-0.4.1/tests/test_renderers/test_table_cells.py +141 -0
  130. briefing-0.4.1/tests/test_renderers/test_table_csv.py +39 -0
  131. briefing-0.4.1/tests/test_spec/__init__.py +0 -0
  132. briefing-0.4.1/tests/test_spec/test_from_spec.py +193 -0
  133. briefing-0.4.1/tests/test_spec/test_reference.py +114 -0
  134. briefing-0.4.1/tests/test_spec/test_round_trip.py +57 -0
  135. briefing-0.4.1/tests/test_spec/test_schema.py +55 -0
  136. briefing-0.4.1/tests/test_spec/test_spec_properties.py +150 -0
  137. briefing-0.4.1/tests/test_spec/test_to_spec.py +183 -0
  138. briefing-0.4.1/tests/test_spec/test_validate.py +275 -0
  139. {briefing-0.3.0 → briefing-0.4.1}/tests/test_static_scripts.py +16 -4
  140. briefing-0.3.0/src/briefing/_cli.py +0 -86
  141. briefing-0.3.0/src/briefing/renderers/table.py +0 -210
  142. briefing-0.3.0/tests/test_cli.py +0 -97
  143. {briefing-0.3.0 → briefing-0.4.1}/.gitignore +0 -0
  144. {briefing-0.3.0 → briefing-0.4.1}/LICENSE +0 -0
  145. {briefing-0.3.0 → briefing-0.4.1}/noxfile.py +0 -0
  146. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/_error.py +0 -0
  147. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/_frames.py +0 -0
  148. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/_preview.py +0 -0
  149. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/export/__init__.py +0 -0
  150. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/export/_image.py +0 -0
  151. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/export/_pdf.py +0 -0
  152. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/_render_datadive.py +0 -0
  153. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/_render_profile.py +0 -0
  154. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/lab/static/lab.js +0 -0
  155. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/py.typed +0 -0
  156. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/__init__.py +0 -0
  157. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/css_scope.py +0 -0
  158. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/formatting.py +0 -0
  159. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/formula.py +0 -0
  160. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/markup.py +0 -0
  161. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/normalize.py +0 -0
  162. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/renderers/script_json.py +0 -0
  163. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/embed-reset.css +0 -0
  164. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/embed.css +0 -0
  165. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/static/export.css +0 -0
  166. {briefing-0.3.0 → briefing-0.4.1}/src/briefing/templates/fragment.html.j2 +0 -0
  167. {briefing-0.3.0 → briefing-0.4.1}/tests/__init__.py +0 -0
  168. {briefing-0.3.0 → briefing-0.4.1}/tests/banner_images.py +0 -0
  169. {briefing-0.3.0 → briefing-0.4.1}/tests/compat_reports.py +0 -0
  170. {briefing-0.3.0 → briefing-0.4.1}/tests/conftest.py +0 -0
  171. {briefing-0.3.0 → briefing-0.4.1}/tests/contract.py +0 -0
  172. {briefing-0.3.0 → briefing-0.4.1}/tests/html_helpers.py +0 -0
  173. {briefing-0.3.0 → briefing-0.4.1}/tests/image_helpers.py +0 -0
  174. {briefing-0.3.0 → briefing-0.4.1}/tests/pdf_reader.py +0 -0
  175. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/compat_0_1_2/blocks.body.html +0 -0
  176. {briefing-0.3.0 → briefing-0.4.1}/tests/snapshots/compat_0_1_2/pages.body.html +0 -0
  177. {briefing-0.3.0 → briefing-0.4.1}/tests/strategies.py +0 -0
  178. {briefing-0.3.0 → briefing-0.4.1}/tests/test_blocks/__init__.py +0 -0
  179. {briefing-0.3.0 → briefing-0.4.1}/tests/test_blocks/test_base.py +0 -0
  180. {briefing-0.3.0 → briefing-0.4.1}/tests/test_blocks/test_layout.py +0 -0
  181. {briefing-0.3.0 → briefing-0.4.1}/tests/test_blocks/test_text.py +0 -0
  182. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/__init__.py +0 -0
  183. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/conftest.py +0 -0
  184. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_banner.py +0 -0
  185. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_bignumber.py +0 -0
  186. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_calendar.py +0 -0
  187. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_cli_export.py +0 -0
  188. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_code.py +0 -0
  189. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_datadive.py +0 -0
  190. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_datatable.py +0 -0
  191. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_export_image.py +0 -0
  192. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_export_menu.py +0 -0
  193. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_export_pdf.py +0 -0
  194. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_formula.py +0 -0
  195. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_fragments.py +0 -0
  196. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_layout.py +0 -0
  197. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_links.py +0 -0
  198. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_notebook.py +0 -0
  199. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_plots.py +0 -0
  200. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_print.py +0 -0
  201. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_roots.py +0 -0
  202. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_spacing.py +0 -0
  203. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_text.py +0 -0
  204. {briefing-0.3.0 → briefing-0.4.1}/tests/test_browser/test_toggle_theme.py +0 -0
  205. {briefing-0.3.0 → briefing-0.4.1}/tests/test_compat.py +0 -0
  206. {briefing-0.3.0 → briefing-0.4.1}/tests/test_contract.py +0 -0
  207. {briefing-0.3.0 → briefing-0.4.1}/tests/test_docs_gallery.py +0 -0
  208. {briefing-0.3.0 → briefing-0.4.1}/tests/test_docstrings.py +0 -0
  209. {briefing-0.3.0 → briefing-0.4.1}/tests/test_export.py +0 -0
  210. {briefing-0.3.0 → briefing-0.4.1}/tests/test_frames.py +0 -0
  211. {briefing-0.3.0 → briefing-0.4.1}/tests/test_golden.py +0 -0
  212. {briefing-0.3.0 → briefing-0.4.1}/tests/test_lab/__init__.py +0 -0
  213. {briefing-0.3.0 → briefing-0.4.1}/tests/test_lab/test_calendar.py +0 -0
  214. {briefing-0.3.0 → briefing-0.4.1}/tests/test_lab/test_datadive.py +0 -0
  215. {briefing-0.3.0 → briefing-0.4.1}/tests/test_lab/test_lab_boundary.py +0 -0
  216. {briefing-0.3.0 → briefing-0.4.1}/tests/test_lab/test_profile.py +0 -0
  217. {briefing-0.3.0 → briefing-0.4.1}/tests/test_pdf_reader.py +0 -0
  218. {briefing-0.3.0 → briefing-0.4.1}/tests/test_preview.py +0 -0
  219. {briefing-0.3.0 → briefing-0.4.1}/tests/test_properties.py +0 -0
  220. {briefing-0.3.0 → briefing-0.4.1}/tests/test_readme.py +0 -0
  221. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/__init__.py +0 -0
  222. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_css_scope.py +0 -0
  223. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_formatting.py +0 -0
  224. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_formula.py +0 -0
  225. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_html.py +0 -0
  226. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_links.py +0 -0
  227. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_markup.py +0 -0
  228. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_normalize.py +0 -0
  229. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_registry.py +0 -0
  230. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_reproducible.py +0 -0
  231. {briefing-0.3.0 → briefing-0.4.1}/tests/test_renderers/test_table.py +0 -0
  232. {briefing-0.3.0 → briefing-0.4.1}/tests/test_version.py +0 -0
@@ -10,6 +10,115 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.4.1] - 2026-11-20
14
+
15
+ ### Fixed
16
+
17
+ - A wide `DataTable` (long text, many columns) inside a `Group` or a `Page` widened the
18
+ whole report instead of scrolling in its own box, since every page is a `Group`; a
19
+ `Group`'s cells may now shrink below their content's width.
20
+ - `lab.TimeHeatmap`'s legend said "no such date" for grids with no blank cell, such as month
21
+ by year; it now does only when a cell can't exist.
22
+
23
+ ## [0.4.0] - 2026-11-20
24
+
25
+ ### Added
26
+
27
+ - A copy-embed button for readers (#124). `bf.Briefing(..., export="embed")` puts a `</>`
28
+ button on each page, labelled group, chart, table, text, number, alert, banner and lab
29
+ block: it copies that part as an embed fragment (as `bf.stringify(..., full_html=False)`
30
+ makes), CSS, scripts and chart runtime included, to paste into another page. What is
31
+ copied is the report as it was made, not as clicks left it: the report carries a
32
+ compressed copy of its untouched blocks. Where copying is refused, the code shows in a
33
+ dialog. The buttons never print or export. A report without `"embed"` is unchanged.
34
+ - Reports as JSON (#31). `bf.to_spec(report)` gives a report's JSON form (each block as
35
+ `{"type": "Text", ...}` with the constructor's parameters as keys) and the dataframes and
36
+ figures it names by reference; `bf.from_spec(spec, data)` builds the report back, byte for
37
+ byte the same. With `to_spec(..., inline=True)`, tables, Plotly and Altair charts and
38
+ images go into the JSON when they come back exactly the same. `bf.validate(spec, data)`
39
+ (or `bf.validate(report)`) returns every problem as a `bf.Diagnostic` with a code, a JSON
40
+ Pointer to where it is, a message and a hint, and never raises: unknown types and
41
+ options, wrong types, unknown references, duplicate names, empty containers, a block's
42
+ own checks and warnings, and whatever stops the report from rendering. `bf.schema()`
43
+ returns the format's JSON Schema, which also ships as `briefing/schema/v1.json`. A
44
+ `Select`'s `type` is written `"select_type"` in JSON, since `"type"` names the block.
45
+ - A reference for agents, shipped with the package (#32). `python -m briefing reference`
46
+ prints it: how to write, check and render a report's JSON, every block and option with
47
+ its type, default and description, the diagnostic codes and a complete example. It is
48
+ generated from the block classes, so it matches the installed version. The command line
49
+ gains `validate` (exit status 1 on an error, `--json` for a JSON list) and `render` for
50
+ report JSON, both taking referenced tables as `--data name=file.csv` (or `.parquet`), and
51
+ `skill --install`, which writes a Claude Code skill pointing to the reference into
52
+ `.claude/skills/briefing/`. The docs publish the reference as `llms-full.txt`, with an
53
+ `llms.txt` index.
54
+ - A size budget (#38). `bf.save` and `bf.stringify` warn when a report is bigger than
55
+ `max_size`, 10 MB by default, and name its largest parts with their place in the
56
+ report: `DataTable "orders" at /blocks/2 (9.1 MB), the Plotly runtime (2.0 MB)`. Chart
57
+ runtimes and the copy-embed data count. `max_size="25 MB"` or a number of bytes changes
58
+ it, `None` turns it off. `bf.validate` and `python -m briefing validate --max-size`
59
+ report it as a `too-big` warning.
60
+ - Big tables weigh less (#38). A `DataTable` of more than 1,000 rows keeps its first page
61
+ in the HTML and its rows compressed, unpacked by the page's script as the report opens:
62
+ 10,000 rows × 10 columns of decimals go from 5.0 MB to 1.8 MB, of whole numbers from
63
+ 1.3 MB to 0.3 MB. It sorts, searches, pages and prints as before; without JavaScript it
64
+ shows its first 25 rows and says how many more there are. Up to 1,000 rows, nothing
65
+ changes.
66
+ - Chart runtimes are compressed (#38). Plotly's and Vega's runtimes are stored deflated
67
+ and unpacked by the report as it opens, before any chart draws, with no network and no
68
+ newer browser feature: a report with one Plotly chart goes from 4.9 MB to 2.0 MB, one
69
+ with an Altair chart from 0.9 MB to 0.5 MB. Fragments, `embed_assets` and copy-embed
70
+ copies carry them the same way, and charts look and behave as before.
71
+ - Number formats and links in `DataTable` cells (#33). `formats={"revenue": "€ {:,.0f}",
72
+ "share": "{:.1%}", "day": "{:%d %b %Y}"}` shows a column with a Python format string or a
73
+ function, while cells still sort by their value. `links={"doi": "https://doi.org/{}",
74
+ "title": "{url}"}` makes a column's cells links, from the cell's value or another column
75
+ of the row; only `http(s)://` and `mailto:` URLs become links (the rest stays text, with
76
+ a warning), and they open in a new tab. Big tables pack the formatted text and the links.
77
+ - A CSV download for `DataTable` (#34). `download=True` puts a "CSV" button above the table:
78
+ it downloads the rows matching the reader's search, in their order, every page, with raw
79
+ values rather than the formatted text, as UTF-8 with a byte-order mark; formula-like text
80
+ is escaped. Off by default; it never prints or appears in exports.
81
+ - `Image` and `Attachment` blocks (#36). `bf.Image(path_or_bytes, caption=, alt=, width=)`
82
+ embeds a PNG, JPEG, GIF, WebP or SVG as a data URI, at its natural size or `width`,
83
+ described by `alt` or its caption. `bf.Attachment(path)`, `bf.Attachment(data,
84
+ filename=)` or `bf.Attachment(dataframe, filename="orders.csv")` puts a file in the report
85
+ for readers to download, with no server: any file type, text files stored compressed, a
86
+ dataframe as the same CSV as a `DataTable`'s button. Both have a JSON form, a copy-embed
87
+ button, and count towards the size budget.
88
+ - `lab.TimeHeatmap`, for time patterns (#111). `bf.lab.TimeHeatmap(df, date=, rows="weekday",
89
+ columns="hour")` crosses two units of one date column (`hour`, `weekday`, `day`, `week`,
90
+ `month`, `quarter`, `year`): when runs happen, seasonality, month-end effects, year over
91
+ year. Counts and sums are averaged per occurrence of their cell, so a weekday that
92
+ appears more often doesn't count double; cells that can't exist (31 February) are left
93
+ blank. It shares the calendar's options, legend, tooltip, width fitting and
94
+ `on_click="rows"`.
95
+
96
+ ### Changed
97
+
98
+ - pandas is a core dependency (#40): `Table`, `DataTable`, the lab blocks and tables written
99
+ in JSON need it, even for polars data. `import briefing` still imports it only when a
100
+ table needs it. A chart from a library older than briefing supports (Plotly 5, Altair 5,
101
+ Matplotlib 3.7, Bokeh 3) shows which version it needs in place of the chart.
102
+
103
+ - `Banner` no longer warns about images over 2 MB on its own: the size budget names a
104
+ heavy image when the report is over it (#38). `Banner.MAX_IMAGE_BYTES` is gone.
105
+
106
+ ### Deprecated
107
+
108
+ - `CalendarHeatmap`'s hour view (`views=("hours",)`), deprecated since 0.2.2, now has its
109
+ replacement, `lab.TimeHeatmap(rows="weekday", columns="hour")`, and goes in 0.5.0 (#111).
110
+
111
+ ### Removed
112
+
113
+ - The extras that added nothing (#40): `[pandas]` (pandas is in the core), `[plotly]`, `[bokeh]`,
114
+ `[matplotlib]` and `[charts]` (`Plot` uses the library you already have), and `[email]`
115
+ (there is no email feature yet; it comes back with it). An old `pip install
116
+ "briefing[plotly]"` still installs briefing, with a warning from pip. `[altair]`, `[lab]`,
117
+ `[image]`, `[docs]` and `[dev]` stay.
118
+
119
+ - `Briefing(export="pdf")`, deprecated since 0.2.4, now raises an error that says what to use
120
+ instead: Ctrl+P (or ⌘P) to print, with the same print layout, or `bf.save_pdf` for a file.
121
+
13
122
  ## [0.3.0] - 2026-11-20
14
123
 
15
124
  ### Added
@@ -316,7 +425,9 @@ First public release.
316
425
  inherits its base's renderer.
317
426
  - Ships inline type hints (`py.typed`). Python 3.11+.
318
427
 
319
- [Unreleased]: https://github.com/jeanmidevacc/briefing/compare/v0.3.0...HEAD
428
+ [Unreleased]: https://github.com/jeanmidevacc/briefing/compare/v0.4.1...HEAD
429
+ [0.4.1]: https://github.com/jeanmidevacc/briefing/compare/v0.4.0...v0.4.1
430
+ [0.4.0]: https://github.com/jeanmidevacc/briefing/compare/v0.3.0...v0.4.0
320
431
  [0.3.0]: https://github.com/jeanmidevacc/briefing/compare/v0.2.4...v0.3.0
321
432
  [0.2.4]: https://github.com/jeanmidevacc/briefing/compare/v0.2.3...v0.2.4
322
433
  [0.2.3]: https://github.com/jeanmidevacc/briefing/compare/v0.2.2...v0.2.3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: briefing
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: Build beautiful self-contained HTML reports from Python analysis
5
5
  Project-URL: Homepage, https://github.com/jeanmidevacc/briefing
6
6
  Project-URL: Documentation, https://briefing.readthedocs.io
@@ -23,18 +23,11 @@ Requires-Python: >=3.11
23
23
  Requires-Dist: jinja2>=3.1
24
24
  Requires-Dist: latex2mathml>=3.77
25
25
  Requires-Dist: markdown-it-py>=3.0
26
+ Requires-Dist: pandas>=2.0
26
27
  Requires-Dist: pygments>=2.15
27
28
  Provides-Extra: altair
28
29
  Requires-Dist: altair>=5.0; extra == 'altair'
29
30
  Requires-Dist: vl-convert-python>=1.0; extra == 'altair'
30
- Provides-Extra: bokeh
31
- Requires-Dist: bokeh>=3.0; extra == 'bokeh'
32
- Provides-Extra: charts
33
- Requires-Dist: altair>=5.0; extra == 'charts'
34
- Requires-Dist: bokeh>=3.0; extra == 'charts'
35
- Requires-Dist: matplotlib>=3.7; extra == 'charts'
36
- Requires-Dist: plotly>=5.0; extra == 'charts'
37
- Requires-Dist: vl-convert-python>=1.0; extra == 'charts'
38
31
  Provides-Extra: dev
39
32
  Requires-Dist: altair>=5.0; extra == 'dev'
40
33
  Requires-Dist: beautifulsoup4>=4.14; extra == 'dev'
@@ -59,19 +52,9 @@ Requires-Dist: myst-parser>=2.0; extra == 'docs'
59
52
  Requires-Dist: pandas>=2.0; extra == 'docs'
60
53
  Requires-Dist: plotly>=5.0; extra == 'docs'
61
54
  Requires-Dist: sphinx>=7.0; extra == 'docs'
62
- Provides-Extra: email
63
- Requires-Dist: kaleido>=0.2; extra == 'email'
64
- Requires-Dist: premailer>=3.10; extra == 'email'
65
55
  Provides-Extra: image
66
56
  Requires-Dist: playwright>=1.40; extra == 'image'
67
57
  Provides-Extra: lab
68
- Requires-Dist: pandas>=2.0; extra == 'lab'
69
- Provides-Extra: matplotlib
70
- Requires-Dist: matplotlib>=3.7; extra == 'matplotlib'
71
- Provides-Extra: pandas
72
- Requires-Dist: pandas>=2.0; extra == 'pandas'
73
- Provides-Extra: plotly
74
- Requires-Dist: plotly>=5.0; extra == 'plotly'
75
58
  Description-Content-Type: text/markdown
76
59
 
77
60
  # briefing
@@ -100,16 +83,14 @@ briefing is built to close all three gaps at once: a block grammar solid enough
100
83
  ## Install
101
84
 
102
85
  ```bash
103
- pip install briefing # the block grammar and the HTML renderer
104
- pip install "briefing[pandas]" # tables from dataframes
105
- pip install "briefing[lab]" # DataProfile, DataDive, CalendarHeatmap
86
+ pip install briefing # every block (lab included), HTML reports, tables
87
+ pip install "briefing[altair]" # for Altair charts: the Vega runtime they embed
106
88
  pip install "briefing[image]" # save_image / save_pdf (then: playwright install chromium)
107
89
  ```
108
90
 
109
- The core has no plotting or dataframe dependency. `Plot` takes a Plotly, Altair, Matplotlib or
110
- Bokeh figure and imports only the library you pass; install `[plotly]`, `[altair]`, `[bokeh]`,
111
- `[matplotlib]` or all of them with `[charts]`. Python 3.11+, pandas 2 and 3; polars and pyarrow
112
- tables are converted for you.
91
+ briefing installs pandas, for tables, but no chart library: `Plot` takes a Plotly, Altair,
92
+ Matplotlib or Bokeh figure and imports only the library you pass, which you already have.
93
+ Python 3.11+, pandas 2 and 3; polars and pyarrow tables are converted for you.
113
94
 
114
95
  ## Quick start
115
96
 
@@ -143,10 +124,17 @@ To put a chart, a table or a whole report into another page (a docs site, a note
143
124
  `bf.stringify(report, full_html=False)` gives one self-contained `<div>`, like Plotly's
144
125
  `to_html(full_html=False)`: it keeps its look and interactivity, and several share a page.
145
126
 
127
+ A report can also be written as JSON, by a coding agent or any other program:
128
+ `bf.validate(spec)` lists what is wrong in it, each problem with its place, and
129
+ `bf.from_spec(spec, data={"sales": df})` builds the report. `bf.to_spec(report)` gives the
130
+ JSON of a report written in Python, and `bf.schema()` the format's JSON Schema. For agents,
131
+ `python -m briefing reference` prints the format and every block's options at the installed
132
+ version, and `python -m briefing validate report.json` checks a report without Python code.
133
+
146
134
  ## Documentation
147
135
 
148
136
  **[briefing.readthedocs.io](https://briefing.readthedocs.io)** has a guide for each block family
149
- with live examples, themes, notebooks, printing and export, embedding in other pages, the
137
+ with live examples, themes, notebooks, printing and export, embedding in other pages, reports as JSON, the
150
138
  `briefing.lab` blocks, recipes and the full API reference.
151
139
 
152
140
  - [Changelog](CHANGELOG.md)
@@ -24,16 +24,14 @@ briefing is built to close all three gaps at once: a block grammar solid enough
24
24
  ## Install
25
25
 
26
26
  ```bash
27
- pip install briefing # the block grammar and the HTML renderer
28
- pip install "briefing[pandas]" # tables from dataframes
29
- pip install "briefing[lab]" # DataProfile, DataDive, CalendarHeatmap
27
+ pip install briefing # every block (lab included), HTML reports, tables
28
+ pip install "briefing[altair]" # for Altair charts: the Vega runtime they embed
30
29
  pip install "briefing[image]" # save_image / save_pdf (then: playwright install chromium)
31
30
  ```
32
31
 
33
- The core has no plotting or dataframe dependency. `Plot` takes a Plotly, Altair, Matplotlib or
34
- Bokeh figure and imports only the library you pass; install `[plotly]`, `[altair]`, `[bokeh]`,
35
- `[matplotlib]` or all of them with `[charts]`. Python 3.11+, pandas 2 and 3; polars and pyarrow
36
- tables are converted for you.
32
+ briefing installs pandas, for tables, but no chart library: `Plot` takes a Plotly, Altair,
33
+ Matplotlib or Bokeh figure and imports only the library you pass, which you already have.
34
+ Python 3.11+, pandas 2 and 3; polars and pyarrow tables are converted for you.
37
35
 
38
36
  ## Quick start
39
37
 
@@ -67,10 +65,17 @@ To put a chart, a table or a whole report into another page (a docs site, a note
67
65
  `bf.stringify(report, full_html=False)` gives one self-contained `<div>`, like Plotly's
68
66
  `to_html(full_html=False)`: it keeps its look and interactivity, and several share a page.
69
67
 
68
+ A report can also be written as JSON, by a coding agent or any other program:
69
+ `bf.validate(spec)` lists what is wrong in it, each problem with its place, and
70
+ `bf.from_spec(spec, data={"sales": df})` builds the report. `bf.to_spec(report)` gives the
71
+ JSON of a report written in Python, and `bf.schema()` the format's JSON Schema. For agents,
72
+ `python -m briefing reference` prints the format and every block's options at the installed
73
+ version, and `python -m briefing validate report.json` checks a report without Python code.
74
+
70
75
  ## Documentation
71
76
 
72
77
  **[briefing.readthedocs.io](https://briefing.readthedocs.io)** has a guide for each block family
73
- with live examples, themes, notebooks, printing and export, embedding in other pages, the
78
+ with live examples, themes, notebooks, printing and export, embedding in other pages, reports as JSON, the
74
79
  `briefing.lab` blocks, recipes and the full API reference.
75
80
 
76
81
  - [Changelog](CHANGELOG.md)
@@ -58,6 +58,8 @@ dependencies = [
58
58
  "pygments>=2.15",
59
59
  # Formula: LaTeX → MathML at render time (pure Python, MIT, no dependencies)
60
60
  "latex2mathml>=3.77",
61
+ # Table, DataTable, the lab blocks and tables written in JSON (#40); imported only when used
62
+ "pandas>=2.0",
61
63
  ]
62
64
 
63
65
  [project.urls]
@@ -68,21 +70,13 @@ Issues = "https://github.com/jeanmidevacc/briefing/issues"
68
70
  Changelog = "https://github.com/jeanmidevacc/briefing/blob/main/CHANGELOG.md"
69
71
 
70
72
  [project.optional-dependencies]
71
- # pip install briefing[pandas] — internal engine for Table / DataTable
72
- pandas = ["pandas>=2.0"]
73
- # pip install briefing[lab] — briefing.lab custom-visualisation blocks
74
- # (DataProfile, DataDive). Pure-SVG today; grows here so the core grammar
75
- # stays small.
76
- lab = ["pandas>=2.0"]
77
- # The `Plot` block is a bring-your-own-figure escape hatch. Install the plotting
78
- # library you actually use; briefing never imports one unless you pass its figure.
79
- plotly = ["plotly>=5.0"]
80
- # vl-convert-python supplies the Vega runtime that briefing embeds, so charts work offline
73
+ # The `Plot` block is a bring-your-own-figure escape hatch: it renders the figure you pass, from
74
+ # the library you already have, and checks that library's version (#40). Only Altair needs more:
75
+ # vl-convert-python supplies the Vega runtime that briefing embeds, so charts work offline.
81
76
  altair = ["altair>=5.0", "vl-convert-python>=1.0"]
82
- bokeh = ["bokeh>=3.0"]
83
- matplotlib = ["matplotlib>=3.7"]
84
- # pip install briefing[charts] — every supported Plot backend at once
85
- charts = ["plotly>=5.0", "altair>=5.0", "vl-convert-python>=1.0", "bokeh>=3.0", "matplotlib>=3.7"]
77
+ # pip install briefing[lab] — briefing.lab (DataProfile, DataDive, CalendarHeatmap) needs nothing
78
+ # beyond the core today; the extra stays so existing installs work and lab can grow here.
79
+ lab = []
86
80
  # pip install briefing[image] — bf.save_image / bf.save_pdf in headless Chromium;
87
81
  # run `playwright install chromium` once after installing
88
82
  image = ["playwright>=1.40"]
@@ -96,11 +90,6 @@ docs = [
96
90
  "matplotlib>=3.7",
97
91
  "plotly>=5.0",
98
92
  ]
99
- # pip install briefing[email]
100
- email = [
101
- "premailer>=3.10",
102
- "kaleido>=0.2",
103
- ]
104
93
  # pip install briefing[dev]
105
94
  dev = [
106
95
  "pytest>=8.0",
@@ -37,6 +37,7 @@ from briefing.blocks import (
37
37
  HTML,
38
38
  Alert,
39
39
  AlertLevel,
40
+ Attachment,
40
41
  Banner,
41
42
  BigNumber,
42
43
  Block,
@@ -45,6 +46,7 @@ from briefing.blocks import (
45
46
  DataTable,
46
47
  Formula,
47
48
  Group,
49
+ Image,
48
50
  Page,
49
51
  Plot,
50
52
  Select,
@@ -65,6 +67,10 @@ from briefing.renderers.formatting import Formatting, TextAlignment, Width
65
67
  # ── renderer ──────────────────────────────────────────────────────────────────
66
68
  from briefing.renderers.fragment import render_embed_assets, render_fragment
67
69
  from briefing.renderers.html import render_report
70
+ from briefing.renderers.size import DEFAULT_MAX_SIZE, Part, check_size, parse_size
71
+
72
+ # ── the report as JSON: to_spec / from_spec / validate (#31) ─────────────────
73
+ from briefing.spec import Diagnostic, from_spec, schema, to_spec, validate
68
74
 
69
75
  # ── public API ────────────────────────────────────────────────────────────────
70
76
 
@@ -78,8 +84,11 @@ def _render(
78
84
  include_assets: bool,
79
85
  embed_id: str | None,
80
86
  header: bool | None,
87
+ max_size: int | str | None,
81
88
  ) -> str:
82
- """A full report, or with ``full_html=False`` a fragment (#122)."""
89
+ """A full report, or with ``full_html=False`` a fragment (#122), checked against *max_size* (#38)."""
90
+ limit = parse_size(max_size)
91
+ parts: list[Part] | None = [] if limit is not None else None
83
92
  wrapped = Briefing.wrap(blocks)
84
93
  if full_html:
85
94
  options = {"include_assets": not include_assets, "embed_id": embed_id, "header": header}
@@ -88,11 +97,14 @@ def _render(
88
97
  raise BriefingError(
89
98
  f"{', '.join(given)} only apply to a fragment: pass full_html=False as well, or leave them out."
90
99
  )
91
- return render_report(wrapped, name=name, formatting=formatting, now=now)
92
- return render_fragment(
93
- wrapped, name=name, formatting=formatting, now=now,
94
- include_assets=include_assets, embed_id=embed_id, header=bool(header),
95
- )
100
+ html = render_report(wrapped, name=name, formatting=formatting, now=now, parts=parts)
101
+ else:
102
+ html = render_fragment(
103
+ wrapped, name=name, formatting=formatting, now=now,
104
+ include_assets=include_assets, embed_id=embed_id, header=bool(header), parts=parts,
105
+ )
106
+ check_size(html, parts or [], limit, stacklevel=3) # 3: _render <- save/stringify <- the caller
107
+ return html
96
108
 
97
109
 
98
110
  def save(
@@ -107,6 +119,7 @@ def save(
107
119
  include_assets: bool = True,
108
120
  embed_id: str | None = None,
109
121
  header: bool | None = None,
122
+ max_size: int | str | None = DEFAULT_MAX_SIZE,
110
123
  ) -> None:
111
124
  """Save *blocks* as a self-contained HTML file at *path*, or as a fragment to embed.
112
125
 
@@ -126,13 +139,17 @@ def save(
126
139
  embed_id: With ``full_html=False``: the fragment's id, which starts every id
127
140
  in it. Defaults to the name of its only block, else a hash of it.
128
141
  header: With ``full_html=False``: ``True`` shows *name* and the date above it.
142
+ max_size: Warn when the file is bigger than this: a number of bytes or a size
143
+ such as ``"25 MB"``; ``None`` never warns. The warning names the largest
144
+ parts: blocks (with their path, as :func:`to_spec` writes it), chart
145
+ runtimes, copy-embed data.
129
146
 
130
147
  Example::
131
148
 
132
149
  bf.save(report, "analysis.html", name="Q1 Analysis", open=True)
133
150
  bf.save(chart, "revenue-embed.html", full_html=False)
134
151
  """
135
- html = _render(blocks, name, formatting, now, full_html, include_assets, embed_id, header)
152
+ html = _render(blocks, name, formatting, now, full_html, include_assets, embed_id, header, max_size)
136
153
  dest = Path(path)
137
154
  dest.write_text(html, encoding="utf-8")
138
155
  if open:
@@ -149,6 +166,7 @@ def stringify(
149
166
  include_assets: bool = True,
150
167
  embed_id: str | None = None,
151
168
  header: bool | None = None,
169
+ max_size: int | str | None = DEFAULT_MAX_SIZE,
152
170
  ) -> str:
153
171
  """Render *blocks* to a self-contained HTML string, or to a fragment to embed.
154
172
 
@@ -175,6 +193,7 @@ def stringify(
175
193
  in it. Defaults to the name of its only block, else ``bf-e`` and 8 hex
176
194
  digits of a hash of the fragment. Two fragments on a page need two ids.
177
195
  header: With ``full_html=False``: ``True`` shows *name* and the date above it.
196
+ max_size: Warn when the result is bigger than this, as for :func:`save`.
178
197
 
179
198
  Returns:
180
199
  The complete HTML document, or the fragment.
@@ -185,7 +204,7 @@ def stringify(
185
204
  email_body = html # or write it anywhere a string goes
186
205
  fragment = bf.stringify(bf.Plot(fig, name="revenue"), full_html=False) # <div id="revenue" …>
187
206
  """
188
- return _render(blocks, name, formatting, now, full_html, include_assets, embed_id, header)
207
+ return _render(blocks, name, formatting, now, full_html, include_assets, embed_id, header, max_size)
189
208
 
190
209
 
191
210
  def embed_assets(blocks: Briefing | list[t.Any] | object) -> str:
@@ -234,7 +253,9 @@ __all__: list[str] = [
234
253
  "VAlign",
235
254
  "wrap_block",
236
255
  # blocks — asset
256
+ "Attachment",
237
257
  "Banner",
258
+ "Image",
238
259
  "DataTable",
239
260
  "Plot",
240
261
  "Table",
@@ -252,6 +273,12 @@ __all__: list[str] = [
252
273
  "save_image",
253
274
  "save_pdf",
254
275
  "stringify",
276
+ # the report as JSON
277
+ "Diagnostic",
278
+ "from_spec",
279
+ "schema",
280
+ "to_spec",
281
+ "validate",
255
282
  # meta
256
283
  "__version__",
257
284
  ]
@@ -1,4 +1,4 @@
1
- """``python -m briefing``: export saved reports (see :mod:`briefing._cli`)."""
1
+ """``python -m briefing``: report JSON for agents, and exports of saved reports (see :mod:`briefing._cli`)."""
2
2
  from __future__ import annotations
3
3
 
4
4
  import sys