briefing 0.7.0__tar.gz → 0.7.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 (307) hide show
  1. {briefing-0.7.0 → briefing-0.7.1}/CHANGELOG.md +35 -1
  2. briefing-0.7.1/PKG-INFO +214 -0
  3. briefing-0.7.1/README.md +152 -0
  4. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/__init__.py +2 -0
  5. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_cli.py +7 -0
  6. briefing-0.7.1/src/briefing/_digest.py +171 -0
  7. briefing-0.7.1/src/briefing/_experimental.py +39 -0
  8. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_run.py +12 -2
  9. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_scaffold.py +3 -1
  10. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_version.py +1 -1
  11. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/layout.py +1 -1
  12. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/deck/__init__.py +2 -1
  13. briefing-0.7.1/src/briefing/deck/_convert.py +178 -0
  14. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/email.py +4 -1
  15. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/reference.md +2 -0
  16. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_reference.py +2 -0
  17. briefing-0.7.1/tests/snapshots/golden_deck/from-report.html +58 -0
  18. briefing-0.7.1/tests/snapshots/golden_email/from-report.html +4 -0
  19. {briefing-0.7.0 → briefing-0.7.1}/tests/test_cli.py +17 -0
  20. briefing-0.7.1/tests/test_deck/test_from_report.py +138 -0
  21. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/test_golden.py +16 -0
  22. briefing-0.7.1/tests/test_email_from_report.py +170 -0
  23. briefing-0.7.1/tests/test_experimental.py +38 -0
  24. {briefing-0.7.0 → briefing-0.7.1}/tests/test_run_and_scaffold.py +14 -0
  25. briefing-0.7.0/PKG-INFO +0 -146
  26. briefing-0.7.0/README.md +0 -84
  27. {briefing-0.7.0 → briefing-0.7.1}/.gitignore +0 -0
  28. {briefing-0.7.0 → briefing-0.7.1}/LICENSE +0 -0
  29. {briefing-0.7.0 → briefing-0.7.1}/noxfile.py +0 -0
  30. {briefing-0.7.0 → briefing-0.7.1}/pyproject.toml +0 -0
  31. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/__main__.py +0 -0
  32. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_colors.py +0 -0
  33. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_error.py +0 -0
  34. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_frames.py +0 -0
  35. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_markdown_first.py +0 -0
  36. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_preview.py +0 -0
  37. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/_prose.py +0 -0
  38. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/__init__.py +0 -0
  39. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/_pictures.py +0 -0
  40. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/asset.py +0 -0
  41. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/banner.py +0 -0
  42. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/base.py +0 -0
  43. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/chips.py +0 -0
  44. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/files.py +0 -0
  45. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/header.py +0 -0
  46. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/blocks/text.py +0 -0
  47. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/color.py +0 -0
  48. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/deck/_blocks.py +0 -0
  49. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/deck/_export.py +0 -0
  50. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/deck/_render.py +0 -0
  51. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/diff.py +0 -0
  52. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/export/__init__.py +0 -0
  53. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/export/_image.py +0 -0
  54. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/export/_pdf.py +0 -0
  55. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/export/_render.py +0 -0
  56. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/fmt.py +0 -0
  57. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/__init__.py +0 -0
  58. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/_blocks.py +0 -0
  59. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/_render_calendar.py +0 -0
  60. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/_render_datadive.py +0 -0
  61. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/_render_profile.py +0 -0
  62. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/_render_timeheatmap.py +0 -0
  63. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/static/calendar.js +0 -0
  64. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/lab/static/lab.js +0 -0
  65. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/py.typed +0 -0
  66. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/__init__.py +0 -0
  67. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/copy_embed.py +0 -0
  68. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/css_scope.py +0 -0
  69. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/formatting.py +0 -0
  70. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/formula.py +0 -0
  71. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/fragment.py +0 -0
  72. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/header.py +0 -0
  73. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/html.py +0 -0
  74. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/inline.py +0 -0
  75. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/links.py +0 -0
  76. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/markup.py +0 -0
  77. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/normalize.py +0 -0
  78. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/pack.py +0 -0
  79. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/plot.py +0 -0
  80. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/registry.py +0 -0
  81. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/script_json.py +0 -0
  82. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/size.py +0 -0
  83. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/renderers/table.py +0 -0
  84. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/scale.py +0 -0
  85. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/schema/v1.json +0 -0
  86. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/__init__.py +0 -0
  87. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/__main__.py +0 -0
  88. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_check.py +0 -0
  89. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_convert.py +0 -0
  90. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_data.py +0 -0
  91. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_diagnostic.py +0 -0
  92. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_model.py +0 -0
  93. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/spec/_validate.py +0 -0
  94. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/copy-embed.css +0 -0
  95. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/copy-embed.js +0 -0
  96. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/deck.css +0 -0
  97. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/deck.js +0 -0
  98. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/embed-reset.css +0 -0
  99. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/embed.css +0 -0
  100. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/export.css +0 -0
  101. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/export.js +0 -0
  102. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/report.css +0 -0
  103. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/report.js +0 -0
  104. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/static/unpack.js +0 -0
  105. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/templates/deck.html.j2 +0 -0
  106. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/templates/fragment.html.j2 +0 -0
  107. {briefing-0.7.0 → briefing-0.7.1}/src/briefing/templates/report.html.j2 +0 -0
  108. {briefing-0.7.0 → briefing-0.7.1}/tests/__init__.py +0 -0
  109. {briefing-0.7.0 → briefing-0.7.1}/tests/banner_images.py +0 -0
  110. {briefing-0.7.0 → briefing-0.7.1}/tests/compat_reports.py +0 -0
  111. {briefing-0.7.0 → briefing-0.7.1}/tests/conftest.py +0 -0
  112. {briefing-0.7.0 → briefing-0.7.1}/tests/contract.py +0 -0
  113. {briefing-0.7.0 → briefing-0.7.1}/tests/golden.py +0 -0
  114. {briefing-0.7.0 → briefing-0.7.1}/tests/html_helpers.py +0 -0
  115. {briefing-0.7.0 → briefing-0.7.1}/tests/image_helpers.py +0 -0
  116. {briefing-0.7.0 → briefing-0.7.1}/tests/pdf_reader.py +0 -0
  117. {briefing-0.7.0 → briefing-0.7.1}/tests/scenarios.py +0 -0
  118. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/compat_0_1_2/blocks.body.html +0 -0
  119. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/compat_0_1_2/pages.body.html +0 -0
  120. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/alert.html +0 -0
  121. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/attachment.html +0 -0
  122. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/banner.html +0 -0
  123. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/bignumber.html +0 -0
  124. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/calendar-diverging.html +0 -0
  125. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/calendar.html +0 -0
  126. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/card.html +0 -0
  127. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/chips.html +0 -0
  128. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/code.html +0 -0
  129. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/copy-embed.html +0 -0
  130. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-df_all_null.html +0 -0
  131. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-df_constant.html +0 -0
  132. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-df_empty.html +0 -0
  133. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-df_mixed.html +0 -0
  134. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-df_single_row.html +0 -0
  135. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datadive-infinite.html +0 -0
  136. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-df_all_null.html +0 -0
  137. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-df_constant.html +0 -0
  138. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-df_empty.html +0 -0
  139. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-df_mixed.html +0 -0
  140. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-df_single_row.html +0 -0
  141. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/dataprofile-infinite.html +0 -0
  142. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-big.html +0 -0
  143. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-df_all_null.html +0 -0
  144. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-df_constant.html +0 -0
  145. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-df_empty.html +0 -0
  146. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-df_mixed.html +0 -0
  147. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-df_single_row.html +0 -0
  148. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-formats.html +0 -0
  149. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/datatable-infinite.html +0 -0
  150. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/everything.html +0 -0
  151. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/export-menu.html +0 -0
  152. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/formula.html +0 -0
  153. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/group-fit.html +0 -0
  154. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/group-widths.html +0 -0
  155. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/header.html +0 -0
  156. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/html.html +0 -0
  157. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/image.html +0 -0
  158. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/legend.html +0 -0
  159. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/links.html +0 -0
  160. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/nested-layout.html +0 -0
  161. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/pages.html +0 -0
  162. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/plot-altair.html +0 -0
  163. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/plot-matplotlib.html +0 -0
  164. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/plot-plotly.html +0 -0
  165. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/select-dropdown.html +0 -0
  166. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/select-tabs.html +0 -0
  167. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/tab-style.html +0 -0
  168. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-df_all_null.html +0 -0
  169. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-df_constant.html +0 -0
  170. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-df_empty.html +0 -0
  171. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-df_mixed.html +0 -0
  172. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-df_single_row.html +0 -0
  173. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-infinite.html +0 -0
  174. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/table-styler.html +0 -0
  175. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/text-markdown-table.html +0 -0
  176. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/text.html +0 -0
  177. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/time-heatmap-months.html +0 -0
  178. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/time-heatmap.html +0 -0
  179. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/toggle.html +0 -0
  180. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/two-matplotlib-plots.html +0 -0
  181. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden/two-table-stylers.html +0 -0
  182. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden_deck/basic.html +0 -0
  183. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden_deck/dark-theme.html +0 -0
  184. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden_deck/plotly.html +0 -0
  185. {briefing-0.7.0 → briefing-0.7.1}/tests/snapshots/golden_deck/tabs.html +0 -0
  186. {briefing-0.7.0 → briefing-0.7.1}/tests/strategies.py +0 -0
  187. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/__init__.py +0 -0
  188. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_banner.py +0 -0
  189. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_base.py +0 -0
  190. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_bignumber_trend.py +0 -0
  191. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_card.py +0 -0
  192. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_chips.py +0 -0
  193. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_files.py +0 -0
  194. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_header.py +0 -0
  195. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_layout.py +0 -0
  196. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_lighter_images.py +0 -0
  197. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_tab_style.py +0 -0
  198. {briefing-0.7.0 → briefing-0.7.1}/tests/test_blocks/test_text.py +0 -0
  199. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/__init__.py +0 -0
  200. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/conftest.py +0 -0
  201. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_alert_colours.py +0 -0
  202. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_banner.py +0 -0
  203. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_big_tables.py +0 -0
  204. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_bignumber.py +0 -0
  205. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_calendar.py +0 -0
  206. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_card.py +0 -0
  207. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_chips.py +0 -0
  208. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_cli_export.py +0 -0
  209. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_code.py +0 -0
  210. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_copy_embed.py +0 -0
  211. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_datadive.py +0 -0
  212. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_datatable.py +0 -0
  213. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_deck.py +0 -0
  214. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_deck_export.py +0 -0
  215. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_dropdown_a11y.py +0 -0
  216. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_export_image.py +0 -0
  217. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_export_menu.py +0 -0
  218. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_export_pdf.py +0 -0
  219. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_files.py +0 -0
  220. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_formula.py +0 -0
  221. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_fragments.py +0 -0
  222. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_group_breakpoints.py +0 -0
  223. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_header.py +0 -0
  224. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_layout.py +0 -0
  225. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_links.py +0 -0
  226. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_notebook.py +0 -0
  227. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_overflow.py +0 -0
  228. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_packed_runtimes.py +0 -0
  229. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_plots.py +0 -0
  230. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_print.py +0 -0
  231. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_roots.py +0 -0
  232. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_spacing.py +0 -0
  233. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_tab_style.py +0 -0
  234. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_table_cells.py +0 -0
  235. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_table_csv.py +0 -0
  236. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_table_wrap.py +0 -0
  237. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_text.py +0 -0
  238. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_theme_tables.py +0 -0
  239. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_timeheatmap.py +0 -0
  240. {briefing-0.7.0 → briefing-0.7.1}/tests/test_browser/test_toggle_theme.py +0 -0
  241. {briefing-0.7.0 → briefing-0.7.1}/tests/test_chart_themes.py +0 -0
  242. {briefing-0.7.0 → briefing-0.7.1}/tests/test_color_check.py +0 -0
  243. {briefing-0.7.0 → briefing-0.7.1}/tests/test_compat.py +0 -0
  244. {briefing-0.7.0 → briefing-0.7.1}/tests/test_contract.py +0 -0
  245. {briefing-0.7.0 → briefing-0.7.1}/tests/test_copy_embed.py +0 -0
  246. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/__init__.py +0 -0
  247. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/helpers.py +0 -0
  248. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/test_contract.py +0 -0
  249. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/test_objects.py +0 -0
  250. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/test_render.py +0 -0
  251. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deck/test_spec.py +0 -0
  252. {briefing-0.7.0 → briefing-0.7.1}/tests/test_deprecations.py +0 -0
  253. {briefing-0.7.0 → briefing-0.7.1}/tests/test_diff.py +0 -0
  254. {briefing-0.7.0 → briefing-0.7.1}/tests/test_docs_gallery.py +0 -0
  255. {briefing-0.7.0 → briefing-0.7.1}/tests/test_docstrings.py +0 -0
  256. {briefing-0.7.0 → briefing-0.7.1}/tests/test_email.py +0 -0
  257. {briefing-0.7.0 → briefing-0.7.1}/tests/test_export.py +0 -0
  258. {briefing-0.7.0 → briefing-0.7.1}/tests/test_fragments.py +0 -0
  259. {briefing-0.7.0 → briefing-0.7.1}/tests/test_frames.py +0 -0
  260. {briefing-0.7.0 → briefing-0.7.1}/tests/test_golden.py +0 -0
  261. {briefing-0.7.0 → briefing-0.7.1}/tests/test_install.py +0 -0
  262. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/__init__.py +0 -0
  263. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_calendar.py +0 -0
  264. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_datadive.py +0 -0
  265. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_lab_boundary.py +0 -0
  266. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_legend.py +0 -0
  267. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_profile.py +0 -0
  268. {briefing-0.7.0 → briefing-0.7.1}/tests/test_lab/test_timeheatmap.py +0 -0
  269. {briefing-0.7.0 → briefing-0.7.1}/tests/test_markdown_first.py +0 -0
  270. {briefing-0.7.0 → briefing-0.7.1}/tests/test_no_viz_deps.py +0 -0
  271. {briefing-0.7.0 → briefing-0.7.1}/tests/test_pdf_reader.py +0 -0
  272. {briefing-0.7.0 → briefing-0.7.1}/tests/test_preview.py +0 -0
  273. {briefing-0.7.0 → briefing-0.7.1}/tests/test_properties.py +0 -0
  274. {briefing-0.7.0 → briefing-0.7.1}/tests/test_prose.py +0 -0
  275. {briefing-0.7.0 → briefing-0.7.1}/tests/test_readme.py +0 -0
  276. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/__init__.py +0 -0
  277. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_big_tables.py +0 -0
  278. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_css_scope.py +0 -0
  279. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_export_menu.py +0 -0
  280. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_files.py +0 -0
  281. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_formatting.py +0 -0
  282. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_formula.py +0 -0
  283. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_html.py +0 -0
  284. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_inline.py +0 -0
  285. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_links.py +0 -0
  286. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_markup.py +0 -0
  287. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_normalize.py +0 -0
  288. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_plot.py +0 -0
  289. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_registry.py +0 -0
  290. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_reproducible.py +0 -0
  291. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_size.py +0 -0
  292. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_table.py +0 -0
  293. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_table_cells.py +0 -0
  294. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_table_csv.py +0 -0
  295. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_table_wrap.py +0 -0
  296. {briefing-0.7.0 → briefing-0.7.1}/tests/test_renderers/test_theme_colours.py +0 -0
  297. {briefing-0.7.0 → briefing-0.7.1}/tests/test_scale.py +0 -0
  298. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/__init__.py +0 -0
  299. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_from_spec.py +0 -0
  300. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_reference.py +0 -0
  301. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_round_trip.py +0 -0
  302. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_schema.py +0 -0
  303. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_spec_properties.py +0 -0
  304. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_to_spec.py +0 -0
  305. {briefing-0.7.0 → briefing-0.7.1}/tests/test_spec/test_validate.py +0 -0
  306. {briefing-0.7.0 → briefing-0.7.1}/tests/test_static_scripts.py +0 -0
  307. {briefing-0.7.0 → briefing-0.7.1}/tests/test_version.py +0 -0
@@ -10,6 +10,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.7.1] - 2026-11-22
14
+
15
+ ### Added
16
+
17
+ - `bf.deck.from_report(report, title=)` (experimental): a first draft of a deck from a
18
+ report, an ordinary `Deck` to adjust before saving (#199). Each page starts a slide; in a
19
+ `Text`, `# Heading` makes a section slide, `## Heading` starts a slide (its `{#name}`
20
+ names it) and a `---` line starts one that keeps the title; every other block stays whole.
21
+ A `Banner` that opens the report becomes the title slide.
22
+ - `bf.email.from_report(report, link=, page=)` (experimental): a first draft of an email
23
+ digest from one page of a report, an ordinary `Digest` (#199). Text, numbers, alerts and
24
+ charts stay; a `DataTable` becomes a `Table` of its first 30 rows with its formats, a
25
+ `Select` its first panel, a `Card`, `Banner` or `Chips` their text; toggles, images, files,
26
+ code, raw HTML and lab blocks are left out, named in one warning. Without `link=`, links
27
+ into the report keep only their words.
28
+ - `bf.run(..., argv=["--deck"])` also writes a first draft of a slide deck from the report
29
+ (`<out>-deck.html`), and `python -m briefing render report.json --deck deck.html` does the
30
+ same from JSON; both experimental (#199). The decks and email guides each gain a "From a
31
+ report" section, marked experimental.
32
+ - `bf.ExperimentalWarning`: experimental functions warn once per session that what they
33
+ return may change in any release, without a deprecation period (#199).
34
+
35
+ ### Changed
36
+
37
+ - The documentation is grouped into sections (Get started, Blocks, Reports, Slide decks,
38
+ Email digests, Ways to write it, Look, Examples, API reference). Its landing page shows the
39
+ three outputs side by side, and five pages are new: "How briefing works", "Links",
40
+ "Reports", "Coding agents" and "Colours and scales" (#206).
41
+ - The README presents briefing as one grammar with three outputs (report, slide deck, email
42
+ digest), with a quick start for each, the ways to write a report (Python, Markdown, a
43
+ project, JSON for agents) and what's new since 0.4; its screenshot shows the current look
44
+ (#200).
45
+
13
46
  ## [0.7.0] - 2026-11-22
14
47
 
15
48
  ### Added
@@ -589,7 +622,8 @@ First public release.
589
622
  inherits its base's renderer.
590
623
  - Ships inline type hints (`py.typed`). Python 3.11+.
591
624
 
592
- [Unreleased]: https://github.com/jeanmidevacc/briefing/compare/v0.7.0...HEAD
625
+ [Unreleased]: https://github.com/jeanmidevacc/briefing/compare/v0.7.1...HEAD
626
+ [0.7.1]: https://github.com/jeanmidevacc/briefing/compare/v0.7.0...v0.7.1
593
627
  [0.7.0]: https://github.com/jeanmidevacc/briefing/compare/v0.6.1...v0.7.0
594
628
  [0.6.1]: https://github.com/jeanmidevacc/briefing/compare/v0.6.0...v0.6.1
595
629
  [0.6.0]: https://github.com/jeanmidevacc/briefing/compare/v0.5.0...v0.6.0
@@ -0,0 +1,214 @@
1
+ Metadata-Version: 2.3
2
+ Name: briefing
3
+ Version: 0.7.1
4
+ Summary: Build beautiful self-contained HTML reports from Python analysis
5
+ Project-URL: Homepage, https://github.com/jeanmidevacc/briefing
6
+ Project-URL: Documentation, https://briefing.readthedocs.io
7
+ Project-URL: Repository, https://github.com/jeanmidevacc/briefing
8
+ Project-URL: Issues, https://github.com/jeanmidevacc/briefing/issues
9
+ Project-URL: Changelog, https://github.com/jeanmidevacc/briefing/blob/main/CHANGELOG.md
10
+ Author: jeanmidevacc
11
+ License: Apache-2.0
12
+ Keywords: data,html,pandas,polars,reporting,visualization
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: jinja2>=3.1
24
+ Requires-Dist: latex2mathml>=3.77
25
+ Requires-Dist: markdown-it-py>=3.0
26
+ Requires-Dist: pandas>=2.0
27
+ Requires-Dist: pygments>=2.15
28
+ Provides-Extra: altair
29
+ Requires-Dist: altair>=5.0; extra == 'altair'
30
+ Requires-Dist: vl-convert-python>=1.0; extra == 'altair'
31
+ Provides-Extra: dev
32
+ Requires-Dist: altair>=5.0; extra == 'dev'
33
+ Requires-Dist: beautifulsoup4>=4.14; extra == 'dev'
34
+ Requires-Dist: hypothesis>=6.100; extra == 'dev'
35
+ Requires-Dist: matplotlib>=3.7; extra == 'dev'
36
+ Requires-Dist: mypy>=1.10; extra == 'dev'
37
+ Requires-Dist: nox>=2024.4; extra == 'dev'
38
+ Requires-Dist: pandas-stubs>=2.0; extra == 'dev'
39
+ Requires-Dist: pandas>=2.0; extra == 'dev'
40
+ Requires-Dist: pillow>=10.0; extra == 'dev'
41
+ Requires-Dist: plotly>=5.0; extra == 'dev'
42
+ Requires-Dist: pyarrow>=15.0; extra == 'dev'
43
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
44
+ Requires-Dist: pytest-playwright>=0.5; extra == 'dev'
45
+ Requires-Dist: pytest-snapshot>=0.9; extra == 'dev'
46
+ Requires-Dist: pytest>=8.0; extra == 'dev'
47
+ Requires-Dist: ruff>=0.4; extra == 'dev'
48
+ Requires-Dist: vl-convert-python>=1.0; extra == 'dev'
49
+ Provides-Extra: docs
50
+ Requires-Dist: furo>=2024.1.29; extra == 'docs'
51
+ Requires-Dist: matplotlib>=3.7; extra == 'docs'
52
+ Requires-Dist: myst-parser>=2.0; extra == 'docs'
53
+ Requires-Dist: pandas>=2.0; extra == 'docs'
54
+ Requires-Dist: plotly>=5.0; extra == 'docs'
55
+ Requires-Dist: sphinx>=7.0; extra == 'docs'
56
+ Provides-Extra: image
57
+ Requires-Dist: playwright>=1.40; extra == 'image'
58
+ Provides-Extra: lab
59
+ Provides-Extra: pillow
60
+ Requires-Dist: pillow>=10.0; extra == 'pillow'
61
+ Description-Content-Type: text/markdown
62
+
63
+ # briefing
64
+
65
+ [![Documentation](https://readthedocs.org/projects/briefing/badge/?version=latest)](https://briefing.readthedocs.io)
66
+ [![PyPI](https://img.shields.io/pypi/v/briefing)](https://pypi.org/project/briefing/)
67
+
68
+ A Python framework for self-contained reports, slide decks and email digests, written by a
69
+ person, a coding agent, or both together.
70
+
71
+ Everything is built from one short grammar of blocks (`Text`, `BigNumber`, `Plot`, `DataTable`,
72
+ `Group`, `Select`, …) and saved as **one HTML file** with every script, style and image inside
73
+ it: no CDN, no server, no account. It opens offline, forever, and prints or exports to PNG and
74
+ PDF cleanly.
75
+
76
+ ![A briefing report: three KPIs above a line chart](https://raw.githubusercontent.com/jeanmidevacc/briefing/main/docs/_static/export/page.png)
77
+
78
+ ## Why briefing exists
79
+
80
+ Three things led me here:
81
+
82
+ - **Coding agents are good at making something to show you, not at making it consistently.**
83
+ A few months of building with coding agents surfaced the same gap every time: they're happy
84
+ to produce an artifact, but each one comes out with its own structure, and nothing tracks how
85
+ a piece of content evolved across a project. There was no shared grammar that a person and an
86
+ agent could both build reports from, and how a report came to be stayed opaque.
87
+ - **[datapane](https://github.com/datapane/datapane) was the cleanest report builder I'd used.**
88
+ Block-based, self-contained HTML output, a dead-simple API. I relied on it constantly to turn
89
+ Python analysis into reports for stakeholders and to monitor pipelines. It was decommissioned
90
+ in 2023 when the SaaS behind it shut down, and nothing since has replaced it. briefing is its
91
+ spiritual successor, with a few new turns.
92
+ - **No visualization tool covers everything, and the ones that push furthest often don't stick
93
+ around.** Years of building visualizations taught me that every tool, however good, eventually
94
+ falls short of the next thing you want to show. The niche packages that *do* push past that,
95
+ like [Facets](https://github.com/PAIR-code/facets) (PAIR / Google) and its Facets Dive
96
+ explorer, bring real value but rarely stay maintained. I wanted a place of my own to keep
97
+ building and sharing that kind of custom, interactive visualization, without depending on
98
+ someone else's side project staying alive.
99
+
100
+ briefing is built to close all three gaps at once: a block grammar solid enough for me *and* my
101
+ coding agents to build reports from consistently, with datapane's simplicity and a home for the
102
+ custom, interactive visualization that inspired it. All of it self-contained, offline, with no
103
+ cloud account required.
104
+
105
+ ## One grammar, three outputs
106
+
107
+ | | Report | Slide deck | Email digest |
108
+ | --- | --- | --- | --- |
109
+ | **For** | Exploring and reference | Presenting, or sending round as a PDF | A short summary in the inbox |
110
+ | **Holds** | Every block: pages, tabs, links | Every block, one slide at a time | Text, numbers, alerts, charts as images, short tables |
111
+ | **Interactive** | Yes | Yes in the browser, as it shows in a PDF | No: mail apps run no script |
112
+ | **Made with** | `bf.Briefing` → `bf.save` | `bf.deck.Deck` → `bf.deck.save` | `bf.email.Digest` → `bf.email.to_message` |
113
+ | **From a report** | — | `bf.deck.from_report` (experimental) | `bf.email.from_report` (experimental) |
114
+
115
+ ## Install
116
+
117
+ ```bash
118
+ pip install briefing # every block (lab included): reports, decks, email digests
119
+ pip install "briefing[altair]" # Altair charts: the Vega runtime they embed
120
+ pip install "briefing[pillow]" # lighter images: resize and re-encode them on the way in
121
+ pip install "briefing[image]" # PNG and PDF exports (then, once: playwright install chromium)
122
+ ```
123
+
124
+ briefing installs pandas, for tables, but no chart library: `Plot` takes a Plotly, Altair,
125
+ Matplotlib or Bokeh figure and imports only the library you pass, which you already have.
126
+ Python 3.11+, pandas 2 and 3; polars and pyarrow tables are converted for you.
127
+
128
+ ## Quick start
129
+
130
+ A report:
131
+
132
+ ```python
133
+ import briefing as bf
134
+
135
+ report = bf.Briefing(
136
+ bf.Text("# Sales, Q1 2026"),
137
+ bf.Group(
138
+ bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"), # ▼ -12.5%, in red
139
+ bf.BigNumber("Margin", 0.31, prev_value=0.29, format="{:.0%}"),
140
+ columns=2,
141
+ ),
142
+ bf.Select(
143
+ bf.Plot(fig, label="Trend"),
144
+ bf.DataTable(df, label="Rows"),
145
+ bf.lab.DataProfile(df, label="Profile"),
146
+ ),
147
+ )
148
+ bf.save(report, "q1.html", name="Sales, Q1 2026")
149
+ ```
150
+
151
+ Here `df` is a dataframe and `fig` a chart from any supported library. In a notebook, any block
152
+ previews itself as the last expression of a cell.
153
+
154
+ The same blocks, as slides:
155
+
156
+ ```python
157
+ deck = bf.deck.Deck(
158
+ bf.deck.Slide(title="Sales, Q1 2026"),
159
+ bf.deck.Slide(bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"), title="Summary"),
160
+ bf.deck.Slide(bf.Plot(fig), title="Revenue by month"),
161
+ )
162
+ bf.deck.save(deck, "q1-deck.html", name="Sales, Q1 2026") # bf.deck.save_pdf: one slide per page
163
+ ```
164
+
165
+ And as an email that points to the report:
166
+
167
+ ```python
168
+ digest = bf.email.Digest(
169
+ bf.Text("**Revenue is down 12.5%** on last quarter; the margin is up."),
170
+ bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"),
171
+ link="https://example.com/q1.html",
172
+ )
173
+ message = bf.email.to_message(digest, subject="Sales, Q1 2026", to="team@example.com")
174
+ ```
175
+
176
+ Sending stays yours: `message` is a standard `EmailMessage` for SMTP, the Gmail API or any other.
177
+
178
+ ## More than one way to write it
179
+
180
+ - **In Python**, as above: each block is a class, each option a keyword argument.
181
+ - **In Markdown:** the prose lives in a `.md` file, with `{values}` and `::: block name` slots
182
+ that Python fills: `bf.from_markdown("report.md", values=facts, blocks={"kpis": kpis})`.
183
+ - **As a project:** `python -m briefing new my-report` writes a build script, its Markdown and
184
+ its theme, ready to run; `bf.run` gives the script `--open`, `--spec` and `--diff`.
185
+ - **As JSON, by an agent:** the same blocks and options as JSON. `python -m briefing reference`
186
+ prints the format at the installed version, `python -m briefing validate report.json` lists
187
+ every problem with its place, and `python -m briefing render report.json` builds it.
188
+ `python -m briefing skill --install` adds a Claude Code skill that points to the reference.
189
+
190
+ ## What else it does
191
+
192
+ - **Themes from one colour:** `bf.Formatting.from_accent("#0f766e")` gives a readable light (or
193
+ dark) theme, and charts follow it with `plotly_template()` and `mpl_style()`.
194
+ - **Colour that means something:** `bf.Scale` gives the same colour to the same value in every
195
+ block, `bf.Legend` draws it once, and `bf.color.check` flags palettes that colour-blind readers
196
+ can't tell apart.
197
+ - **Tables to work with:** `DataTable` sorts, searches and pages thousands of rows, formats
198
+ columns, links cells and downloads as CSV.
199
+ - **Lab blocks** for custom, interactive views: `DataProfile`, `DataDive`, `CalendarHeatmap`,
200
+ `TimeHeatmap`.
201
+ - **Embeds:** `bf.stringify(block, full_html=False)` gives one self-contained `<div>` for a docs
202
+ site, a notebook or a wiki, like Plotly's `to_html(full_html=False)`.
203
+ - **What changed since last time:** `bf.diff("yesterday.json", report)` is a report of the numbers,
204
+ rows and text that moved between two runs.
205
+ - **Exports:** `bf.save_pdf` and `bf.save_image` (with `briefing[image]`), offline in headless
206
+ Chromium; a social card with `size="og"`.
207
+
208
+ ## Documentation
209
+
210
+ **[briefing.readthedocs.io](https://briefing.readthedocs.io)** has a guide for every part, with
211
+ live examples, and the full API reference.
212
+
213
+ - [Changelog](CHANGELOG.md)
214
+ - [Issues](https://github.com/jeanmidevacc/briefing/issues): bugs, ideas and the roadmap
@@ -0,0 +1,152 @@
1
+ # briefing
2
+
3
+ [![Documentation](https://readthedocs.org/projects/briefing/badge/?version=latest)](https://briefing.readthedocs.io)
4
+ [![PyPI](https://img.shields.io/pypi/v/briefing)](https://pypi.org/project/briefing/)
5
+
6
+ A Python framework for self-contained reports, slide decks and email digests, written by a
7
+ person, a coding agent, or both together.
8
+
9
+ Everything is built from one short grammar of blocks (`Text`, `BigNumber`, `Plot`, `DataTable`,
10
+ `Group`, `Select`, …) and saved as **one HTML file** with every script, style and image inside
11
+ it: no CDN, no server, no account. It opens offline, forever, and prints or exports to PNG and
12
+ PDF cleanly.
13
+
14
+ ![A briefing report: three KPIs above a line chart](https://raw.githubusercontent.com/jeanmidevacc/briefing/main/docs/_static/export/page.png)
15
+
16
+ ## Why briefing exists
17
+
18
+ Three things led me here:
19
+
20
+ - **Coding agents are good at making something to show you, not at making it consistently.**
21
+ A few months of building with coding agents surfaced the same gap every time: they're happy
22
+ to produce an artifact, but each one comes out with its own structure, and nothing tracks how
23
+ a piece of content evolved across a project. There was no shared grammar that a person and an
24
+ agent could both build reports from, and how a report came to be stayed opaque.
25
+ - **[datapane](https://github.com/datapane/datapane) was the cleanest report builder I'd used.**
26
+ Block-based, self-contained HTML output, a dead-simple API. I relied on it constantly to turn
27
+ Python analysis into reports for stakeholders and to monitor pipelines. It was decommissioned
28
+ in 2023 when the SaaS behind it shut down, and nothing since has replaced it. briefing is its
29
+ spiritual successor, with a few new turns.
30
+ - **No visualization tool covers everything, and the ones that push furthest often don't stick
31
+ around.** Years of building visualizations taught me that every tool, however good, eventually
32
+ falls short of the next thing you want to show. The niche packages that *do* push past that,
33
+ like [Facets](https://github.com/PAIR-code/facets) (PAIR / Google) and its Facets Dive
34
+ explorer, bring real value but rarely stay maintained. I wanted a place of my own to keep
35
+ building and sharing that kind of custom, interactive visualization, without depending on
36
+ someone else's side project staying alive.
37
+
38
+ briefing is built to close all three gaps at once: a block grammar solid enough for me *and* my
39
+ coding agents to build reports from consistently, with datapane's simplicity and a home for the
40
+ custom, interactive visualization that inspired it. All of it self-contained, offline, with no
41
+ cloud account required.
42
+
43
+ ## One grammar, three outputs
44
+
45
+ | | Report | Slide deck | Email digest |
46
+ | --- | --- | --- | --- |
47
+ | **For** | Exploring and reference | Presenting, or sending round as a PDF | A short summary in the inbox |
48
+ | **Holds** | Every block: pages, tabs, links | Every block, one slide at a time | Text, numbers, alerts, charts as images, short tables |
49
+ | **Interactive** | Yes | Yes in the browser, as it shows in a PDF | No: mail apps run no script |
50
+ | **Made with** | `bf.Briefing` → `bf.save` | `bf.deck.Deck` → `bf.deck.save` | `bf.email.Digest` → `bf.email.to_message` |
51
+ | **From a report** | — | `bf.deck.from_report` (experimental) | `bf.email.from_report` (experimental) |
52
+
53
+ ## Install
54
+
55
+ ```bash
56
+ pip install briefing # every block (lab included): reports, decks, email digests
57
+ pip install "briefing[altair]" # Altair charts: the Vega runtime they embed
58
+ pip install "briefing[pillow]" # lighter images: resize and re-encode them on the way in
59
+ pip install "briefing[image]" # PNG and PDF exports (then, once: playwright install chromium)
60
+ ```
61
+
62
+ briefing installs pandas, for tables, but no chart library: `Plot` takes a Plotly, Altair,
63
+ Matplotlib or Bokeh figure and imports only the library you pass, which you already have.
64
+ Python 3.11+, pandas 2 and 3; polars and pyarrow tables are converted for you.
65
+
66
+ ## Quick start
67
+
68
+ A report:
69
+
70
+ ```python
71
+ import briefing as bf
72
+
73
+ report = bf.Briefing(
74
+ bf.Text("# Sales, Q1 2026"),
75
+ bf.Group(
76
+ bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"), # ▼ -12.5%, in red
77
+ bf.BigNumber("Margin", 0.31, prev_value=0.29, format="{:.0%}"),
78
+ columns=2,
79
+ ),
80
+ bf.Select(
81
+ bf.Plot(fig, label="Trend"),
82
+ bf.DataTable(df, label="Rows"),
83
+ bf.lab.DataProfile(df, label="Profile"),
84
+ ),
85
+ )
86
+ bf.save(report, "q1.html", name="Sales, Q1 2026")
87
+ ```
88
+
89
+ Here `df` is a dataframe and `fig` a chart from any supported library. In a notebook, any block
90
+ previews itself as the last expression of a cell.
91
+
92
+ The same blocks, as slides:
93
+
94
+ ```python
95
+ deck = bf.deck.Deck(
96
+ bf.deck.Slide(title="Sales, Q1 2026"),
97
+ bf.deck.Slide(bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"), title="Summary"),
98
+ bf.deck.Slide(bf.Plot(fig), title="Revenue by month"),
99
+ )
100
+ bf.deck.save(deck, "q1-deck.html", name="Sales, Q1 2026") # bf.deck.save_pdf: one slide per page
101
+ ```
102
+
103
+ And as an email that points to the report:
104
+
105
+ ```python
106
+ digest = bf.email.Digest(
107
+ bf.Text("**Revenue is down 12.5%** on last quarter; the margin is up."),
108
+ bf.BigNumber("Revenue", 4.2e6, prev_value=4.8e6, format="${:,.0f}"),
109
+ link="https://example.com/q1.html",
110
+ )
111
+ message = bf.email.to_message(digest, subject="Sales, Q1 2026", to="team@example.com")
112
+ ```
113
+
114
+ Sending stays yours: `message` is a standard `EmailMessage` for SMTP, the Gmail API or any other.
115
+
116
+ ## More than one way to write it
117
+
118
+ - **In Python**, as above: each block is a class, each option a keyword argument.
119
+ - **In Markdown:** the prose lives in a `.md` file, with `{values}` and `::: block name` slots
120
+ that Python fills: `bf.from_markdown("report.md", values=facts, blocks={"kpis": kpis})`.
121
+ - **As a project:** `python -m briefing new my-report` writes a build script, its Markdown and
122
+ its theme, ready to run; `bf.run` gives the script `--open`, `--spec` and `--diff`.
123
+ - **As JSON, by an agent:** the same blocks and options as JSON. `python -m briefing reference`
124
+ prints the format at the installed version, `python -m briefing validate report.json` lists
125
+ every problem with its place, and `python -m briefing render report.json` builds it.
126
+ `python -m briefing skill --install` adds a Claude Code skill that points to the reference.
127
+
128
+ ## What else it does
129
+
130
+ - **Themes from one colour:** `bf.Formatting.from_accent("#0f766e")` gives a readable light (or
131
+ dark) theme, and charts follow it with `plotly_template()` and `mpl_style()`.
132
+ - **Colour that means something:** `bf.Scale` gives the same colour to the same value in every
133
+ block, `bf.Legend` draws it once, and `bf.color.check` flags palettes that colour-blind readers
134
+ can't tell apart.
135
+ - **Tables to work with:** `DataTable` sorts, searches and pages thousands of rows, formats
136
+ columns, links cells and downloads as CSV.
137
+ - **Lab blocks** for custom, interactive views: `DataProfile`, `DataDive`, `CalendarHeatmap`,
138
+ `TimeHeatmap`.
139
+ - **Embeds:** `bf.stringify(block, full_html=False)` gives one self-contained `<div>` for a docs
140
+ site, a notebook or a wiki, like Plotly's `to_html(full_html=False)`.
141
+ - **What changed since last time:** `bf.diff("yesterday.json", report)` is a report of the numbers,
142
+ rows and text that moved between two runs.
143
+ - **Exports:** `bf.save_pdf` and `bf.save_image` (with `briefing[image]`), offline in headless
144
+ Chromium; a social card with `size="og"`.
145
+
146
+ ## Documentation
147
+
148
+ **[briefing.readthedocs.io](https://briefing.readthedocs.io)** has a guide for every part, with
149
+ live examples, and the full API reference.
150
+
151
+ - [Changelog](CHANGELOG.md)
152
+ - [Issues](https://github.com/jeanmidevacc/briefing/issues): bugs, ideas and the roadmap
@@ -29,6 +29,7 @@ from pathlib import Path
29
29
  # the pandas dependency those blocks need at render time.
30
30
  from briefing import color, deck, email, fmt, lab
31
31
  from briefing._error import BriefingError
32
+ from briefing._experimental import ExperimentalWarning
32
33
  from briefing._markdown_first import from_markdown
33
34
  from briefing._preview import Preview, preview
34
35
  from briefing._prose import slug
@@ -245,6 +246,7 @@ def embed_assets(blocks: Briefing | list[t.Any] | object) -> str:
245
246
  __all__: list[str] = [
246
247
  # error
247
248
  "BriefingError",
249
+ "ExperimentalWarning",
248
250
  # blocks — text
249
251
  "Alert",
250
252
  "AlertLevel",
@@ -91,6 +91,8 @@ def _parser() -> argparse.ArgumentParser:
91
91
  render.add_argument("spec", help='the report\'s JSON file, or "-" to read it from standard input')
92
92
  render.add_argument("-o", "--output", type=Path, help="the HTML file to write (default: next to the JSON)")
93
93
  render.add_argument("--name", default=None, help="the report's title (default: Report, or Deck for a deck)")
94
+ render.add_argument("--deck", type=Path, default=None, metavar="DECK.html",
95
+ help="also write a first draft of a slide deck from the report (experimental)")
94
96
  render.add_argument("--data", action="append", default=[], metavar="NAME=FILE", help=data_help)
95
97
  render.add_argument("--max-size", type=_max_size, default=DEFAULT_MAX_SIZE, metavar="SIZE", help=size_help)
96
98
 
@@ -267,10 +269,15 @@ def _render(args: argparse.Namespace) -> int:
267
269
  raise BriefingError(f"{exc}\nPass referenced tables as --data name=file.csv.") from exc
268
270
  raise
269
271
  if isinstance(built, deck.Deck):
272
+ if args.deck is not None:
273
+ raise BriefingError("--deck drafts a deck from a report, and this JSON is already a deck: leave it out.")
270
274
  deck.save(built, output, name=args.name or "Deck", max_size=args.max_size)
271
275
  else:
272
276
  save(built, str(output), name=args.name or "Report", max_size=args.max_size)
273
277
  print(output)
278
+ if args.deck is not None and not isinstance(built, deck.Deck):
279
+ deck.save(deck.from_report(built), args.deck, name=args.name or "Report", max_size=args.max_size)
280
+ print(args.deck)
274
281
  return 0
275
282
 
276
283
 
@@ -0,0 +1,171 @@
1
+ """``bf.email.from_report`` (#199, experimental): a first draft of an email digest from a report.
2
+
3
+ A digest is short, so it takes one page. Blocks an email shows stay; interactive ones
4
+ become what a reader would see first (a DataTable's first rows, a Select's first panel);
5
+ the rest is left out, and one warning names it.
6
+ """
7
+ from __future__ import annotations
8
+
9
+ import copy
10
+ import re
11
+ import typing as t
12
+ import warnings
13
+
14
+ from briefing._error import BriefingError
15
+ from briefing._experimental import experimental
16
+ from briefing.blocks.asset import DataTable, Plot, Table
17
+ from briefing.blocks.banner import Banner
18
+ from briefing.blocks.base import Block
19
+ from briefing.blocks.chips import Chips
20
+ from briefing.blocks.layout import Briefing, Card, Group, Page, Select
21
+ from briefing.blocks.text import Alert, BigNumber, Text
22
+
23
+ if t.TYPE_CHECKING:
24
+ import pandas as pd
25
+
26
+ from briefing.email import Digest
27
+
28
+ #: Rows a table keeps in an email (``bf.email.MAX_TABLE_ROWS``).
29
+ ROWS = 30
30
+ #: A Markdown link into the report itself: ``[words](#page/name)``.
31
+ _INNER_LINK = re.compile(r"\[([^\]]+)\]\(#[^)\s]*\)")
32
+
33
+
34
+ def _unlinked(block: Block) -> Block:
35
+ """*block* with its links into the report turned into their words (a digest without ``link=``)."""
36
+ if isinstance(block, Text) and _INNER_LINK.search(block.content):
37
+ return Text(_INNER_LINK.sub(r"\1", block.content), name=block.name, label=block.label)
38
+ if isinstance(block, Group):
39
+ group = copy.copy(block)
40
+ group.blocks = [_unlinked(child) for child in block.blocks]
41
+ return group
42
+ return block
43
+
44
+
45
+ def _what(block: Block) -> str:
46
+ from briefing.spec._model import type_name
47
+
48
+ kind = type_name(block) or type(block).__name__
49
+ return f'{kind} "{block.name}"' if block.name else kind
50
+
51
+
52
+ def _rows(frame: pd.DataFrame, caption: str | None) -> list[Block]:
53
+ """A Table of *frame*'s first rows, and a line saying so when it was cut."""
54
+ table: list[Block] = [Table(frame.head(ROWS).reset_index(drop=True), caption=caption)]
55
+ if len(frame) > ROWS:
56
+ table.append(Text(f"First {ROWS} of {len(frame):,} rows: see the full report."))
57
+ return table
58
+
59
+
60
+ def _datatable(block: DataTable) -> list[Block]:
61
+ """A DataTable as the Table of its first rows, its ``formats=`` applied."""
62
+ from briefing.renderers.table import _formatted
63
+
64
+ frame = block.df.head(ROWS).copy()
65
+ for column, how in (block.formats or {}).items():
66
+ if column in frame.columns:
67
+ frame[column] = _formatted(how, column, frame[column].tolist())
68
+ rows: list[Block] = [Table(frame.reset_index(drop=True), caption=block.caption)]
69
+ if len(block.df) > ROWS:
70
+ rows.append(Text(f"First {ROWS} of {len(block.df):,} rows: see the full report."))
71
+ return rows
72
+
73
+
74
+ def convert(block: Block, left: list[str]) -> list[Block]:
75
+ """What *block* becomes in an email; what can't go in one is added to *left*."""
76
+ if isinstance(block, Text | BigNumber | Alert | Plot):
77
+ return [block]
78
+ if isinstance(block, Group):
79
+ children = [child for b in block.blocks for child in convert(b, left)]
80
+ if not children:
81
+ return []
82
+ group = copy.copy(block)
83
+ group.blocks = children
84
+ return [group]
85
+ if isinstance(block, DataTable):
86
+ return _datatable(block)
87
+ if isinstance(block, Table):
88
+ frame = t.cast("pd.DataFrame", getattr(block.data, "data", block.data)) # a Styler keeps its frame in .data
89
+ return [block] if len(frame) <= ROWS else _rows(frame, block.caption)
90
+ if isinstance(block, Select):
91
+ return convert(block.blocks[0], left) if block.blocks else []
92
+ if isinstance(block, Card):
93
+ title = [Text(f"**{block.title}**")] if block.title else []
94
+ return title + [child for b in block.blocks for child in convert(b, left)]
95
+ if isinstance(block, Banner):
96
+ return [Text(block.text)]
97
+ if isinstance(block, Chips):
98
+ return [Text(" · ".join(chip.text for chip in block.items))] if block.items else []
99
+ left.append(_what(block))
100
+ return []
101
+
102
+
103
+ def _page(root: Briefing, page: int | str) -> list[Block]:
104
+ """The blocks of the page *page* picks: an index, a page's title or its name."""
105
+ pages = [b for b in root.blocks if isinstance(b, Page)] if all(isinstance(b, Page) for b in root.blocks) else []
106
+ if not pages:
107
+ if page not in (0, "0"):
108
+ raise BriefingError(f"bf.email.from_report: page={page!r}, but the report has no Page blocks; "
109
+ "leave page out to take the whole report.")
110
+ return list(root.blocks)
111
+ if isinstance(page, int) and not isinstance(page, bool):
112
+ if 0 <= page < len(pages):
113
+ return list(pages[page].blocks)
114
+ raise BriefingError(f"bf.email.from_report: page={page} is out of range: the report has "
115
+ f"{len(pages)} pages, from 0.")
116
+ found = [p for p in pages if p.name == page] or [p for p in pages if p.title == page]
117
+ if not found:
118
+ titles = ", ".join(repr(p.title) for p in pages)
119
+ raise BriefingError(f"bf.email.from_report: no page named {page!r}. Pages: {titles}. Pass an index, "
120
+ "a title or a name.")
121
+ return list(found[0].blocks)
122
+
123
+
124
+ def from_report(report: object, link: str | None = None, page: int | str = 0) -> Digest:
125
+ """*Experimental.* A first draft of an email digest from a report, to adjust before sending.
126
+
127
+ A digest is short, so it takes one page of the report (the whole report when it has no
128
+ pages). Text, numbers, alerts and charts stay. A ``DataTable`` becomes a ``Table`` of
129
+ its first 30 rows, its formats applied; a ``Select`` its first panel; a ``Card`` its
130
+ title in bold, then its blocks; a ``Banner`` and ``Chips`` their text. Toggles, images,
131
+ files, code, formulas, raw HTML and lab blocks are left out, and one warning names them.
132
+ Without ``link=``, links into the report (``[detail](#detail/rows)``) keep only their words.
133
+
134
+ The result is an ordinary :class:`Digest`. What it returns may change in any release;
135
+ it warns :class:`~briefing.ExperimentalWarning` once per session.
136
+
137
+ Args:
138
+ report: A :class:`~briefing.Briefing`, a block or a list of blocks.
139
+ link: The full report's address: the digest's "Open the full report" button.
140
+ page: The page to take: an index (0 for the first), a page's title or its ``name``.
141
+
142
+ Returns:
143
+ The digest.
144
+
145
+ Raises:
146
+ BriefingError: For an unknown page, or a page with nothing an email can show.
147
+
148
+ Example::
149
+
150
+ digest = bf.email.from_report(report, link="https://example.com/q3.html")
151
+ message = bf.email.to_message(digest, subject="Q3 review", to="team@example.com")
152
+ """
153
+ from briefing.email import Digest
154
+
155
+ experimental("bf.email.from_report")
156
+ root = Briefing.wrap(t.cast(t.Any, report))
157
+ left: list[str] = []
158
+ blocks = [out for block in _page(root, page) for out in convert(block, left)]
159
+ if left:
160
+ hint = "The digest's button leads to the full report." if link else "link= adds a button to the full report."
161
+ warnings.warn(f"bf.email.from_report left out {len(left)} block{'s' if len(left) != 1 else ''} an email "
162
+ f"can't show: {', '.join(left)}. {hint}", UserWarning, stacklevel=2)
163
+ if link is None:
164
+ blocks = [_unlinked(block) for block in blocks]
165
+ if not blocks:
166
+ raise BriefingError("bf.email.from_report: this page holds nothing an email can show "
167
+ f"(only {', '.join(left)}). Pick another page with page=, or write the digest yourself.")
168
+ return Digest(*blocks, link=link, footer=root.footer)
169
+
170
+
171
+ __all__ = ["ROWS", "convert", "from_report"]
@@ -0,0 +1,39 @@
1
+ """Experimental functions (#199): what they return may change in any release, without a deprecation period."""
2
+ from __future__ import annotations
3
+
4
+ import warnings
5
+
6
+
7
+ class ExperimentalWarning(UserWarning):
8
+ """Warns, once per session, that a function is experimental (``bf.deck.from_report``…).
9
+
10
+ What an experimental function returns may change in any release, without a deprecation
11
+ period. Silence the warning with ``warnings.filterwarnings("ignore", category=bf.ExperimentalWarning)``.
12
+
13
+ Example::
14
+
15
+ import warnings
16
+ warnings.filterwarnings("ignore", category=bf.ExperimentalWarning)
17
+ """
18
+
19
+
20
+ _warned: set[str] = set()
21
+
22
+
23
+ def experimental(name: str, stacklevel: int = 3) -> None:
24
+ """Warn that *name* is experimental, the first time it is called in this session.
25
+
26
+ *stacklevel* as ``warnings.warn`` takes it: 3 points at the caller of the function that calls this.
27
+ """
28
+ if name in _warned:
29
+ return
30
+ _warned.add(name)
31
+ warnings.warn(
32
+ f"{name} is experimental: what it returns may change in any release, without a deprecation period. "
33
+ "Check the result; silence this with warnings.filterwarnings('ignore', category=bf.ExperimentalWarning).",
34
+ ExperimentalWarning,
35
+ stacklevel=stacklevel,
36
+ )
37
+
38
+
39
+ __all__ = ["ExperimentalWarning", "experimental"]