plothist 1.7.0__tar.gz → 1.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 (171) hide show
  1. {plothist-1.7.0 → plothist-1.9.0}/.github/ISSUE_TEMPLATE/user-story.md +5 -5
  2. {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/cd.yaml +5 -7
  3. {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/ci.yaml +10 -7
  4. {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/coverage.yaml +2 -4
  5. {plothist-1.7.0 → plothist-1.9.0}/.pre-commit-config.yaml +16 -6
  6. plothist-1.9.0/AUTHORS.md +2 -0
  7. {plothist-1.7.0 → plothist-1.9.0}/CITATION.cff +8 -8
  8. {plothist-1.7.0 → plothist-1.9.0}/LICENSE +1 -1
  9. {plothist-1.7.0 → plothist-1.9.0}/PKG-INFO +29 -22
  10. {plothist-1.7.0 → plothist-1.9.0}/README.rst +17 -15
  11. {plothist-1.7.0 → plothist-1.9.0}/docs/CONTRIBUTING.rst +3 -3
  12. {plothist-1.7.0 → plothist-1.9.0}/docs/conf.py +1 -1
  13. {plothist-1.7.0 → plothist-1.9.0}/docs/usage/installation.rst +1 -1
  14. {plothist-1.7.0 → plothist-1.9.0}/noxfile.py +21 -10
  15. {plothist-1.7.0 → plothist-1.9.0}/pyproject.toml +37 -10
  16. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/_version.py +2 -2
  17. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/comparison.py +1 -1
  18. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/1d_side_by_side_with_numbers.py +1 -1
  19. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/asymmetry_comparison_advanced.py +3 -2
  20. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/color_palette_squares.py +8 -3
  21. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/histogramming.py +1 -2
  22. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/plothist_style.py +24 -13
  23. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/plotters.py +32 -29
  24. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/variable_registry.py +25 -15
  25. {plothist-1.7.0 → plothist-1.9.0}/tests/test_variable_registry.py +37 -0
  26. plothist-1.9.0/uv.lock +1599 -0
  27. plothist-1.7.0/AUTHORS.md +0 -2
  28. plothist-1.7.0/uv.lock +0 -1988
  29. {plothist-1.7.0 → plothist-1.9.0}/.github/dependabot.yaml +0 -0
  30. {plothist-1.7.0 → plothist-1.9.0}/.github/release.yaml +0 -0
  31. {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/pr.yaml +0 -0
  32. {plothist-1.7.0 → plothist-1.9.0}/.gitignore +0 -0
  33. {plothist-1.7.0 → plothist-1.9.0}/.readthedocs.yaml +0 -0
  34. {plothist-1.7.0 → plothist-1.9.0}/CONTRIBUTING.md +0 -0
  35. {plothist-1.7.0 → plothist-1.9.0}/codecov.yml +0 -0
  36. {plothist-1.7.0 → plothist-1.9.0}/docs/advanced/model_examples.rst +0 -0
  37. {plothist-1.7.0 → plothist-1.9.0}/docs/advanced/other_advanced.rst +0 -0
  38. {plothist-1.7.0 → plothist-1.9.0}/docs/basics/1d_func.rst +0 -0
  39. {plothist-1.7.0 → plothist-1.9.0}/docs/basics/1d_hist.rst +0 -0
  40. {plothist-1.7.0 → plothist-1.9.0}/docs/basics/2d_hist.rst +0 -0
  41. {plothist-1.7.0 → plothist-1.9.0}/docs/basics/variable_registry.rst +0 -0
  42. {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/documentation.rst +0 -0
  43. {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/statistics.rst +0 -0
  44. {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/troubleshooting.rst +0 -0
  45. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_advanced.png +0 -0
  46. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_advanced.svg +0 -0
  47. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_asymmetry.png +0 -0
  48. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_difference.png +0 -0
  49. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_efficiency.png +0 -0
  50. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_only_efficiency.png +0 -0
  51. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_pull.png +0 -0
  52. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_ratio.png +0 -0
  53. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_relative_difference.png +0 -0
  54. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_split_ratio.png +0 -0
  55. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt1.png +0 -0
  56. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt1_stacked.png +0 -0
  57. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt2.png +0 -0
  58. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_hist_simple.png +0 -0
  59. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_int_category.png +0 -0
  60. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_profile.png +0 -0
  61. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_side_by_side.png +0 -0
  62. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_side_by_side_with_numbers.png +0 -0
  63. {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_str_category.png +0 -0
  64. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_0.png +0 -0
  65. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_1.png +0 -0
  66. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_2.png +0 -0
  67. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_simple.png +0 -0
  68. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_simple_discrete_colormap.png +0 -0
  69. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_uneven.png +0 -0
  70. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_with_projections.png +0 -0
  71. {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_with_projections.svg +0 -0
  72. {plothist-1.7.0 → plothist-1.9.0}/docs/img/add_text_example.png +0 -0
  73. {plothist-1.7.0 → plothist-1.9.0}/docs/img/asymmetry_comparison_advanced.png +0 -0
  74. {plothist-1.7.0 → plothist-1.9.0}/docs/img/color_palette_hists.png +0 -0
  75. {plothist-1.7.0 → plothist-1.9.0}/docs/img/fct_1d.png +0 -0
  76. {plothist-1.7.0 → plothist-1.9.0}/docs/img/fct_1d_stacked.png +0 -0
  77. {plothist-1.7.0 → plothist-1.9.0}/docs/img/matplotlib_example.png +0 -0
  78. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_all_comparisons.png +0 -0
  79. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_all_comparisons_no_model_unc.png +0 -0
  80. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_flatten2D.png +0 -0
  81. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_pull.png +0 -0
  82. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_pull_no_model_unc.png +0 -0
  83. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked.png +0 -0
  84. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked.svg +0 -0
  85. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked_unstacked.png +0 -0
  86. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_unstacked.png +0 -0
  87. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_with_stacked_and_unstacked_function_components.png +0 -0
  88. {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_with_stacked_and_unstacked_histograms_components.png +0 -0
  89. {plothist-1.7.0 → plothist-1.9.0}/docs/img/plothist_example.png +0 -0
  90. {plothist-1.7.0 → plothist-1.9.0}/docs/img/pyhf_example.svg +0 -0
  91. {plothist-1.7.0 → plothist-1.9.0}/docs/img/ratio_data_vs_model_with_stacked_and_unstacked_function_components.png +0 -0
  92. {plothist-1.7.0 → plothist-1.9.0}/docs/img/savefig_comparisons.gif +0 -0
  93. {plothist-1.7.0 → plothist-1.9.0}/docs/img/uncertainty_types.png +0 -0
  94. {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_YlGnBu_r_palette.png +0 -0
  95. {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_coolwarm_palette.png +0 -0
  96. {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_cubehelix.png +0 -0
  97. {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_style_cycle.png +0 -0
  98. {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_viridis_palette.png +0 -0
  99. {plothist-1.7.0 → plothist-1.9.0}/docs/index.rst +0 -0
  100. {plothist-1.7.0 → plothist-1.9.0}/docs/usage/plot_fitting_results.rst +0 -0
  101. {plothist-1.7.0 → plothist-1.9.0}/docs/usage/style.rst +0 -0
  102. {plothist-1.7.0 → plothist-1.9.0}/docs/usage/utilities.rst +0 -0
  103. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/__init__.py +0 -0
  104. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/_version.pyi +0 -0
  105. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/default_style.mplstyle +0 -0
  106. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_asymmetry.py +0 -0
  107. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_difference.py +0 -0
  108. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_efficiency.py +0 -0
  109. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_only_efficiency.py +0 -0
  110. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_pull.py +0 -0
  111. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_ratio.py +0 -0
  112. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_relative_difference.py +0 -0
  113. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_split_ratio.py +0 -0
  114. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt1.py +0 -0
  115. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt1_stacked.py +0 -0
  116. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt2.py +0 -0
  117. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_hist_simple.py +0 -0
  118. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_int_category.py +0 -0
  119. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_profile.py +0 -0
  120. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_side_by_side.py +0 -0
  121. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_str_category.py +0 -0
  122. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/README.rst +0 -0
  123. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_correlations.py +0 -0
  124. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_simple.py +0 -0
  125. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_simple_discrete_colormap.py +0 -0
  126. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_uneven.py +0 -0
  127. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_with_projections.py +0 -0
  128. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/README.rst +0 -0
  129. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/README.rst +0 -0
  130. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/1d_comparison_advanced.py +0 -0
  131. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/README.rst +0 -0
  132. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/model_examples_flatten2D.py +0 -0
  133. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/README.rst +0 -0
  134. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/fct_1d.py +0 -0
  135. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/fct_1d_stacked.py +0 -0
  136. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/README.rst +0 -0
  137. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_all_comparisons.py +0 -0
  138. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_all_comparisons_no_model_unc.py +0 -0
  139. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_pull.py +0 -0
  140. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_pull_no_model_unc.py +0 -0
  141. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_stacked.py +0 -0
  142. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_stacked_unstacked.py +0 -0
  143. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_unstacked.py +0 -0
  144. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_function_components.py +0 -0
  145. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_histograms_components.py +0 -0
  146. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/ratio_data_vs_model_with_stacked_and_unstacked_function_components.py +0 -0
  147. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/README.rst +0 -0
  148. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/add_text_example.py +0 -0
  149. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/color_palette_hists.py +0 -0
  150. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/matplotlib_vs_plothist_style.py +0 -0
  151. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/uncertainty_types.py +0 -0
  152. {plothist-1.7.0 → plothist-1.9.0}/src/plothist/test_helpers.py +0 -0
  153. {plothist-1.7.0 → plothist-1.9.0}/tests/test_boost_histogram_version.py +0 -0
  154. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison.py +0 -0
  155. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_asymmetry.py +0 -0
  156. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_difference.py +0 -0
  157. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_efficiency.py +0 -0
  158. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_pull.py +0 -0
  159. {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_ratio.py +0 -0
  160. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_1d_hist.py +0 -0
  161. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_2d_hist.py +0 -0
  162. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_advanced.py +0 -0
  163. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_data_model.py +0 -0
  164. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_func_1d.py +0 -0
  165. {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_utility.py +0 -0
  166. {plothist-1.7.0 → plothist-1.9.0}/tests/test_fonts.py +0 -0
  167. {plothist-1.7.0 → plothist-1.9.0}/tests/test_get_data.py +0 -0
  168. {plothist-1.7.0 → plothist-1.9.0}/tests/test_histogramming.py +0 -0
  169. {plothist-1.7.0 → plothist-1.9.0}/tests/test_plothist_style.py +0 -0
  170. {plothist-1.7.0 → plothist-1.9.0}/tests/test_plotters.py +0 -0
  171. {plothist-1.7.0 → plothist-1.9.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@v5
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@v5
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@v5
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@v5
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@v5
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
@@ -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.13.3
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.34.0
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.18.2
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.34.0
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.10.03
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,15 +4,15 @@ 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
- repository-code: "https://github.com/cyrraz/plothist/"
15
+ repository-code: "https://github.com/8-hat/plothist/"
16
16
  url: " plothist.readthedocs.io/"
17
17
  keywords:
18
18
  - python
@@ -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,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plothist
3
- Version: 1.7.0
3
+ Version: 1.9.0
4
4
  Summary: Plot histograms in a scalable way and a beautiful style.
5
- Project-URL: Homepage, https://github.com/cyrraz/plothist
5
+ Project-URL: Homepage, https://github.com/8-hat/plothist
6
6
  Project-URL: Documentation, https://plothist.readthedocs.io/
7
- Project-URL: Bug Tracker, https://github.com/cyrraz/plothist/issues
7
+ Project-URL: Bug Tracker, https://github.com/8-hat/plothist/issues
8
8
  Author-email: Cyrille Praz <cyrraz.code@protonmail.com>, Tristan Fillinger <tristan.github@gmail.com>
9
9
  License-File: AUTHORS.md
10
10
  License-File: LICENSE
@@ -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
 
@@ -37,18 +42,18 @@ plothist
37
42
 
38
43
  |img1| |img2|
39
44
 
40
- .. |img1| image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/1d_comparison_advanced.svg
45
+ .. |img1| image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/1d_comparison_advanced.svg
41
46
  :alt: Example
42
47
  :width: 320
43
48
 
44
- .. |img2| image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/model_examples_stacked.svg
49
+ .. |img2| image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/model_examples_stacked.svg
45
50
  :alt: Example
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
 
@@ -64,7 +69,7 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
64
69
 
65
70
 
66
71
 
67
- .. image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/2d_hist_with_projections.svg
72
+ .. image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/2d_hist_with_projections.svg
68
73
  :alt: 2D histogram with projections
69
74
  :width: 500
70
75
  :align: center
@@ -72,22 +77,24 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
72
77
 
73
78
 
74
79
  .. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
75
- :target: https://github.com/cyrraz/plothist
80
+ :target: https://github.com/8-hat/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
81
- :target: https://github.com/cyrraz/plothist/discussions
88
+ :target: https://github.com/8-hat/plothist/discussions
82
89
  .. |DOI| image:: https://zenodo.org/badge/647069945.svg?style=flat-square
83
90
  :target: https://zenodo.org/doi/10.5281/zenodo.10995667
84
91
  .. |Linter| image:: https://img.shields.io/badge/Linter-Ruff-brightgreen?style=platic
85
92
  :target: https://github.com/charliermarsh/ruff
86
- .. |GitHub Actions Status: CI| image:: https://github.com/cyrraz/plothist/actions/workflows/ci.yaml/badge.svg?style=flat-square
87
- :target: https://github.com/cyrraz/plothist/actions/workflows/ci.yaml?query=branch%3Amain
88
- .. |GitHub Actions Status: CD| image:: https://github.com/cyrraz/plothist/actions/workflows/cd.yaml/badge.svg?style=flat-square
89
- :target: https://github.com/cyrraz/plothist/actions/workflows/cd.yaml?query=branch%3Amain
90
- .. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/cyrraz/plothist/main.svg?style=flat-square
91
- :target: https://results.pre-commit.ci/latest/github/cyrraz/plothist/main
92
- .. |Code Coverage| image:: https://codecov.io/gh/cyrraz/plothist/branch/main/graph/badge.svg?style=flat-square
93
- :target: https://codecov.io/gh/cyrraz/plothist
93
+ .. |GitHub Actions Status: CI| image:: https://github.com/8-hat/plothist/actions/workflows/ci.yaml/badge.svg?style=flat-square
94
+ :target: https://github.com/8-hat/plothist/actions/workflows/ci.yaml?query=branch%3Amain
95
+ .. |GitHub Actions Status: CD| image:: https://github.com/8-hat/plothist/actions/workflows/cd.yaml/badge.svg?style=flat-square
96
+ :target: https://github.com/8-hat/plothist/actions/workflows/cd.yaml?query=branch%3Amain
97
+ .. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/8-hat/plothist/main.svg?style=flat-square
98
+ :target: https://results.pre-commit.ci/latest/github/8-hat/plothist/main
99
+ .. |Code Coverage| image:: https://codecov.io/gh/8-hat/plothist/branch/main/graph/badge.svg?style=flat-square
100
+ :target: https://codecov.io/gh/8-hat/plothist
@@ -10,18 +10,18 @@ plothist
10
10
 
11
11
  |img1| |img2|
12
12
 
13
- .. |img1| image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/1d_comparison_advanced.svg
13
+ .. |img1| image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/1d_comparison_advanced.svg
14
14
  :alt: Example
15
15
  :width: 320
16
16
 
17
- .. |img2| image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/model_examples_stacked.svg
17
+ .. |img2| image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/model_examples_stacked.svg
18
18
  :alt: Example
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
 
@@ -37,7 +37,7 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
37
37
 
38
38
 
39
39
 
40
- .. image:: https://raw.githubusercontent.com/cyrraz/plothist/main/docs/img/2d_hist_with_projections.svg
40
+ .. image:: https://raw.githubusercontent.com/8-hat/plothist/main/docs/img/2d_hist_with_projections.svg
41
41
  :alt: 2D histogram with projections
42
42
  :width: 500
43
43
  :align: center
@@ -45,22 +45,24 @@ This package is a wrapper around `matplotlib <https://matplotlib.org/>`_.
45
45
 
46
46
 
47
47
  .. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
48
- :target: https://github.com/cyrraz/plothist
48
+ :target: https://github.com/8-hat/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
54
- :target: https://github.com/cyrraz/plothist/discussions
56
+ :target: https://github.com/8-hat/plothist/discussions
55
57
  .. |DOI| image:: https://zenodo.org/badge/647069945.svg?style=flat-square
56
58
  :target: https://zenodo.org/doi/10.5281/zenodo.10995667
57
59
  .. |Linter| image:: https://img.shields.io/badge/Linter-Ruff-brightgreen?style=platic
58
60
  :target: https://github.com/charliermarsh/ruff
59
- .. |GitHub Actions Status: CI| image:: https://github.com/cyrraz/plothist/actions/workflows/ci.yaml/badge.svg?style=flat-square
60
- :target: https://github.com/cyrraz/plothist/actions/workflows/ci.yaml?query=branch%3Amain
61
- .. |GitHub Actions Status: CD| image:: https://github.com/cyrraz/plothist/actions/workflows/cd.yaml/badge.svg?style=flat-square
62
- :target: https://github.com/cyrraz/plothist/actions/workflows/cd.yaml?query=branch%3Amain
63
- .. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/cyrraz/plothist/main.svg?style=flat-square
64
- :target: https://results.pre-commit.ci/latest/github/cyrraz/plothist/main
65
- .. |Code Coverage| image:: https://codecov.io/gh/cyrraz/plothist/branch/main/graph/badge.svg?style=flat-square
66
- :target: https://codecov.io/gh/cyrraz/plothist
61
+ .. |GitHub Actions Status: CI| image:: https://github.com/8-hat/plothist/actions/workflows/ci.yaml/badge.svg?style=flat-square
62
+ :target: https://github.com/8-hat/plothist/actions/workflows/ci.yaml?query=branch%3Amain
63
+ .. |GitHub Actions Status: CD| image:: https://github.com/8-hat/plothist/actions/workflows/cd.yaml/badge.svg?style=flat-square
64
+ :target: https://github.com/8-hat/plothist/actions/workflows/cd.yaml?query=branch%3Amain
65
+ .. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/8-hat/plothist/main.svg?style=flat-square
66
+ :target: https://results.pre-commit.ci/latest/github/8-hat/plothist/main
67
+ .. |Code Coverage| image:: https://codecov.io/gh/8-hat/plothist/branch/main/graph/badge.svg?style=flat-square
68
+ :target: https://codecov.io/gh/8-hat/plothist
@@ -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
@@ -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
 
@@ -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,25 +16,30 @@ 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"]
33
38
 
34
39
  [project.urls]
35
- Homepage = "https://github.com/cyrraz/plothist"
40
+ Homepage = "https://github.com/8-hat/plothist"
36
41
  Documentation = "https://plothist.readthedocs.io/"
37
- "Bug Tracker" = "https://github.com/cyrraz/plothist/issues"
42
+ "Bug Tracker" = "https://github.com/8-hat/plothist/issues"
38
43
 
39
44
  [tool.codespell]
40
45
  skip = '*.pdf,./test/*,*.svg,./docs/html/*'
@@ -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"
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.7.0'
32
- __version_tuple__ = version_tuple = (1, 7, 0)
31
+ __version__ = version = '1.9.0'
32
+ __version_tuple__ = version_tuple = (1, 9, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -49,7 +49,7 @@ def _is_unweighted(hist: bh.Histogram) -> bool:
49
49
  bool
50
50
  True if the histogram is unweighted, False otherwise.
51
51
  """
52
- return np.allclose(hist.variances(), hist.values(), equal_nan=True)
52
+ return bool(np.allclose(hist.variances(), hist.values(), equal_nan=True))
53
53
 
54
54
 
55
55
  def get_asymmetrical_uncertainties(
@@ -42,7 +42,7 @@ plot_hist(histos, ax=ax, label=labels, color=colors)
42
42
 
43
43
  # Add the number of entries on top of each bar
44
44
  # Get the correct shift in x-axis for each bar
45
- def calculate_shifts(width, n_bars):
45
+ def calculate_shifts(width: float, n_bars: int) -> np.ndarray:
46
46
  half_width = width / 2
47
47
  shift = np.linspace(-half_width, half_width, n_bars, endpoint=False)
48
48
  shift += width / (2 * n_bars)
@@ -11,6 +11,7 @@ from plothist_utils import get_dummy_data
11
11
  df = get_dummy_data()
12
12
 
13
13
  ###
14
+ import numpy as np
14
15
  from scipy.stats import norm
15
16
 
16
17
  from plothist import (
@@ -25,11 +26,11 @@ from plothist import (
25
26
 
26
27
 
27
28
  # Define some random functions that will be used as Data fit functions
28
- def f1(x):
29
+ def f1(x: np.ndarray) -> np.ndarray:
29
30
  return 4000 * norm.pdf(x, loc=-0.5, scale=1.6)
30
31
 
31
32
 
32
- def f2(x):
33
+ def f2(x: np.ndarray) -> np.ndarray:
33
34
  return 4000 * norm.pdf(x, loc=0.5, scale=1.6)
34
35
 
35
36