plothist 1.6.0__tar.gz → 1.8.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 (174) hide show
  1. {plothist-1.6.0 → plothist-1.8.0}/.github/ISSUE_TEMPLATE/user-story.md +5 -5
  2. {plothist-1.6.0 → plothist-1.8.0}/.github/workflows/cd.yaml +5 -7
  3. {plothist-1.6.0 → plothist-1.8.0}/.github/workflows/ci.yaml +10 -7
  4. {plothist-1.6.0 → plothist-1.8.0}/.github/workflows/coverage.yaml +2 -4
  5. {plothist-1.6.0 → plothist-1.8.0}/.github/workflows/pr.yaml +1 -1
  6. {plothist-1.6.0 → plothist-1.8.0}/.pre-commit-config.yaml +18 -8
  7. plothist-1.8.0/AUTHORS.md +2 -0
  8. {plothist-1.6.0 → plothist-1.8.0}/CITATION.cff +7 -7
  9. plothist-1.8.0/CONTRIBUTING.md +1 -0
  10. {plothist-1.6.0 → plothist-1.8.0}/LICENSE +1 -1
  11. {plothist-1.6.0 → plothist-1.8.0}/PKG-INFO +14 -7
  12. {plothist-1.6.0 → plothist-1.8.0}/README.rst +4 -2
  13. {plothist-1.6.0 → plothist-1.8.0}/docs/CONTRIBUTING.rst +3 -3
  14. {plothist-1.6.0 → plothist-1.8.0}/docs/basics/variable_registry.rst +17 -19
  15. {plothist-1.6.0 → plothist-1.8.0}/docs/conf.py +1 -1
  16. plothist-1.8.0/docs/img/2d_hist_correlations_0.png +0 -0
  17. plothist-1.8.0/docs/img/2d_hist_correlations_1.png +0 -0
  18. plothist-1.8.0/docs/img/2d_hist_correlations_2.png +0 -0
  19. {plothist-1.6.0 → plothist-1.8.0}/docs/usage/installation.rst +3 -3
  20. {plothist-1.6.0 → plothist-1.8.0}/noxfile.py +21 -10
  21. {plothist-1.6.0 → plothist-1.8.0}/pyproject.toml +35 -9
  22. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/__init__.py +3 -6
  23. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/_version.py +16 -3
  24. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/comparison.py +1 -1
  25. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/2d_hist_correlations.py +2 -2
  26. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/advanced/1d_side_by_side_with_numbers.py +1 -1
  27. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/advanced/asymmetry_comparison_advanced.py +3 -2
  28. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/color_palette_squares.py +8 -3
  29. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/histogramming.py +9 -4
  30. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/plothist_style.py +24 -13
  31. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/plotters.py +32 -29
  32. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/variable_registry.py +57 -24
  33. {plothist-1.6.0 → plothist-1.8.0}/tests/test_boost_histogram_version.py +1 -1
  34. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison.py +5 -5
  35. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison_efficiency.py +1 -1
  36. {plothist-1.6.0 → plothist-1.8.0}/tests/test_histogramming.py +17 -9
  37. {plothist-1.6.0 → plothist-1.8.0}/tests/test_plothist_style.py +7 -7
  38. {plothist-1.6.0 → plothist-1.8.0}/tests/test_plotters.py +11 -9
  39. {plothist-1.6.0 → plothist-1.8.0}/tests/test_variable_registry.py +153 -17
  40. plothist-1.8.0/uv.lock +1583 -0
  41. plothist-1.6.0/AUTHORS.md +0 -2
  42. plothist-1.6.0/docs/img/2d_hist_correlations_0.png +0 -0
  43. plothist-1.6.0/docs/img/2d_hist_correlations_1.png +0 -0
  44. plothist-1.6.0/docs/img/2d_hist_correlations_2.png +0 -0
  45. plothist-1.6.0/uv.lock +0 -1988
  46. {plothist-1.6.0 → plothist-1.8.0}/.github/dependabot.yaml +0 -0
  47. {plothist-1.6.0 → plothist-1.8.0}/.github/release.yaml +0 -0
  48. {plothist-1.6.0 → plothist-1.8.0}/.gitignore +0 -0
  49. {plothist-1.6.0 → plothist-1.8.0}/.readthedocs.yaml +0 -0
  50. {plothist-1.6.0 → plothist-1.8.0}/codecov.yml +0 -0
  51. {plothist-1.6.0 → plothist-1.8.0}/docs/advanced/model_examples.rst +0 -0
  52. {plothist-1.6.0 → plothist-1.8.0}/docs/advanced/other_advanced.rst +0 -0
  53. {plothist-1.6.0 → plothist-1.8.0}/docs/basics/1d_func.rst +0 -0
  54. {plothist-1.6.0 → plothist-1.8.0}/docs/basics/1d_hist.rst +0 -0
  55. {plothist-1.6.0 → plothist-1.8.0}/docs/basics/2d_hist.rst +0 -0
  56. {plothist-1.6.0 → plothist-1.8.0}/docs/documentation/documentation.rst +0 -0
  57. {plothist-1.6.0 → plothist-1.8.0}/docs/documentation/statistics.rst +0 -0
  58. {plothist-1.6.0 → plothist-1.8.0}/docs/documentation/troubleshooting.rst +0 -0
  59. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_advanced.png +0 -0
  60. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_advanced.svg +0 -0
  61. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_asymmetry.png +0 -0
  62. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_difference.png +0 -0
  63. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_efficiency.png +0 -0
  64. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_only_efficiency.png +0 -0
  65. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_pull.png +0 -0
  66. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_ratio.png +0 -0
  67. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_relative_difference.png +0 -0
  68. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_comparison_split_ratio.png +0 -0
  69. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_elt1.png +0 -0
  70. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_elt1_stacked.png +0 -0
  71. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_elt2.png +0 -0
  72. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_hist_simple.png +0 -0
  73. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_int_category.png +0 -0
  74. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_profile.png +0 -0
  75. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_side_by_side.png +0 -0
  76. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_side_by_side_with_numbers.png +0 -0
  77. {plothist-1.6.0 → plothist-1.8.0}/docs/img/1d_str_category.png +0 -0
  78. {plothist-1.6.0 → plothist-1.8.0}/docs/img/2d_hist_simple.png +0 -0
  79. {plothist-1.6.0 → plothist-1.8.0}/docs/img/2d_hist_simple_discrete_colormap.png +0 -0
  80. {plothist-1.6.0 → plothist-1.8.0}/docs/img/2d_hist_uneven.png +0 -0
  81. {plothist-1.6.0 → plothist-1.8.0}/docs/img/2d_hist_with_projections.png +0 -0
  82. {plothist-1.6.0 → plothist-1.8.0}/docs/img/2d_hist_with_projections.svg +0 -0
  83. {plothist-1.6.0 → plothist-1.8.0}/docs/img/add_text_example.png +0 -0
  84. {plothist-1.6.0 → plothist-1.8.0}/docs/img/asymmetry_comparison_advanced.png +0 -0
  85. {plothist-1.6.0 → plothist-1.8.0}/docs/img/color_palette_hists.png +0 -0
  86. {plothist-1.6.0 → plothist-1.8.0}/docs/img/fct_1d.png +0 -0
  87. {plothist-1.6.0 → plothist-1.8.0}/docs/img/fct_1d_stacked.png +0 -0
  88. {plothist-1.6.0 → plothist-1.8.0}/docs/img/matplotlib_example.png +0 -0
  89. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_all_comparisons.png +0 -0
  90. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_all_comparisons_no_model_unc.png +0 -0
  91. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_flatten2D.png +0 -0
  92. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_pull.png +0 -0
  93. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_pull_no_model_unc.png +0 -0
  94. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_stacked.png +0 -0
  95. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_stacked.svg +0 -0
  96. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_stacked_unstacked.png +0 -0
  97. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_examples_unstacked.png +0 -0
  98. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_with_stacked_and_unstacked_function_components.png +0 -0
  99. {plothist-1.6.0 → plothist-1.8.0}/docs/img/model_with_stacked_and_unstacked_histograms_components.png +0 -0
  100. {plothist-1.6.0 → plothist-1.8.0}/docs/img/plothist_example.png +0 -0
  101. {plothist-1.6.0 → plothist-1.8.0}/docs/img/pyhf_example.svg +0 -0
  102. {plothist-1.6.0 → plothist-1.8.0}/docs/img/ratio_data_vs_model_with_stacked_and_unstacked_function_components.png +0 -0
  103. {plothist-1.6.0 → plothist-1.8.0}/docs/img/savefig_comparisons.gif +0 -0
  104. {plothist-1.6.0 → plothist-1.8.0}/docs/img/uncertainty_types.png +0 -0
  105. {plothist-1.6.0 → plothist-1.8.0}/docs/img/usage_YlGnBu_r_palette.png +0 -0
  106. {plothist-1.6.0 → plothist-1.8.0}/docs/img/usage_coolwarm_palette.png +0 -0
  107. {plothist-1.6.0 → plothist-1.8.0}/docs/img/usage_cubehelix.png +0 -0
  108. {plothist-1.6.0 → plothist-1.8.0}/docs/img/usage_style_cycle.png +0 -0
  109. {plothist-1.6.0 → plothist-1.8.0}/docs/img/usage_viridis_palette.png +0 -0
  110. {plothist-1.6.0 → plothist-1.8.0}/docs/index.rst +0 -0
  111. {plothist-1.6.0 → plothist-1.8.0}/docs/usage/plot_fitting_results.rst +0 -0
  112. {plothist-1.6.0 → plothist-1.8.0}/docs/usage/style.rst +0 -0
  113. {plothist-1.6.0 → plothist-1.8.0}/docs/usage/utilities.rst +0 -0
  114. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/_version.pyi +0 -0
  115. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/default_style.mplstyle +0 -0
  116. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_asymmetry.py +0 -0
  117. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_difference.py +0 -0
  118. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_efficiency.py +0 -0
  119. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_only_efficiency.py +0 -0
  120. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_pull.py +0 -0
  121. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_ratio.py +0 -0
  122. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_relative_difference.py +0 -0
  123. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_comparison_split_ratio.py +0 -0
  124. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_elt1.py +0 -0
  125. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_elt1_stacked.py +0 -0
  126. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_elt2.py +0 -0
  127. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_hist_simple.py +0 -0
  128. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_int_category.py +0 -0
  129. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_profile.py +0 -0
  130. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_side_by_side.py +0 -0
  131. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/1d_str_category.py +0 -0
  132. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/1d_hist/README.rst +0 -0
  133. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/2d_hist_simple.py +0 -0
  134. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/2d_hist_simple_discrete_colormap.py +0 -0
  135. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/2d_hist_uneven.py +0 -0
  136. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/2d_hist_with_projections.py +0 -0
  137. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/2d_hist/README.rst +0 -0
  138. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/README.rst +0 -0
  139. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/advanced/1d_comparison_advanced.py +0 -0
  140. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/advanced/README.rst +0 -0
  141. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/advanced/model_examples_flatten2D.py +0 -0
  142. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/func_1d/README.rst +0 -0
  143. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/func_1d/fct_1d.py +0 -0
  144. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/func_1d/fct_1d_stacked.py +0 -0
  145. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/README.rst +0 -0
  146. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_all_comparisons.py +0 -0
  147. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_all_comparisons_no_model_unc.py +0 -0
  148. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_examples_pull.py +0 -0
  149. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_examples_pull_no_model_unc.py +0 -0
  150. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_examples_stacked.py +0 -0
  151. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_examples_stacked_unstacked.py +0 -0
  152. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_examples_unstacked.py +0 -0
  153. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_function_components.py +0 -0
  154. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_histograms_components.py +0 -0
  155. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/model_ex/ratio_data_vs_model_with_stacked_and_unstacked_function_components.py +0 -0
  156. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/README.rst +0 -0
  157. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/add_text_example.py +0 -0
  158. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/color_palette_hists.py +0 -0
  159. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/matplotlib_vs_plothist_style.py +0 -0
  160. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/examples/utility/uncertainty_types.py +0 -0
  161. {plothist-1.6.0 → plothist-1.8.0}/src/plothist/test_helpers.py +0 -0
  162. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison_asymmetry.py +0 -0
  163. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison_difference.py +0 -0
  164. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison_pull.py +0 -0
  165. {plothist-1.6.0 → plothist-1.8.0}/tests/test_comparison_ratio.py +0 -0
  166. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_1d_hist.py +0 -0
  167. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_2d_hist.py +0 -0
  168. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_advanced.py +0 -0
  169. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_data_model.py +0 -0
  170. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_func_1d.py +0 -0
  171. {plothist-1.6.0 → plothist-1.8.0}/tests/test_examples_utility.py +0 -0
  172. {plothist-1.6.0 → plothist-1.8.0}/tests/test_fonts.py +0 -0
  173. {plothist-1.6.0 → plothist-1.8.0}/tests/test_get_data.py +0 -0
  174. {plothist-1.6.0 → plothist-1.8.0}/tests/test_test_helpers.py +0 -0
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: User Story
3
3
  about: This template is for creating user stories.
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
4
+ title: ""
5
+ labels: ""
6
+ assignees: ""
8
7
  ---
9
8
 
10
9
  **As a** [role]
@@ -12,7 +11,8 @@ assignees: ''
12
11
  **So that** [benefit]
13
12
 
14
13
  ### Details and Assumptions
15
- * [document what you know]
14
+
15
+ - [document what you know]
16
16
 
17
17
  ### Acceptance Criteria
18
18
 
@@ -15,17 +15,15 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
 
17
17
  steps:
18
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v6
19
19
  with:
20
20
  persist-credentials: false
21
21
  - name: Install uv and set the python version
22
- uses: astral-sh/setup-uv@v6
23
- with:
24
- version: "0.6.8"
22
+ uses: astral-sh/setup-uv@v7
25
23
  - name: Build distribution
26
24
  run: uv build
27
25
  - name: Store the distribution packages
28
- uses: actions/upload-artifact@v4
26
+ uses: actions/upload-artifact@v6
29
27
  with:
30
28
  name: python-package-distributions
31
29
  path: dist/
@@ -46,7 +44,7 @@ jobs:
46
44
 
47
45
  steps:
48
46
  - name: Download all the dists
49
- uses: actions/download-artifact@v4
47
+ uses: actions/download-artifact@v7
50
48
  with:
51
49
  name: python-package-distributions
52
50
  path: dist/
@@ -71,7 +69,7 @@ jobs:
71
69
 
72
70
  steps:
73
71
  - name: Download all the dists
74
- uses: actions/download-artifact@v4
72
+ uses: actions/download-artifact@v7
75
73
  with:
76
74
  name: python-package-distributions
77
75
  path: dist/
@@ -7,37 +7,40 @@ on:
7
7
  pull_request:
8
8
  branches: ["main"]
9
9
 
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
10
14
  jobs:
11
15
  build:
12
16
  runs-on: ubuntu-latest
13
17
  strategy:
14
18
  fail-fast: false
15
19
  matrix:
16
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
20
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
17
21
 
18
22
  steps:
19
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@v6
20
24
 
21
25
  - name: Install uv and set the python version
22
- uses: astral-sh/setup-uv@v6
26
+ uses: astral-sh/setup-uv@v7
23
27
  with:
24
- version: "0.6.8"
25
28
  python-version: ${{ matrix.python-version }}
26
29
 
27
30
  - name: Install the project
28
31
  run: |
29
32
  uv sync --group dev --group test
30
33
 
31
- - name: Run pre-commit
34
+ - name: Run prek
32
35
  run: |
33
- uv run pre-commit run --all-files
36
+ uv run prek run --all-files
34
37
 
35
38
  - name: Test with pytest
36
39
  run: |
37
40
  uv run python -m pytest -r sa --mpl --mpl-results-path=pytest_results -n auto
38
41
 
39
42
  - name: Upload pytest test results
40
- uses: actions/upload-artifact@v4
43
+ uses: actions/upload-artifact@v6
41
44
  if: failure()
42
45
  with:
43
46
  name: pytest_results-${{ matrix.python-version }}
@@ -11,14 +11,12 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: Checkout
14
- uses: actions/checkout@v4
14
+ uses: actions/checkout@v6
15
15
  with:
16
16
  fetch-depth: 2
17
17
 
18
18
  - name: Install uv and set the python version
19
- uses: astral-sh/setup-uv@v6
20
- with:
21
- version: "0.6.8"
19
+ uses: astral-sh/setup-uv@v7
22
20
 
23
21
  - name: Install the project and the test dependencies
24
22
  run: uv sync --group test
@@ -16,6 +16,6 @@ jobs:
16
16
  name: Validate PR title
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
- - uses: amannn/action-semantic-pull-request@v5
19
+ - uses: amannn/action-semantic-pull-request@v6
20
20
  env:
21
21
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -5,7 +5,7 @@ ci:
5
5
 
6
6
  repos:
7
7
  - repo: https://github.com/adamchainz/blacken-docs
8
- rev: "1.19.1"
8
+ rev: "1.20.0"
9
9
  hooks:
10
10
  - id: blacken-docs
11
11
  args: ["--line-length", "120"]
@@ -13,7 +13,7 @@ repos:
13
13
  - black==24.2.0
14
14
 
15
15
  - repo: https://github.com/pre-commit/pre-commit-hooks
16
- rev: v5.0.0
16
+ rev: v6.0.0
17
17
  hooks:
18
18
  - id: check-added-large-files
19
19
  - id: check-case-conflict
@@ -30,9 +30,9 @@ repos:
30
30
  args: ["--pytest-test-first"]
31
31
 
32
32
  - repo: https://github.com/astral-sh/ruff-pre-commit
33
- rev: v0.12.7
33
+ rev: v0.14.10
34
34
  hooks:
35
- - id: ruff
35
+ - id: ruff-check
36
36
  args: ["--fix", "--show-fixes"]
37
37
  - id: ruff-format
38
38
 
@@ -44,13 +44,13 @@ repos:
44
44
  - tomli
45
45
 
46
46
  - repo: https://github.com/python-jsonschema/check-jsonschema
47
- rev: 0.33.2
47
+ rev: 0.36.0
48
48
  hooks:
49
49
  - id: check-github-workflows
50
50
  args: ["--verbose"]
51
51
 
52
52
  - repo: https://github.com/pre-commit/mirrors-mypy
53
- rev: v1.17.1
53
+ rev: v1.19.1
54
54
  hooks:
55
55
  - id: mypy
56
56
  files: src
@@ -65,14 +65,24 @@ repos:
65
65
  - id: rst-directive-colons
66
66
  - id: rst-inline-touching-normal
67
67
 
68
+ - repo: https://github.com/rbubley/mirrors-prettier
69
+ rev: "v3.7.4"
70
+ hooks:
71
+ - id: prettier
72
+
68
73
  - repo: https://github.com/python-jsonschema/check-jsonschema
69
- rev: 0.33.2
74
+ rev: 0.36.0
70
75
  hooks:
71
76
  - id: check-readthedocs
72
77
  - id: check-dependabot
73
78
  - id: check-github-workflows
74
79
 
75
80
  - repo: https://github.com/henryiii/validate-pyproject-schema-store
76
- rev: 2025.07.28
81
+ rev: 2026.01.02
77
82
  hooks:
78
83
  - id: validate-pyproject
84
+
85
+ - repo: https://github.com/scientific-python/cookie
86
+ rev: 2025.11.21
87
+ hooks:
88
+ - id: sp-repo-review
@@ -0,0 +1,2 @@
1
+ - Cyrille Praz ([@cyrraz](https://github.com/cyrraz))
2
+ - Tristan Fillinger ([@0ctagon](https://github.com/0ctagon))
@@ -4,13 +4,13 @@ type: software
4
4
  title: "plothist"
5
5
  abstract: "Visualize and compare data in a scalable way and a beautiful style."
6
6
  authors:
7
- - family-names: "Praz"
8
- given-names: "Cyrille"
9
- orcid: "https://orcid.org/0000-0002-6154-885X"
10
- - family-names: "Fillinger"
11
- given-names: "Tristan"
12
- affiliation: "High Energy Accelerator Research Organization (KEK), Tsukuba, Japan"
13
- orcid: "https://orcid.org/0000-0001-9795-7412"
7
+ - family-names: "Praz"
8
+ given-names: "Cyrille"
9
+ orcid: "https://orcid.org/0000-0002-6154-885X"
10
+ - family-names: "Fillinger"
11
+ given-names: "Tristan"
12
+ affiliation: "High Energy Accelerator Research Organization (KEK), Tsukuba, Japan"
13
+ orcid: "https://orcid.org/0000-0001-9795-7412"
14
14
  doi: 10.5281/zenodo.10995667
15
15
  repository-code: "https://github.com/cyrraz/plothist/"
16
16
  url: " plothist.readthedocs.io/"
@@ -0,0 +1 @@
1
+ For contributing, refer to the chapter [Contributing](https://plothist.readthedocs.io/en/latest/CONTRIBUTING.html) in the documentation.
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2023-2025, Cyrille Praz, Tristan Fillinger
3
+ Copyright (c) 2023-2026, Cyrille Praz, Tristan Fillinger
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without
6
6
  modification, are permitted provided that the following conditions are met:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plothist
3
- Version: 1.6.0
3
+ Version: 1.8.0
4
4
  Summary: Plot histograms in a scalable way and a beautiful style.
5
5
  Project-URL: Homepage, https://github.com/cyrraz/plothist
6
6
  Project-URL: Documentation, https://plothist.readthedocs.io/
@@ -14,14 +14,19 @@ Classifier: Intended Audience :: Science/Research
14
14
  Classifier: License :: OSI Approved :: BSD License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
17
23
  Classifier: Topic :: Scientific/Engineering
18
- Requires-Python: >=3.9
24
+ Requires-Python: >=3.10
19
25
  Requires-Dist: boost-histogram>=1.4.0
20
- Requires-Dist: matplotlib>=3.0
26
+ Requires-Dist: matplotlib>=3.10.8
21
27
  Requires-Dist: numpy>=1.14.5
22
28
  Requires-Dist: plothist-utils>=0.0.1
23
- Requires-Dist: pyyaml>=5.3.1
24
- Requires-Dist: requests>=2.25.0
29
+ Requires-Dist: pyyaml>=6.0.3
25
30
  Requires-Dist: scipy>=1.6.0
26
31
  Description-Content-Type: text/x-rst
27
32
 
@@ -46,9 +51,9 @@ plothist
46
51
  :width: 320
47
52
 
48
53
 
49
- |GitHub Project| |PyPI version| |Docs from main| |Discussion| |DOI| |Linter|
54
+ |GitHub Project| |PyPI version| |conda version| |Docs from main| |Discussion| |DOI|
50
55
 
51
- |GitHub Actions Status: CI| |GitHub Actions Status: CD| |pre-commit.ci Status| |Code Coverage|
56
+ |GitHub Actions Status: CI| |GitHub Actions Status: CD| |pre-commit.ci Status| |Linter| |Code Coverage|
52
57
 
53
58
  This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
54
59
 
@@ -75,6 +80,8 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
75
80
  :target: https://github.com/cyrraz/plothist
76
81
  .. |PyPI version| image:: https://badge.fury.io/py/plothist.svg?style=flat-square
77
82
  :target: https://badge.fury.io/py/plothist
83
+ .. |conda version| image:: https://img.shields.io/conda/vn/conda-forge/plothist?style=platic
84
+ :target: https://anaconda.org/conda-forge/plothist
78
85
  .. |Docs from main| image:: https://img.shields.io/badge/docs-main-blue.svg?style=platic
79
86
  :target: https://plothist.readthedocs.io/en/main/
80
87
  .. |Discussion| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github?style=flat-square
@@ -19,9 +19,9 @@ plothist
19
19
  :width: 320
20
20
 
21
21
 
22
- |GitHub Project| |PyPI version| |Docs from main| |Discussion| |DOI| |Linter|
22
+ |GitHub Project| |PyPI version| |conda version| |Docs from main| |Discussion| |DOI|
23
23
 
24
- |GitHub Actions Status: CI| |GitHub Actions Status: CD| |pre-commit.ci Status| |Code Coverage|
24
+ |GitHub Actions Status: CI| |GitHub Actions Status: CD| |pre-commit.ci Status| |Linter| |Code Coverage|
25
25
 
26
26
  This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
27
27
 
@@ -48,6 +48,8 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
48
48
  :target: https://github.com/cyrraz/plothist
49
49
  .. |PyPI version| image:: https://badge.fury.io/py/plothist.svg?style=flat-square
50
50
  :target: https://badge.fury.io/py/plothist
51
+ .. |conda version| image:: https://img.shields.io/conda/vn/conda-forge/plothist?style=platic
52
+ :target: https://anaconda.org/conda-forge/plothist
51
53
  .. |Docs from main| image:: https://img.shields.io/badge/docs-main-blue.svg?style=platic
52
54
  :target: https://plothist.readthedocs.io/en/main/
53
55
  .. |Discussion| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github?style=flat-square
@@ -66,14 +66,14 @@ You can also run specific nox sessions:
66
66
  Linters and Formatters
67
67
  ----------------------
68
68
 
69
- ``plothist`` uses `pre-commit <https://pre-commit.com/>`_ to manage linters and formatters.
69
+ ``plothist`` uses `prek <https://prek.j178.dev/>`_ to manage linters and formatters.
70
70
 
71
71
  The tools are listed in ``.pre-commit-config.yaml``. Key among them is ``Ruff`` is used for linting and formatting, with its configuration in ``pyproject.toml``.
72
72
 
73
73
  Use ``nox -s lint`` to run the linters and formatters.
74
74
 
75
- To install the pre-commit hooks, run the following command (assuming you have installed ``plothist`` via ``uv`` following the instructions in :ref:`install-dev-version`):
75
+ To install the hooks, run the following command (assuming you have installed ``plothist`` via ``uv`` following the instructions in :ref:`install-dev-version`):
76
76
 
77
77
  .. code-block:: console
78
78
 
79
- uv run pre-commit install
79
+ uv run prek install
@@ -25,7 +25,7 @@ For each variable in the list, the following information is stored by default in
25
25
 
26
26
  variable_0:
27
27
  name: variable_0
28
- bins: 50
28
+ bins: auto
29
29
  range:
30
30
  - min
31
31
  - max
@@ -63,24 +63,24 @@ Update the registry
63
63
 
64
64
  Multiple functions are available to modify the plotting information of the variables in the registry, add or remove some parameters.
65
65
 
66
- Ranges
67
- ------
66
+ Binning and ranges
67
+ ------------------
68
68
 
69
- The :func:`update_variable_registry_ranges() <plothist.variable_registry.update_variable_registry_ranges>` function automatically updates the range parameter in the ``yaml`` file to the ``min`` and ``max`` values of the variable in the dataset:
69
+ The :func:`update_variable_registry_binning() <plothist.variable_registry.update_variable_registry_binning>` function automatically updates the number of bins parameter in the ``yaml`` file to the length of [``numpy.histogram_bin_edges``](https://numpy.org/doc/2.1/reference/generated/numpy.histogram_bin_edges.html#numpy-histogram-bin-edges) minus one (the bins are regular) and automatically updates the range parameter in the ``yaml`` file to the ``min`` and ``max`` values of the variable in the dataset:
70
70
 
71
71
  .. code-block:: python
72
72
 
73
- from plothist import update_variable_registry_ranges
73
+ from plothist import update_variable_registry_binning
74
74
 
75
- update_variable_registry_ranges(df, variable_keys)
75
+ update_variable_registry_binning(df, variable_keys)
76
76
 
77
- The range has been updated for all the variables in ``variables_keys``. The ``yaml`` file is now:
77
+ The number of bins and the range has been updated for all the variables in ``variables_keys``. The ``yaml`` file is now:
78
78
 
79
79
  .. code-block:: yaml
80
80
 
81
81
  variable_0:
82
82
  name: variable_0
83
- bins: 50
83
+ bins: 121 # = len(numpy.histogram_bin_edges(df["variable_0"], bins="auto")) - 1
84
84
  range:
85
85
  - -10.55227774892869 # min(df["variable_0"])
86
86
  - 10.04658448558009 # max(df["variable_0"])
@@ -94,10 +94,9 @@ The range has been updated for all the variables in ``variables_keys``. The ``ya
94
94
  variable_1:
95
95
  ...
96
96
 
97
- Then, you may manually modify the ``yaml`` to get a more suitable range to display in the plot.
98
-
99
- Calling this function again on the same variable keys will not overwrite their ``range`` parameter, unless the ``overwrite`` parameter is set to ``True``.
97
+ Then, you may manually modify the ``yaml`` to get a more suitable binning and range to display in the plot.
100
98
 
99
+ Calling this function again on the same variable keys will not overwrite their ``bins`` or ``range`` parameter, unless the ``overwrite`` parameter is set to ``True``.
101
100
 
102
101
  Add or modify variable properties
103
102
  ---------------------------------
@@ -124,7 +123,7 @@ This will add the new properties to the ``yaml`` file to all the variables in ``
124
123
 
125
124
  variable_0:
126
125
  name: variable_0
127
- bins: 50
126
+ bins: 121
128
127
  range:
129
128
  - -10.55227774892869
130
129
  - 10.04658448558009
@@ -160,7 +159,7 @@ To remove a parameter from the plotting information, you can use the :func:`remo
160
159
 
161
160
  from plothist import remove_variable_registry_parameters
162
161
 
163
- remove_variable_registry_parameters(["range", "log", "legend_ncols", "new_property"], variable_keys)
162
+ remove_variable_registry_parameters(["bins", "range", "log", "legend_ncols", "new_property"], variable_keys)
164
163
 
165
164
  The ``yaml`` file is updated:
166
165
 
@@ -168,7 +167,6 @@ The ``yaml`` file is updated:
168
167
 
169
168
  variable_0:
170
169
  name: variable_0
171
- bins: 50
172
170
  label: variable_0
173
171
  legend_location: best
174
172
  docstring: ''
@@ -197,7 +195,7 @@ Here is an example of how to create, update, and use the variable registry to pl
197
195
  plot_hist,
198
196
  create_variable_registry,
199
197
  update_variable_registry,
200
- update_variable_registry_ranges,
198
+ update_variable_registry_binning,
201
199
  get_variable_from_registry,
202
200
  add_text,
203
201
  )
@@ -208,8 +206,8 @@ Here is an example of how to create, update, and use the variable registry to pl
208
206
  # Create the registry
209
207
  create_variable_registry(variable_keys)
210
208
 
211
- # Update the ranges
212
- update_variable_registry_ranges(df, variable_keys)
209
+ # Update the number of bins and range
210
+ update_variable_registry_binning(df, variable_keys)
213
211
 
214
212
  # Add custom info
215
213
  update_variable_registry({"text": "my analysis"}, variable_keys)
@@ -245,7 +243,7 @@ Example: to plot a zoom on a variable but still keep the original one, you can c
245
243
 
246
244
  variable_0:
247
245
  name: variable_0
248
- bins: 50
246
+ bins: 121
249
247
  range:
250
248
  - -10
251
249
  - 10
@@ -257,7 +255,7 @@ Example: to plot a zoom on a variable but still keep the original one, you can c
257
255
 
258
256
  variable_0_zoom:
259
257
  name: variable_0
260
- bins: 50
258
+ bins: 121
261
259
  range:
262
260
  - -1
263
261
  - 1
@@ -21,7 +21,7 @@ import plothist
21
21
  # -- Project information -----------------------------------------------------
22
22
 
23
23
  project = "plothist"
24
- copyright = "2023-2025, Cyrille Praz, Tristan Fillinger"
24
+ copyright = "2023-2026, Cyrille Praz, Tristan Fillinger"
25
25
  author = "Cyrille Praz, Tristan Fillinger"
26
26
 
27
27
  parts = plothist.__version__.split(".")
@@ -7,7 +7,7 @@ Installation and update
7
7
  Prerequisite
8
8
  ============
9
9
 
10
- You need version 3.9 (or a more recent version) of Python 3. You can check your version of Python 3 with:
10
+ You need version 3.10 (or a more recent version) of Python 3. You can check your version of Python 3 with:
11
11
 
12
12
  .. code-block:: bash
13
13
 
@@ -64,11 +64,11 @@ To update ``plothist`` to its latest stable version, follow the instructions abo
64
64
  Install the development version
65
65
  ===============================
66
66
 
67
- 1. Clone the plothist repository and go to the package folder:
67
+ 1. `Fork <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo?tool=webui>`_ and clone locally the plothist repository, then go to the package folder:
68
68
 
69
69
  .. code-block:: bash
70
70
 
71
- git clone git@github.com:cyrraz/plothist.git
71
+ git clone git@github.com:USERNAME/plothist.git
72
72
 
73
73
  cd plothist
74
74
 
@@ -1,26 +1,33 @@
1
+ #!/usr/bin/env -S uv run --script
2
+
3
+ # /// script
4
+ # dependencies = ["nox>=2025.11.12"]
5
+ # ///
6
+
7
+ """Nox runner."""
8
+
1
9
  from __future__ import annotations
2
10
 
3
11
  import argparse
4
12
 
5
13
  import nox
6
14
 
7
- nox.options.sessions = ["lint", "tests"]
8
- nox.needs_version = ">=2025.2.9"
15
+ nox.needs_version = ">=2025.11.12"
9
16
  nox.options.default_venv_backend = "uv|venv"
10
17
 
11
- PYTHON_ALL_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
18
+ PYTHON_ALL_VERSIONS = ["3.10", "3.14"]
12
19
 
13
20
 
14
- @nox.session(reuse_venv=True)
21
+ @nox.session(reuse_venv=True, default=True)
15
22
  def lint(session: nox.Session) -> None:
16
23
  """
17
24
  Run the linter.
18
25
  """
19
- session.install("pre-commit")
20
- session.run("pre-commit", "run", "--all-files", *session.posargs)
26
+ session.install("prek")
27
+ session.run("prek", "run", "--all-files", *session.posargs)
21
28
 
22
29
 
23
- @nox.session(python=PYTHON_ALL_VERSIONS, reuse_venv=True)
30
+ @nox.session(python=PYTHON_ALL_VERSIONS, reuse_venv=True, default=True)
24
31
  def tests(session: nox.Session) -> None:
25
32
  """
26
33
  Run the unit and regular tests.
@@ -31,7 +38,7 @@ def tests(session: nox.Session) -> None:
31
38
  session.run("pytest", "--mpl", "-n", "auto", *session.posargs)
32
39
 
33
40
 
34
- @nox.session(reuse_venv=True)
41
+ @nox.session(reuse_venv=True, default=False)
35
42
  def generate_examples_figures(session: nox.Session) -> None:
36
43
  """
37
44
  Generate the example figures. Pass "-- tests/test_examples_*.py" to run only the relevant tests.
@@ -47,7 +54,7 @@ def generate_examples_figures(session: nox.Session) -> None:
47
54
 
48
55
 
49
56
  # run coverage
50
- @nox.session(reuse_venv=True)
57
+ @nox.session(reuse_venv=True, default=False)
51
58
  def coverage(session: nox.Session) -> None:
52
59
  """
53
60
  Run the unit tests with coverage. Warning: takes a long time to run.
@@ -62,7 +69,7 @@ def coverage(session: nox.Session) -> None:
62
69
  )
63
70
 
64
71
 
65
- @nox.session(reuse_venv=True)
72
+ @nox.session(reuse_venv=True, default=False)
66
73
  def docs(session: nox.Session) -> None:
67
74
  """
68
75
  Build the docs. Pass --non-interactive to avoid serving. Pass "-- -b linkcheck" to check links.
@@ -95,3 +102,7 @@ def docs(session: nox.Session) -> None:
95
102
  )
96
103
  else:
97
104
  session.run("sphinx-build", "--keep-going", *shared_args)
105
+
106
+
107
+ if __name__ == "__main__":
108
+ nox.main()
@@ -16,17 +16,22 @@ classifiers = [
16
16
  "Intended Audience :: Science/Research",
17
17
  "License :: OSI Approved :: BSD License",
18
18
  "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
19
25
  "Programming Language :: Python",
20
26
  "Topic :: Scientific/Engineering",
21
27
  ]
22
- requires-python = ">=3.9"
28
+ requires-python = ">=3.10"
23
29
  dependencies = [
24
30
  "boost-histogram>=1.4.0",
25
31
  "numpy>=1.14.5",
26
- "matplotlib>=3.0",
27
- "pyyaml>=5.3.1",
32
+ "matplotlib>=3.10.8",
33
+ "pyyaml>=6.0.3",
28
34
  "scipy>=1.6.0",
29
- "requests>=2.25.0",
30
35
  "plothist_utils>=0.0.1",
31
36
  ]
32
37
  dynamic = ["version"]
@@ -43,12 +48,12 @@ write-changes = true
43
48
 
44
49
  [dependency-groups]
45
50
  dev = [
46
- "pre-commit>=4.1.0",
51
+ "prek>=0.1.1",
47
52
  ]
48
53
  test = [
49
- "pytest>=8.3.5",
50
- "pytest-cov>=4.1.0",
51
- "pytest-mpl>=0.17.0",
54
+ "pytest>=9",
55
+ "pytest-cov>=7",
56
+ "pytest-mpl>=0.18.0",
52
57
  "pytest-github-actions-annotate-failures>=0.3.0",
53
58
  "pytest-xdist>=3.8.0",
54
59
  ]
@@ -59,6 +64,28 @@ docs = [
59
64
  ]
60
65
 
61
66
 
67
+ [tool.pytest]
68
+ minversion = "9.0"
69
+ addopts = ["-ra", "--showlocals"]
70
+ strict = true
71
+ filterwarnings = [
72
+ "error",
73
+ ]
74
+ log_level = "INFO"
75
+ testpaths = [
76
+ "tests",
77
+ ]
78
+
79
+ [tool.mypy]
80
+ files = ["src", "tests"]
81
+ python_version = "3.10"
82
+ warn_unused_configs = true
83
+ strict = true
84
+ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
85
+ warn_unreachable = true
86
+ disallow_untyped_defs = false
87
+ disallow_incomplete_defs = false
88
+
62
89
  [tool.hatch]
63
90
  version.source = "vcs"
64
91
  build.hooks.vcs.version-file = "src/plothist/_version.py"
@@ -88,5 +115,4 @@ ignore = [
88
115
  [tool.ruff.lint.per-file-ignores]
89
116
  "src/plothist/examples/**/*.py" = [
90
117
  "E402", # module level import not at top of file
91
- "PD901", # Avoid using the generic variable name `df` for DataFrames
92
118
  ]