icplot 0.8.3__tar.gz → 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. {icplot-0.8.3/src/icplot.egg-info → icplot-0.9.0}/PKG-INFO +9 -21
  2. {icplot-0.8.3 → icplot-0.9.0}/README.md +6 -10
  3. {icplot-0.8.3 → icplot-0.9.0}/pyproject.toml +8 -26
  4. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/converter/image.py +4 -28
  5. {icplot-0.8.3 → icplot-0.9.0/src/icplot.egg-info}/PKG-INFO +9 -21
  6. {icplot-0.8.3 → icplot-0.9.0}/src/icplot.egg-info/SOURCES.txt +1 -24
  7. icplot-0.9.0/src/icplot.egg-info/requires.txt +15 -0
  8. icplot-0.8.3/src/icplot/charts/gantt.py +0 -25
  9. icplot-0.8.3/src/icplot/charts/tree.py +0 -103
  10. icplot-0.8.3/src/icplot/graph/__init__.py +0 -6
  11. icplot-0.8.3/src/icplot/graph/axis.py +0 -44
  12. icplot-0.8.3/src/icplot/graph/plot.py +0 -71
  13. icplot-0.8.3/src/icplot/graph/plot_group.py +0 -79
  14. icplot-0.8.3/src/icplot/graph/series.py +0 -125
  15. icplot-0.8.3/src/icplot/renderer/charts/pgfgantt.py +0 -71
  16. icplot-0.8.3/src/icplot/renderer/charts/svggantt.py +0 -62
  17. icplot-0.8.3/src/icplot/renderer/graph/__init__.py +0 -3
  18. icplot-0.8.3/src/icplot/renderer/graph/color.py +0 -17
  19. icplot-0.8.3/src/icplot/renderer/graph/matplotlib.py +0 -200
  20. icplot-0.8.3/src/icplot/renderer/graph/mpl.py +0 -205
  21. icplot-0.8.3/src/icplot/renderer/graph/renderer.py +0 -135
  22. icplot-0.8.3/src/icplot/renderer/scene/cairo.py +0 -64
  23. icplot-0.8.3/src/icplot/renderer/video.py +0 -34
  24. icplot-0.8.3/src/icplot/scene.py +0 -69
  25. icplot-0.8.3/src/icplot/theme/__init__.py +0 -0
  26. icplot-0.8.3/src/icplot.egg-info/requires.txt +0 -26
  27. icplot-0.8.3/test/test_cairo.py +0 -30
  28. icplot-0.8.3/test/test_gantt_chart.py +0 -24
  29. icplot-0.8.3/test/test_line_plots.py +0 -63
  30. icplot-0.8.3/test/test_plot_group.py +0 -36
  31. icplot-0.8.3/test/test_tree.py +0 -82
  32. {icplot-0.8.3 → icplot-0.9.0}/LICENSE +0 -0
  33. {icplot-0.8.3 → icplot-0.9.0}/setup.cfg +0 -0
  34. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/__init__.py +0 -0
  35. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/converter/__init__.py +0 -0
  36. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/converter/cli.py +0 -0
  37. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/converter/convert.py +0 -0
  38. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/__init__.py +0 -0
  39. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/fonts/OFL.txt +0 -0
  40. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/fonts/raleway-subset.woff2 +0 -0
  41. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/logos/ichec-white.svg +0 -0
  42. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/logos/ichec.svg +0 -0
  43. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/LICENSE +0 -0
  44. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/accessibility.svg +0 -0
  45. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/activity.svg +0 -0
  46. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/archive.svg +0 -0
  47. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/arrow-right-left.svg +0 -0
  48. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/badge-check.svg +0 -0
  49. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/badge-info.svg +0 -0
  50. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/bell-ring.svg +0 -0
  51. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/bell.svg +0 -0
  52. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/book-a.svg +0 -0
  53. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/book-marked.svg +0 -0
  54. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/book-open-check.svg +0 -0
  55. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/book-open.svg +0 -0
  56. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/bot.svg +0 -0
  57. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/boxes.svg +0 -0
  58. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/braces.svg +0 -0
  59. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/building-2.svg +0 -0
  60. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/building.svg +0 -0
  61. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/calendar-clock.svg +0 -0
  62. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/calendar.svg +0 -0
  63. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/chart-column-big.svg +0 -0
  64. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/chart-line.svg +0 -0
  65. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/chart-no-axes-column.svg +0 -0
  66. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/check.svg +0 -0
  67. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/chevron-left.svg +0 -0
  68. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/chevron-right.svg +0 -0
  69. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/circle-check.svg +0 -0
  70. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/circle-dot.svg +0 -0
  71. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/clapperboard.svg +0 -0
  72. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/clipboard-check.svg +0 -0
  73. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/cloud-check.svg +0 -0
  74. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/cloud-cog.svg +0 -0
  75. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/cloud-upload.svg +0 -0
  76. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/cloud.svg +0 -0
  77. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/container.svg +0 -0
  78. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/cpu.svg +0 -0
  79. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/database-backup.svg +0 -0
  80. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/database.svg +0 -0
  81. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/door-open.svg +0 -0
  82. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/download.svg +0 -0
  83. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/ellipsis-vertical.svg +0 -0
  84. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/eye.svg +0 -0
  85. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/factory.svg +0 -0
  86. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-check.svg +0 -0
  87. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-cog.svg +0 -0
  88. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-input.svg +0 -0
  89. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-json-2.svg +0 -0
  90. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-lock.svg +0 -0
  91. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-pen.svg +0 -0
  92. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-spreadsheet.svg +0 -0
  93. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-stack.svg +0 -0
  94. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/file-text.svg +0 -0
  95. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/fingerprint.svg +0 -0
  96. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/flask-conical.svg +0 -0
  97. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/folder-kanban.svg +0 -0
  98. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/gavel.svg +0 -0
  99. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/git-branch.svg +0 -0
  100. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/git-merge.svg +0 -0
  101. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/git-pull-request.svg +0 -0
  102. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/globe-lock.svg +0 -0
  103. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/globe.svg +0 -0
  104. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/grip-vertical.svg +0 -0
  105. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/hand.svg +0 -0
  106. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/handshake.svg +0 -0
  107. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/hard-drive.svg +0 -0
  108. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/hourglass.svg +0 -0
  109. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/image.svg +0 -0
  110. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/inbox.svg +0 -0
  111. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/key-round.svg +0 -0
  112. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/laptop.svg +0 -0
  113. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/layers.svg +0 -0
  114. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/layout-grid.svg +0 -0
  115. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/layout-template.svg +0 -0
  116. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/library-big.svg +0 -0
  117. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/link-2.svg +0 -0
  118. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/link.svg +0 -0
  119. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/list-checks.svg +0 -0
  120. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/list-ordered.svg +0 -0
  121. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/lock-keyhole.svg +0 -0
  122. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/lock.svg +0 -0
  123. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/mail-check.svg +0 -0
  124. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/mail.svg +0 -0
  125. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/map-pinned.svg +0 -0
  126. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/map.svg +0 -0
  127. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/megaphone.svg +0 -0
  128. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/message-square.svg +0 -0
  129. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/microscope.svg +0 -0
  130. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/monitor.svg +0 -0
  131. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/mouse-pointer-click.svg +0 -0
  132. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/network.svg +0 -0
  133. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/octagon-x.svg +0 -0
  134. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/package.svg +0 -0
  135. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/palette.svg +0 -0
  136. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/paperclip.svg +0 -0
  137. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/pen-line.svg +0 -0
  138. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/pencil.svg +0 -0
  139. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/pin.svg +0 -0
  140. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/plus.svg +0 -0
  141. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/puzzle.svg +0 -0
  142. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/recycle.svg +0 -0
  143. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/refresh-cw.svg +0 -0
  144. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/repeat.svg +0 -0
  145. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/rocket.svg +0 -0
  146. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/scale.svg +0 -0
  147. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/scroll-text.svg +0 -0
  148. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/search-check.svg +0 -0
  149. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/search.svg +0 -0
  150. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/send.svg +0 -0
  151. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/server-cog.svg +0 -0
  152. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/server.svg +0 -0
  153. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/settings.svg +0 -0
  154. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/shield-alert.svg +0 -0
  155. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/shield-check.svg +0 -0
  156. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/shield-user.svg +0 -0
  157. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/shield.svg +0 -0
  158. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/sliders-horizontal.svg +0 -0
  159. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/tag.svg +0 -0
  160. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/tags.svg +0 -0
  161. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/telescope.svg +0 -0
  162. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/terminal-square.svg +0 -0
  163. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/terminal.svg +0 -0
  164. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/ticket.svg +0 -0
  165. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/triangle-alert.svg +0 -0
  166. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/trophy.svg +0 -0
  167. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/undo-2.svg +0 -0
  168. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/upload.svg +0 -0
  169. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/user-check.svg +0 -0
  170. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/user-cog.svg +0 -0
  171. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/user-round-cog.svg +0 -0
  172. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/user-round-x.svg +0 -0
  173. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/user-round.svg +0 -0
  174. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/users-round.svg +0 -0
  175. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/users.svg +0 -0
  176. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/wand-sparkles.svg +0 -0
  177. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/waves.svg +0 -0
  178. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/lucide/workflow.svg +0 -0
  179. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/LICENSE.md +0 -0
  180. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/angular.svg +0 -0
  181. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/ansible.svg +0 -0
  182. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/apacheecharts.svg +0 -0
  183. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/apachesolr.svg +0 -0
  184. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/celery.svg +0 -0
  185. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/debian.svg +0 -0
  186. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/django.svg +0 -0
  187. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/gitlab.svg +0 -0
  188. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/grafana.svg +0 -0
  189. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/jupyter.svg +0 -0
  190. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/keycloak.svg +0 -0
  191. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/letsencrypt.svg +0 -0
  192. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/maplibre.svg +0 -0
  193. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/materialdesign.svg +0 -0
  194. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/nginx.svg +0 -0
  195. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/openapiinitiative.svg +0 -0
  196. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/openid.svg +0 -0
  197. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/opentofu.svg +0 -0
  198. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/orcid.svg +0 -0
  199. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/podman.svg +0 -0
  200. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/postgresql.svg +0 -0
  201. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/prometheus.svg +0 -0
  202. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/python.svg +0 -0
  203. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/redis.svg +0 -0
  204. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/renovate.svg +0 -0
  205. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/saltproject.svg +0 -0
  206. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/sentry.svg +0 -0
  207. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/trivy.svg +0 -0
  208. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/wireguard.svg +0 -0
  209. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/assets/simple-icons/zenodo.svg +0 -0
  210. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/brand.py +0 -0
  211. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/canvas.py +0 -0
  212. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/diagram/preview.py +0 -0
  213. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/main_cli.py +0 -0
  214. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/py.typed +0 -0
  215. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/__init__.py +0 -0
  216. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/cli.py +0 -0
  217. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/config.py +0 -0
  218. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/formats/__init__.py +0 -0
  219. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/formats/mermaid.py +0 -0
  220. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/formats/plantuml.py +0 -0
  221. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/formats/tex.py +0 -0
  222. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/frontmatter.py +0 -0
  223. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/renderer/render.py +0 -0
  224. {icplot-0.8.3/src/icplot/charts → icplot-0.9.0/src/icplot/theme}/__init__.py +0 -0
  225. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/cli.py +0 -0
  226. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/color.py +0 -0
  227. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/templates/puml.j2 +0 -0
  228. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/templates/tikz.j2 +0 -0
  229. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/theme.json +0 -0
  230. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/theme.py +0 -0
  231. {icplot-0.8.3 → icplot-0.9.0}/src/icplot/theme/theme_generator.py +0 -0
  232. {icplot-0.8.3 → icplot-0.9.0}/src/icplot.egg-info/dependency_links.txt +0 -0
  233. {icplot-0.8.3 → icplot-0.9.0}/src/icplot.egg-info/entry_points.txt +0 -0
  234. {icplot-0.8.3 → icplot-0.9.0}/src/icplot.egg-info/top_level.txt +0 -0
  235. {icplot-0.8.3 → icplot-0.9.0}/test/test_diagram.py +0 -0
  236. {icplot-0.8.3 → icplot-0.9.0}/test/test_diagram_brand.py +0 -0
  237. {icplot-0.8.3 → icplot-0.9.0}/test/test_diagram_preview.py +0 -0
  238. {icplot-0.8.3 → icplot-0.9.0}/test/test_frontmatter.py +0 -0
  239. {icplot-0.8.3 → icplot-0.9.0}/test/test_image.py +0 -0
  240. {icplot-0.8.3 → icplot-0.9.0}/test/test_mermaid.py +0 -0
  241. {icplot-0.8.3 → icplot-0.9.0}/test/test_puml.py +0 -0
  242. {icplot-0.8.3 → icplot-0.9.0}/test/test_tex.py +0 -0
  243. {icplot-0.8.3 → icplot-0.9.0}/test/test_theme_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: icplot
3
- Version: 0.8.3
3
+ Version: 0.9.0
4
4
  Summary: Utilities for generating plots and graphics for technical reports.
5
5
  Author: Irish Centre for High End Computing
6
6
  License: MIT
@@ -16,30 +16,22 @@ Requires-Python: >=3.14
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: iccore==0.2.6
19
- Requires-Dist: ichec_platform_core==0.1.7
19
+ Requires-Dist: pydantic
20
+ Requires-Dist: PyYAML
20
21
  Requires-Dist: graphviz
21
22
  Requires-Dist: Jinja2
22
23
  Requires-Dist: fonttools[woff]
23
24
  Provides-Extra: cairo
24
25
  Requires-Dist: CairoSVG; extra == "cairo"
25
- Provides-Extra: imagemagick
26
- Requires-Dist: wand; extra == "imagemagick"
27
- Provides-Extra: plot
28
- Requires-Dist: matplotlib; extra == "plot"
29
- Provides-Extra: video
30
- Requires-Dist: moviepy; extra == "video"
31
26
  Provides-Extra: preview
32
27
  Requires-Dist: playwright; extra == "preview"
33
28
  Provides-Extra: all
34
29
  Requires-Dist: CairoSVG; extra == "all"
35
- Requires-Dist: wand; extra == "all"
36
- Requires-Dist: matplotlib; extra == "all"
37
- Requires-Dist: moviepy; extra == "all"
38
30
  Dynamic: license-file
39
31
 
40
32
  # icplot
41
33
 
42
- `icplot` makes plots, diagrams and images for technical documents at
34
+ `icplot` makes diagrams and images for technical documents at
43
35
  [ICHEC](https://www.ichec.ie). It converts between image formats, renders
44
36
  text-based diagrams to images and applies a shared theme.
45
37
 
@@ -57,14 +49,11 @@ The core install is small. Add the extras for the backends you need:
57
49
 
58
50
  | Extra | Installs | For |
59
51
  |---|---|---|
60
- | `cairo` | CairoSVG | SVG to PNG or PDF, and drawing scenes |
61
- | `imagemagick` | wand | PDF to PNG |
62
- | `plot` | matplotlib | plots and charts |
63
- | `video` | moviepy | videos |
64
- | `all` | all of these | everything |
52
+ | `cairo` | CairoSVG | SVG to PNG or PDF |
53
+ | `preview` | Playwright | PNG previews of diagrams, drawn by Chromium |
65
54
 
66
- For example, `pip install "icplot[cairo]"`. The `cairo` and `imagemagick`
67
- extras also need the system libraries. On a Mac:
55
+ For example, `pip install "icplot[cairo]"`. The `cairo` extra needs the cairo
56
+ library, and PDF to PNG needs ImageMagick's `magick`. On a Mac:
68
57
 
69
58
  ```shell
70
59
  brew install imagemagick cairo
@@ -85,8 +74,7 @@ icplot render uml_diagram.puml
85
74
  ```
86
75
 
87
76
  This renders the PlantUML file to PNG and SVG. `icplot` also renders LaTeX and
88
- TikZ, and Mermaid. It renders its own JSON formats for plots, trees, Gantt
89
- charts and scenes.
77
+ TikZ, and Mermaid.
90
78
 
91
79
  ## Render a folder of diagrams
92
80
 
@@ -1,6 +1,6 @@
1
1
  # icplot
2
2
 
3
- `icplot` makes plots, diagrams and images for technical documents at
3
+ `icplot` makes diagrams and images for technical documents at
4
4
  [ICHEC](https://www.ichec.ie). It converts between image formats, renders
5
5
  text-based diagrams to images and applies a shared theme.
6
6
 
@@ -18,14 +18,11 @@ The core install is small. Add the extras for the backends you need:
18
18
 
19
19
  | Extra | Installs | For |
20
20
  |---|---|---|
21
- | `cairo` | CairoSVG | SVG to PNG or PDF, and drawing scenes |
22
- | `imagemagick` | wand | PDF to PNG |
23
- | `plot` | matplotlib | plots and charts |
24
- | `video` | moviepy | videos |
25
- | `all` | all of these | everything |
21
+ | `cairo` | CairoSVG | SVG to PNG or PDF |
22
+ | `preview` | Playwright | PNG previews of diagrams, drawn by Chromium |
26
23
 
27
- For example, `pip install "icplot[cairo]"`. The `cairo` and `imagemagick`
28
- extras also need the system libraries. On a Mac:
24
+ For example, `pip install "icplot[cairo]"`. The `cairo` extra needs the cairo
25
+ library, and PDF to PNG needs ImageMagick's `magick`. On a Mac:
29
26
 
30
27
  ```shell
31
28
  brew install imagemagick cairo
@@ -46,8 +43,7 @@ icplot render uml_diagram.puml
46
43
  ```
47
44
 
48
45
  This renders the PlantUML file to PNG and SVG. `icplot` also renders LaTeX and
49
- TikZ, and Mermaid. It renders its own JSON formats for plots, trees, Gantt
50
- charts and scenes.
46
+ TikZ, and Mermaid.
51
47
 
52
48
  ## Render a folder of diagrams
53
49
 
@@ -17,13 +17,11 @@ classifiers = [
17
17
  ]
18
18
  keywords = ["Publishing", "Technical Reports", "Graphics"]
19
19
 
20
- # Core is deliberately light: only what every import path needs. The heavy
21
- # rendering backends (matplotlib/moviepy/wand) are optional extras
22
- # so consumers that only use the converter or diagram renderer (e.g. the
23
- # handbook build) can install a small footprint. Use icplot[all] for the
24
- # previous behaviour of pulling every backend.
20
+ # Core holds only what every import path needs. Cairo and the Chromium
21
+ # preview are optional extras, so the handbook build stays small.
25
22
  dependencies = ["iccore==0.2.6",
26
- "ichec_platform_core==0.1.7",
23
+ "pydantic",
24
+ "PyYAML",
27
25
  "graphviz",
28
26
  "Jinja2",
29
27
  "fonttools[woff]"]
@@ -33,32 +31,16 @@ Repository = "https://git.ichec.ie/platform-engineering/modules/documentation/ic
33
31
  Homepage = "https://git.ichec.ie/platform-engineering/modules/documentation/ichec-plot"
34
32
 
35
33
  [project.optional-dependencies]
36
- # svg/pdf conversion (converter.svg_to_png / svg_to_pdf) and vector scene
37
- # drawing (renderer.scene.cairo). CairoSVG pulls cairocffi, which dlopens
38
- # libcairo at runtime — no C build step, and one cairo binding rather than two.
34
+ # SVG to PNG or PDF (converter.svg_to_png / svg_to_pdf). CairoSVG pulls
35
+ # cairocffi, which dlopens libcairo at runtime, so there is no C build step.
39
36
  cairo = ["CairoSVG"]
40
37
 
41
- # raster conversion via ImageMagick bindings (converter.pdf_to_png);
42
- # falls back to the `magick` CLI if wand is absent
43
- imagemagick = ["wand"]
44
-
45
- # 2D plotting backend (icplot.renderer.graph / icplot.charts)
46
- plot = ["matplotlib"]
47
-
48
- # video assembly (renderer.video, driven from renderer.graph.mpl)
49
- video = ["moviepy"]
50
-
51
38
  # PNG previews of diagrams, drawn by headless Chromium so embedded fonts and
52
39
  # shadows render as in a browser. Run `playwright install chromium` once.
53
40
  preview = ["playwright"]
54
41
 
55
- # convenience aggregate — every backend
56
- all = [
57
- "CairoSVG",
58
- "wand",
59
- "matplotlib",
60
- "moviepy",
61
- ]
42
+ # Kept so existing `icplot[all]` installs still resolve.
43
+ all = ["CairoSVG"]
62
44
 
63
45
  [build-system]
64
46
  requires = ["setuptools>=64", "setuptools-scm>=8"]
@@ -11,14 +11,6 @@ from pathlib import Path
11
11
 
12
12
  logger = logging.getLogger(__name__)
13
13
 
14
- _HAS_WAND = True
15
- try:
16
- from wand.color import Color
17
- from wand.image import Image
18
- except ImportError as e:
19
- logger.debug("wand not available: %s", e)
20
- _HAS_WAND = False
21
-
22
14
  _HAS_CAIRO_SVG = True
23
15
  try:
24
16
  import cairosvg
@@ -27,10 +19,6 @@ except ImportError as e:
27
19
  _HAS_CAIRO_SVG = False
28
20
 
29
21
 
30
- def has_wand() -> bool:
31
- return _HAS_WAND
32
-
33
-
34
22
  def has_magick() -> bool:
35
23
  return bool(shutil.which("magick"))
36
24
 
@@ -67,24 +55,12 @@ def _pdf_to_png(source: Path, target: Path | None = None, resolution: int = 300)
67
55
 
68
56
  def pdf_to_png(source: Path, target: Path | None = None, resolution: int = 300):
69
57
  """
70
- Convert a pdf to png with white background
58
+ Convert a pdf to png with white background, using ImageMagick's magick
71
59
  """
72
60
 
73
- if not has_wand():
74
- if has_magick():
75
- _pdf_to_png(source, target, resolution)
76
- return
77
- else:
78
- raise RuntimeError("Loading Wand failed - no pdf to png support")
79
-
80
- outfile = _get_out_filename(source, target, "png")
81
- os.makedirs(outfile.parent, exist_ok=True)
82
-
83
- with Image(filename=source, resolution=resolution) as img:
84
- img.format = "png"
85
- img.background_color = Color("white")
86
- img.alpha_channel = "remove"
87
- img.save(filename=outfile)
61
+ if not has_magick():
62
+ raise RuntimeError("magick not found - no pdf to png support")
63
+ _pdf_to_png(source, target, resolution)
88
64
 
89
65
 
90
66
  def svg_to_png(source: Path, target: Path | None = None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: icplot
3
- Version: 0.8.3
3
+ Version: 0.9.0
4
4
  Summary: Utilities for generating plots and graphics for technical reports.
5
5
  Author: Irish Centre for High End Computing
6
6
  License: MIT
@@ -16,30 +16,22 @@ Requires-Python: >=3.14
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: iccore==0.2.6
19
- Requires-Dist: ichec_platform_core==0.1.7
19
+ Requires-Dist: pydantic
20
+ Requires-Dist: PyYAML
20
21
  Requires-Dist: graphviz
21
22
  Requires-Dist: Jinja2
22
23
  Requires-Dist: fonttools[woff]
23
24
  Provides-Extra: cairo
24
25
  Requires-Dist: CairoSVG; extra == "cairo"
25
- Provides-Extra: imagemagick
26
- Requires-Dist: wand; extra == "imagemagick"
27
- Provides-Extra: plot
28
- Requires-Dist: matplotlib; extra == "plot"
29
- Provides-Extra: video
30
- Requires-Dist: moviepy; extra == "video"
31
26
  Provides-Extra: preview
32
27
  Requires-Dist: playwright; extra == "preview"
33
28
  Provides-Extra: all
34
29
  Requires-Dist: CairoSVG; extra == "all"
35
- Requires-Dist: wand; extra == "all"
36
- Requires-Dist: matplotlib; extra == "all"
37
- Requires-Dist: moviepy; extra == "all"
38
30
  Dynamic: license-file
39
31
 
40
32
  # icplot
41
33
 
42
- `icplot` makes plots, diagrams and images for technical documents at
34
+ `icplot` makes diagrams and images for technical documents at
43
35
  [ICHEC](https://www.ichec.ie). It converts between image formats, renders
44
36
  text-based diagrams to images and applies a shared theme.
45
37
 
@@ -57,14 +49,11 @@ The core install is small. Add the extras for the backends you need:
57
49
 
58
50
  | Extra | Installs | For |
59
51
  |---|---|---|
60
- | `cairo` | CairoSVG | SVG to PNG or PDF, and drawing scenes |
61
- | `imagemagick` | wand | PDF to PNG |
62
- | `plot` | matplotlib | plots and charts |
63
- | `video` | moviepy | videos |
64
- | `all` | all of these | everything |
52
+ | `cairo` | CairoSVG | SVG to PNG or PDF |
53
+ | `preview` | Playwright | PNG previews of diagrams, drawn by Chromium |
65
54
 
66
- For example, `pip install "icplot[cairo]"`. The `cairo` and `imagemagick`
67
- extras also need the system libraries. On a Mac:
55
+ For example, `pip install "icplot[cairo]"`. The `cairo` extra needs the cairo
56
+ library, and PDF to PNG needs ImageMagick's `magick`. On a Mac:
68
57
 
69
58
  ```shell
70
59
  brew install imagemagick cairo
@@ -85,8 +74,7 @@ icplot render uml_diagram.puml
85
74
  ```
86
75
 
87
76
  This renders the PlantUML file to PNG and SVG. `icplot` also renders LaTeX and
88
- TikZ, and Mermaid. It renders its own JSON formats for plots, trees, Gantt
89
- charts and scenes.
77
+ TikZ, and Mermaid.
90
78
 
91
79
  ## Render a folder of diagrams
92
80
 
@@ -4,16 +4,12 @@ pyproject.toml
4
4
  src/icplot/__init__.py
5
5
  src/icplot/main_cli.py
6
6
  src/icplot/py.typed
7
- src/icplot/scene.py
8
7
  src/icplot.egg-info/PKG-INFO
9
8
  src/icplot.egg-info/SOURCES.txt
10
9
  src/icplot.egg-info/dependency_links.txt
11
10
  src/icplot.egg-info/entry_points.txt
12
11
  src/icplot.egg-info/requires.txt
13
12
  src/icplot.egg-info/top_level.txt
14
- src/icplot/charts/__init__.py
15
- src/icplot/charts/gantt.py
16
- src/icplot/charts/tree.py
17
13
  src/icplot/converter/__init__.py
18
14
  src/icplot/converter/cli.py
19
15
  src/icplot/converter/convert.py
@@ -193,29 +189,15 @@ src/icplot/diagram/assets/simple-icons/sentry.svg
193
189
  src/icplot/diagram/assets/simple-icons/trivy.svg
194
190
  src/icplot/diagram/assets/simple-icons/wireguard.svg
195
191
  src/icplot/diagram/assets/simple-icons/zenodo.svg
196
- src/icplot/graph/__init__.py
197
- src/icplot/graph/axis.py
198
- src/icplot/graph/plot.py
199
- src/icplot/graph/plot_group.py
200
- src/icplot/graph/series.py
201
192
  src/icplot/renderer/__init__.py
202
193
  src/icplot/renderer/cli.py
203
194
  src/icplot/renderer/config.py
204
195
  src/icplot/renderer/frontmatter.py
205
196
  src/icplot/renderer/render.py
206
- src/icplot/renderer/video.py
207
- src/icplot/renderer/charts/pgfgantt.py
208
- src/icplot/renderer/charts/svggantt.py
209
197
  src/icplot/renderer/formats/__init__.py
210
198
  src/icplot/renderer/formats/mermaid.py
211
199
  src/icplot/renderer/formats/plantuml.py
212
200
  src/icplot/renderer/formats/tex.py
213
- src/icplot/renderer/graph/__init__.py
214
- src/icplot/renderer/graph/color.py
215
- src/icplot/renderer/graph/matplotlib.py
216
- src/icplot/renderer/graph/mpl.py
217
- src/icplot/renderer/graph/renderer.py
218
- src/icplot/renderer/scene/cairo.py
219
201
  src/icplot/theme/__init__.py
220
202
  src/icplot/theme/cli.py
221
203
  src/icplot/theme/color.py
@@ -224,17 +206,12 @@ src/icplot/theme/theme.py
224
206
  src/icplot/theme/theme_generator.py
225
207
  src/icplot/theme/templates/puml.j2
226
208
  src/icplot/theme/templates/tikz.j2
227
- test/test_cairo.py
228
209
  test/test_diagram.py
229
210
  test/test_diagram_brand.py
230
211
  test/test_diagram_preview.py
231
212
  test/test_frontmatter.py
232
- test/test_gantt_chart.py
233
213
  test/test_image.py
234
- test/test_line_plots.py
235
214
  test/test_mermaid.py
236
- test/test_plot_group.py
237
215
  test/test_puml.py
238
216
  test/test_tex.py
239
- test/test_theme_generator.py
240
- test/test_tree.py
217
+ test/test_theme_generator.py
@@ -0,0 +1,15 @@
1
+ iccore==0.2.6
2
+ pydantic
3
+ PyYAML
4
+ graphviz
5
+ Jinja2
6
+ fonttools[woff]
7
+
8
+ [all]
9
+ CairoSVG
10
+
11
+ [cairo]
12
+ CairoSVG
13
+
14
+ [preview]
15
+ playwright
@@ -1,25 +0,0 @@
1
- """
2
- This module represents a gantt chard
3
- """
4
-
5
- from datetime import datetime
6
-
7
- from ichec_platform_core.project import Milestone
8
- from pydantic import BaseModel
9
-
10
- from icplot.theme.color import Color
11
-
12
-
13
- class GanttChart(BaseModel, frozen=True):
14
- """
15
- A gantt chart
16
- """
17
-
18
- milestones: list[Milestone] = []
19
- title: str = ""
20
- start_date: datetime | None = None
21
- end_date: datetime | None = None
22
- bar_max_height: float = 0.1
23
- height: int = 100
24
- width: int = 500
25
- bar_color: Color = Color.from_rgba(0.7, 0, 0)
@@ -1,103 +0,0 @@
1
- import logging
2
- import os
3
- import shutil
4
- from collections.abc import Callable
5
- from dataclasses import dataclass
6
- from pathlib import Path
7
-
8
- import graphviz
9
-
10
- logger = logging.getLogger(__name__)
11
-
12
-
13
- @dataclass
14
- class TreeFunctions:
15
- find_children: Callable[[], list]
16
- find_decision_content: Callable[[], str]
17
- find_leaf_content: Callable[[], str]
18
-
19
-
20
- def _sub_string(node, tree_functions, spacing=" "):
21
- """Visualize a tree in string form"""
22
- out_str = ""
23
- children = tree_functions.find_children(node)
24
- if children is None or len(children) == 0:
25
- out_str = f"{tree_functions.find_leaf_content(node)}\n"
26
- else:
27
- out_str = f"{tree_functions.find_decision_content(node)},\n"
28
- for i, child in enumerate(children):
29
- out_str = (
30
- f"{out_str}"
31
- f"\n{spacing}Child {i}:"
32
- f"{_sub_string(child, tree_functions, 2 * spacing)}"
33
- )
34
- return out_str
35
-
36
-
37
- def _sub_graph(
38
- graph,
39
- node,
40
- tree_functions,
41
- label="0",
42
- parent_label=None,
43
- ):
44
- children = tree_functions.find_children(node)
45
- if children is None or len(children) == 0:
46
- graph.node(label, tree_functions.find_leaf_content(node), shape="ellipse")
47
- else:
48
- graph.node(label, tree_functions.find_decision_content(node), shape="box")
49
- for i, child in enumerate(children):
50
- _sub_graph(
51
- graph,
52
- child,
53
- tree_functions,
54
- f"{label}|{i}",
55
- parent_label=label,
56
- )
57
- if parent_label:
58
- graph.edge(parent_label, label)
59
-
60
-
61
- def has_graphviz():
62
- graphviz_path = shutil.which("dot")
63
- return graphviz_path and os.access(graphviz_path, os.X_OK)
64
-
65
-
66
- def display_tree(
67
- root,
68
- path: Path,
69
- find_children: Callable[[], list],
70
- find_decision_content: Callable[[], str],
71
- find_leaf_content: Callable[[], str],
72
- ):
73
- """
74
- Allows classes which have attributes that are instances of the same class (children)
75
- to be visualised as a decision tree.
76
- Uses graphviz by default, alternatively, if system-wide graphviz is not available,
77
- uses a string representation .
78
-
79
- :param callable find_children: Function that takes a "node" and returns a list of
80
- children nodes
81
- :param callable find_decision_content: Function that takes a "node" and returns a
82
- string for content for decision nodes
83
- :param callable find_leaf_content: Function that takes a "node" and returns a
84
- string for content for leaf nodes
85
- """
86
- tree_functions = TreeFunctions(
87
- find_children, find_decision_content, find_leaf_content
88
- )
89
- if has_graphviz():
90
- graph = graphviz.Digraph(path.name, comment="Graphviz representation of tree")
91
- graph.format = "svg"
92
- _sub_graph(graph, root, tree_functions)
93
- graph.render(directory=path.parent, filename=path.name, cleanup=True).replace(
94
- "\\", "/"
95
- )
96
- else:
97
- # If system graphviz install isn't available, use string representation
98
- logger.info(
99
- "Warning: System graphviz install could not be found, creating string "
100
- "representation instead"
101
- )
102
- with open(f"{path}.txt", "w", encoding="utf-8") as f:
103
- f.write(_sub_string(root, tree_functions))
@@ -1,6 +0,0 @@
1
- from .axis import * # NOQA
2
- from .plot import * # NOQA
3
- from .plot_group import PlotGroupCreate, PlotGroupPublic
4
- from .series import * # NOQA
5
-
6
- __all__ = ["PlotGroupCreate", "PlotGroupPublic"]
@@ -1,44 +0,0 @@
1
- """
2
- This module has a plot's axis
3
- """
4
-
5
- from pydantic import BaseModel
6
-
7
-
8
- class Range(BaseModel, frozen=True):
9
- """
10
- This is a sequence of numbers specified by lower and upper
11
- bounds and a step size. Eg (1, 5, 1) gives: [1, 2, 3, 4]
12
- """
13
-
14
- lower: int
15
- upper: int
16
- step: int
17
-
18
- def eval(self) -> list:
19
- return list(range(self.lower, self.upper, self.step))
20
-
21
-
22
- class PlotAxis(BaseModel, frozen=True):
23
- """
24
- This is a plot's axis
25
-
26
- :param str label: The axis label
27
- :param Range | None: A specification for tick marks
28
- """
29
-
30
- label: str = ""
31
- ticks: Range | list[int] | None = None
32
- scale: str = "linear"
33
- text_fontsize: int = 10
34
- tick_fontsize: int = 10
35
- max_ticks: int = 0
36
- limits: dict = {}
37
-
38
- @property
39
- def resolved_ticks(self) -> list:
40
- if self.ticks:
41
- if isinstance(self.ticks, Range):
42
- return self.ticks.eval()
43
- return self.ticks
44
- return []
@@ -1,71 +0,0 @@
1
- """
2
- This module has content for generating plots
3
- """
4
-
5
- import random
6
-
7
- from pydantic import BaseModel
8
-
9
- from .axis import PlotAxis
10
- from .series import ImageSeries, LinePlotSeries, ScatterPlotSeries
11
-
12
-
13
- class Plot(BaseModel, frozen=True):
14
- """
15
- A generic plot with optional axis ticks
16
- """
17
-
18
- title: str = ""
19
- name: str = ""
20
- x_axis: PlotAxis = PlotAxis()
21
- y_axes: list[PlotAxis] = [PlotAxis()]
22
- plot_type: str = ""
23
- line_series: list[LinePlotSeries] = []
24
- scatter_series: list[ScatterPlotSeries] = []
25
- image_series: list[ImageSeries] = []
26
- legend: str = "none"
27
- aspect: str = "auto"
28
- legend_fontsize: int = 10
29
- title_fontsize: int = 10
30
-
31
- @property
32
- def series(self):
33
- return self.line_series + self.scatter_series + self.image_series
34
-
35
-
36
- class GridPlot(Plot, frozen=True):
37
- """
38
- Make a grid of plots
39
- """
40
-
41
- stride: int = 4
42
- size: tuple = (25, 20)
43
- data: list = []
44
-
45
- def get_series_indices(self, num_samples: int = 0):
46
- rows = max(1, num_samples // self.stride)
47
- cols = num_samples // rows
48
- len_data = len(self.data)
49
-
50
- if num_samples == 0:
51
- indices = list(range(0, len_data))
52
- else:
53
- indices = [random.randint(0, len_data - 1) for _ in range(num_samples)]
54
- return rows, cols, indices
55
-
56
- def get_subplots(self, num_samples: int = 0):
57
- rows, cols, indices = self.get_series_indices(num_samples)
58
-
59
- subplots = []
60
- count = 1
61
- for index in indices:
62
- if num_samples > 0 and count == num_samples + 1:
63
- break
64
- if isinstance(self.data[index], list):
65
- for series in self.data[index]:
66
- subplots.append(series)
67
- count += 1
68
- else:
69
- subplots.append(self.data[index])
70
- count += 1
71
- return rows, cols, subplots