plothist 1.3.0__tar.gz → 1.3.2__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 (155) hide show
  1. plothist-1.3.2/.github/dependabot.yaml +11 -0
  2. plothist-1.3.2/.github/release.yaml +5 -0
  3. plothist-1.3.2/.github/workflows/cd.yaml +79 -0
  4. plothist-1.3.2/.github/workflows/ci.yaml +36 -0
  5. plothist-1.3.2/.github/workflows/pr.yaml +21 -0
  6. {plothist-1.3.0 → plothist-1.3.2}/.pre-commit-config.yaml +7 -4
  7. {plothist-1.3.0 → plothist-1.3.2}/PKG-INFO +15 -11
  8. plothist-1.3.2/docs/CONTRIBUTING.rst +47 -0
  9. {plothist-1.3.0 → plothist-1.3.2}/docs/conf.py +2 -2
  10. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/advanced/1d_comparison_advanced.py +6 -6
  11. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_all_comparisons.py +3 -3
  12. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_all_comparisons_no_model_unc.py +3 -3
  13. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_advanced.svg +546 -546
  14. {plothist-1.3.0 → plothist-1.3.2}/docs/index.rst +1 -0
  15. {plothist-1.3.0 → plothist-1.3.2}/docs/usage/installation.rst +37 -21
  16. plothist-1.3.2/noxfile.py +24 -0
  17. {plothist-1.3.0 → plothist-1.3.2}/pyproject.toml +15 -7
  18. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/__init__.py +3 -9
  19. plothist-1.3.2/src/plothist/get_dummy_data.py +17 -0
  20. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/plothist_style.py +15 -12
  21. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/scripts/make_examples.py +6 -4
  22. plothist-1.3.2/uv.lock +1328 -0
  23. plothist-1.3.0/.github/workflows/python-package.yml +0 -37
  24. plothist-1.3.0/src/plothist/get_dummy_data.py +0 -17
  25. {plothist-1.3.0 → plothist-1.3.2}/.github/ISSUE_TEMPLATE/user-story.md +0 -0
  26. {plothist-1.3.0 → plothist-1.3.2}/.gitignore +0 -0
  27. {plothist-1.3.0 → plothist-1.3.2}/.readthedocs.yaml +0 -0
  28. {plothist-1.3.0 → plothist-1.3.2}/AUTHORS.md +0 -0
  29. {plothist-1.3.0 → plothist-1.3.2}/CITATION.cff +0 -0
  30. {plothist-1.3.0 → plothist-1.3.2}/LICENSE +0 -0
  31. {plothist-1.3.0 → plothist-1.3.2}/README.rst +0 -0
  32. {plothist-1.3.0 → plothist-1.3.2}/docs/advanced/model_examples.rst +0 -0
  33. {plothist-1.3.0 → plothist-1.3.2}/docs/advanced/other_advanced.rst +0 -0
  34. {plothist-1.3.0 → plothist-1.3.2}/docs/basics/1d_func.rst +0 -0
  35. {plothist-1.3.0 → plothist-1.3.2}/docs/basics/1d_hist.rst +0 -0
  36. {plothist-1.3.0 → plothist-1.3.2}/docs/basics/2d_hist.rst +0 -0
  37. {plothist-1.3.0 → plothist-1.3.2}/docs/basics/variable_registry.rst +0 -0
  38. {plothist-1.3.0 → plothist-1.3.2}/docs/documentation/documentation.rst +0 -0
  39. {plothist-1.3.0 → plothist-1.3.2}/docs/documentation/statistics.rst +0 -0
  40. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_func/1d_fct.py +0 -0
  41. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_func/1d_fct_stacked.py +0 -0
  42. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_func/README.rst +0 -0
  43. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_asymmetry.py +0 -0
  44. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_difference.py +0 -0
  45. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_efficiency.py +0 -0
  46. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_only_efficiency.py +0 -0
  47. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_pull.py +0 -0
  48. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_ratio.py +0 -0
  49. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_relative_difference.py +0 -0
  50. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_comparison_split_ratio.py +0 -0
  51. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_elt1.py +0 -0
  52. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_elt1_stacked.py +0 -0
  53. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_elt2.py +0 -0
  54. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_hist_simple.py +0 -0
  55. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_int_category.py +0 -0
  56. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_profile.py +0 -0
  57. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_side_by_side.py +0 -0
  58. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/1d_str_category.py +0 -0
  59. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/1d_hist/README.rst +0 -0
  60. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/2d_hist_correlations.py +0 -0
  61. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/2d_hist_simple.py +0 -0
  62. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/2d_hist_simple_discrete_colormap.py +0 -0
  63. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/2d_hist_uneven.py +0 -0
  64. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/2d_hist_with_projections.py +0 -0
  65. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/2d_hist/README.rst +0 -0
  66. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/README.rst +0 -0
  67. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/advanced/1d_side_by_side_with_numbers.py +0 -0
  68. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/advanced/README.rst +0 -0
  69. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/advanced/asymmetry_comparison_advanced.py +0 -0
  70. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/advanced/model_examples_flatten2D.py +0 -0
  71. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/README.rst +0 -0
  72. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_examples_pull.py +0 -0
  73. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_examples_pull_no_model_unc.py +0 -0
  74. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_examples_stacked.py +0 -0
  75. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_examples_stacked_unstacked.py +0 -0
  76. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_examples_unstacked.py +0 -0
  77. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_with_stacked_and_unstacked_function_components.py +0 -0
  78. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/model_with_stacked_and_unstacked_histograms_components.py +0 -0
  79. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/model_ex/ratio_data_vs_model_with_stacked_and_unstacked_function_components.py +0 -0
  80. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/utility/README.rst +0 -0
  81. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/utility/add_text_example.py +0 -0
  82. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/utility/color_palette_hists.py +0 -0
  83. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/utility/color_palette_squares.py +0 -0
  84. {plothist-1.3.0 → plothist-1.3.2}/docs/examples/utility/matplotlib_vs_plothist_style.py +0 -0
  85. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_asymmetry.svg +0 -0
  86. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_difference.svg +0 -0
  87. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_efficiency.svg +0 -0
  88. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_only_efficiency.svg +0 -0
  89. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_pull.svg +0 -0
  90. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_ratio.svg +0 -0
  91. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_relative_difference.svg +0 -0
  92. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_comparison_split_ratio.svg +0 -0
  93. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_elt1.svg +0 -0
  94. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_elt1_stacked.svg +0 -0
  95. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_elt2.svg +0 -0
  96. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_fct.svg +0 -0
  97. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_fct_stacked.svg +0 -0
  98. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_hist_simple.svg +0 -0
  99. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_int_category.svg +0 -0
  100. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_profile.svg +0 -0
  101. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_side_by_side.svg +0 -0
  102. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_side_by_side_with_numbers.svg +0 -0
  103. {plothist-1.3.0 → plothist-1.3.2}/docs/img/1d_str_category.svg +0 -0
  104. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_correlations_0.svg +0 -0
  105. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_correlations_1.svg +0 -0
  106. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_correlations_2.svg +0 -0
  107. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_simple.svg +0 -0
  108. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_simple_discrete_colormap.svg +0 -0
  109. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_uneven.svg +0 -0
  110. {plothist-1.3.0 → plothist-1.3.2}/docs/img/2d_hist_with_projections.svg +0 -0
  111. {plothist-1.3.0 → plothist-1.3.2}/docs/img/add_text_example.svg +0 -0
  112. {plothist-1.3.0 → plothist-1.3.2}/docs/img/asymmetry_comparison_advanced.svg +0 -0
  113. {plothist-1.3.0 → plothist-1.3.2}/docs/img/matplotlib_example.svg +0 -0
  114. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_all_comparisons.svg +0 -0
  115. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_all_comparisons_no_model_unc.svg +0 -0
  116. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_flatten2D.svg +0 -0
  117. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_pull.svg +0 -0
  118. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_pull_no_model_unc.svg +0 -0
  119. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_stacked.svg +0 -0
  120. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_stacked_unstacked.svg +0 -0
  121. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_examples_unstacked.svg +0 -0
  122. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_with_stacked_and_unstacked_function_components.svg +0 -0
  123. {plothist-1.3.0 → plothist-1.3.2}/docs/img/model_with_stacked_and_unstacked_histograms_components.svg +0 -0
  124. {plothist-1.3.0 → plothist-1.3.2}/docs/img/plothist_example.svg +0 -0
  125. {plothist-1.3.0 → plothist-1.3.2}/docs/img/pyhf_example.svg +0 -0
  126. {plothist-1.3.0 → plothist-1.3.2}/docs/img/ratio_data_vs_model_with_stacked_and_unstacked_function_components.svg +0 -0
  127. {plothist-1.3.0 → plothist-1.3.2}/docs/img/savefig_comparisons.gif +0 -0
  128. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_YlGnBu_r_palette.svg +0 -0
  129. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_colorpalette_examples.svg +0 -0
  130. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_coolwarm_palette.svg +0 -0
  131. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_cubehelix.svg +0 -0
  132. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_style_cycle.svg +0 -0
  133. {plothist-1.3.0 → plothist-1.3.2}/docs/img/usage_viridis_palette.svg +0 -0
  134. {plothist-1.3.0 → plothist-1.3.2}/docs/requirements.txt +0 -0
  135. {plothist-1.3.0 → plothist-1.3.2}/docs/usage/font_installation.rst +0 -0
  136. {plothist-1.3.0 → plothist-1.3.2}/docs/usage/plot_fitting_results.rst +0 -0
  137. {plothist-1.3.0 → plothist-1.3.2}/docs/usage/style.rst +0 -0
  138. {plothist-1.3.0 → plothist-1.3.2}/docs/usage/utilities.rst +0 -0
  139. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/comparison.py +0 -0
  140. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/default_style.mplstyle +0 -0
  141. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/dummy_data.csv +0 -0
  142. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/histogramming.py +0 -0
  143. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/plotters.py +0 -0
  144. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/scripts/__init__.py +0 -0
  145. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/scripts/install_latin_modern_fonts.py +0 -0
  146. {plothist-1.3.0 → plothist-1.3.2}/src/plothist/variable_registry.py +0 -0
  147. {plothist-1.3.0 → plothist-1.3.2}/tests/test_asymmetry.py +0 -0
  148. {plothist-1.3.0 → plothist-1.3.2}/tests/test_difference.py +0 -0
  149. {plothist-1.3.0 → plothist-1.3.2}/tests/test_efficiency.py +0 -0
  150. {plothist-1.3.0 → plothist-1.3.2}/tests/test_histogramming.py +0 -0
  151. {plothist-1.3.0 → plothist-1.3.2}/tests/test_install_fonts.py +0 -0
  152. {plothist-1.3.0 → plothist-1.3.2}/tests/test_make_examples.py +0 -0
  153. {plothist-1.3.0 → plothist-1.3.2}/tests/test_pull.py +0 -0
  154. {plothist-1.3.0 → plothist-1.3.2}/tests/test_ratio.py +0 -0
  155. {plothist-1.3.0 → plothist-1.3.2}/tests/test_variable_registry.py +0 -0
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot
5
+ - pre-commit-ci
@@ -0,0 +1,79 @@
1
+ name: CD
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ release:
9
+ types:
10
+ - published
11
+
12
+ jobs:
13
+ build:
14
+ name: Build distribution 📦
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ persist-credentials: false
21
+ - name: Install uv and set the python version
22
+ uses: astral-sh/setup-uv@v5
23
+ with:
24
+ version: "0.6.8"
25
+ - name: Build distribution
26
+ run: uv build
27
+ - name: Store the distribution packages
28
+ uses: actions/upload-artifact@v4
29
+ with:
30
+ name: python-package-distributions
31
+ path: dist/
32
+
33
+ publish-to-testpypi:
34
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
35
+ if: github.event_name == 'release' && github.event.action == 'published'
36
+ needs:
37
+ - build
38
+ runs-on: ubuntu-latest
39
+
40
+ environment:
41
+ name: testpypi
42
+ url: https://test.pypi.org/p/plothist
43
+
44
+ permissions:
45
+ id-token: write
46
+
47
+ steps:
48
+ - name: Download all the dists
49
+ uses: actions/download-artifact@v4
50
+ with:
51
+ name: python-package-distributions
52
+ path: dist/
53
+ - name: Publish distribution 📦 to TestPyPI
54
+ uses: pypa/gh-action-pypi-publish@release/v1
55
+ with:
56
+ repository-url: https://test.pypi.org/legacy/
57
+ skip-existing: true
58
+
59
+ publish-to-pypi:
60
+ name: Publish Python 🐍 distribution 📦 to PyPI
61
+ if: github.event_name == 'release' && github.event.action == 'published'
62
+ needs:
63
+ - build
64
+ - publish-to-testpypi
65
+ runs-on: ubuntu-latest
66
+ environment:
67
+ name: pypi
68
+ url: https://pypi.org/p/plothist
69
+ permissions:
70
+ id-token: write
71
+
72
+ steps:
73
+ - name: Download all the dists
74
+ uses: actions/download-artifact@v4
75
+ with:
76
+ name: python-package-distributions
77
+ path: dist/
78
+ - name: Publish distribution 📦 to PyPI
79
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,36 @@
1
+ # This workflow will install Python dependencies, run tests with a variety of Python versions
2
+ name: CI
3
+
4
+ on:
5
+ push:
6
+ branches: ["main"]
7
+ pull_request:
8
+ branches: ["main"]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install uv and set the python version
22
+ uses: astral-sh/setup-uv@v5
23
+ with:
24
+ version: "0.6.8"
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install the project
28
+ run: uv sync --all-extras --dev
29
+
30
+ - name: Run pre-commit
31
+ run: |
32
+ uv run pre-commit run --all-files
33
+
34
+ - name: Test with pytest
35
+ run: |
36
+ uv run python -m pytest
@@ -0,0 +1,21 @@
1
+ name: "Lint PR"
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+ - reopened
10
+
11
+ permissions:
12
+ pull-requests: read
13
+
14
+ jobs:
15
+ main:
16
+ name: Validate PR title
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: amannn/action-semantic-pull-request@v5
20
+ env:
21
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,3 +1,6 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
3
+
1
4
  repos:
2
5
  - repo: https://github.com/adamchainz/blacken-docs
3
6
  rev: "1.19.1"
@@ -5,7 +8,7 @@ repos:
5
8
  - id: blacken-docs
6
9
  args: ["--line-length", "120"]
7
10
  additional_dependencies:
8
- - black==24.2.0
11
+ - black==24.2.0
9
12
 
10
13
  - repo: https://github.com/pre-commit/pre-commit-hooks
11
14
  rev: v5.0.0
@@ -31,6 +34,6 @@ repos:
31
34
  - repo: https://github.com/codespell-project/codespell
32
35
  rev: v2.4.1
33
36
  hooks:
34
- - id: codespell
35
- additional_dependencies:
36
- - tomli
37
+ - id: codespell
38
+ additional_dependencies:
39
+ - tomli
@@ -1,27 +1,32 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: plothist
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Plot histograms in a scalable way and a beautiful style.
5
+ Project-URL: Homepage, https://github.com/cyrraz/plothist
6
+ Project-URL: Documentation, https://plothist.readthedocs.io/
7
+ Project-URL: Bug Tracker, https://github.com/cyrraz/plothist/issues
5
8
  Author-email: Cyrille Praz <cyrraz.code@protonmail.com>, Tristan Fillinger <tristan.github@gmail.com>
6
- Requires-Python: >=3.9
7
- Description-Content-Type: text/x-rst
9
+ License-File: AUTHORS.md
10
+ License-File: LICENSE
8
11
  Classifier: Intended Audience :: Developers
9
12
  Classifier: Intended Audience :: Education
10
- Classifier: Intended Audience :: Financial and Insurance Industry
11
13
  Classifier: Intended Audience :: Science/Research
12
14
  Classifier: License :: OSI Approved :: BSD License
13
15
  Classifier: Operating System :: OS Independent
14
16
  Classifier: Programming Language :: Python
15
17
  Classifier: Topic :: Scientific/Engineering
18
+ Requires-Python: >=3.9
16
19
  Requires-Dist: boost-histogram>=1.4.0
17
- Requires-Dist: numpy>=1.14.5
18
20
  Requires-Dist: matplotlib>=3.0
21
+ Requires-Dist: numpy>=1.14.5
19
22
  Requires-Dist: pyyaml>=5.3.1
20
- Requires-Dist: scipy>=1.6.0
21
23
  Requires-Dist: requests>=2.25.0
22
- Project-URL: Bug Tracker, https://github.com/cyrraz/plothist/issues
23
- Project-URL: Documentation, https://plothist.readthedocs.io/
24
- Project-URL: Homepage, https://github.com/cyrraz/plothist
24
+ Requires-Dist: scipy>=1.6.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pre-commit>=4.1.0; extra == 'dev'
27
+ Provides-Extra: test
28
+ Requires-Dist: pytest>=8.3.5; extra == 'test'
29
+ Description-Content-Type: text/x-rst
25
30
 
26
31
 
27
32
  ========
@@ -78,4 +83,3 @@ plothist
78
83
  :target: https://zenodo.org/doi/10.5281/zenodo.10995667
79
84
  .. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
80
85
  :target: https://github.com/psf/black
81
-
@@ -0,0 +1,47 @@
1
+ .. _contributing:
2
+
3
+ ============
4
+ Contributing
5
+ ============
6
+
7
+ Building from source
8
+ ====================
9
+
10
+ Follow the instructions in :ref:`install-dev-version` to install the development version of ``plothist``.
11
+
12
+ Setting up a development environment
13
+ ====================================
14
+
15
+ Nox
16
+ ---
17
+
18
+ The fastest way to start with development is to use ``nox``.
19
+
20
+ ``Nox`` is an automation tool that helps manage and run development tasks such as testing and linting.
21
+ It is especially useful for ensuring your code works across different Python versions and adheres to the project's quality standards.
22
+ ``Nox`` handles everything for you, including setting up a temporary virtual environment for each run.
23
+
24
+ To set up ``nox``:
25
+
26
+ 1. If you don't have it already, install ``pipx`` by following the instructions on their `website <https://pipx.pypa.io/stable/>`_.
27
+ 2. Install ``nox`` using ``pipx``:
28
+
29
+ .. code-block:: console
30
+
31
+ pipx install nox
32
+
33
+ To use ``nox``, simply run:
34
+
35
+ .. code-block:: console
36
+
37
+ nox
38
+
39
+ This will lint and test the project using multiple Python versions.
40
+
41
+ You can also run specific jobs:
42
+
43
+ .. code-block:: console
44
+
45
+ nox -l # List all the defined sessions
46
+ nox -s lint # Run the linter only
47
+ nox -s tests # Run the tests only
@@ -26,9 +26,9 @@ copyright = "2023-2024, Cyrille Praz, Tristan Fillinger"
26
26
  author = "Cyrille Praz, Tristan Fillinger"
27
27
 
28
28
  # The short X.Y version
29
- version = "1.3.0"
29
+ version = "1.3.2"
30
30
  # The full version, including alpha/beta/rc tags
31
- release = "1.3.0"
31
+ release = "1.3.2"
32
32
 
33
33
 
34
34
  # -- General configuration ---------------------------------------------------
@@ -29,10 +29,10 @@ x4 = df[name][df[category] == 5]
29
29
 
30
30
  x_range = [-9, 9]
31
31
 
32
- h1 = make_hist(x1, bins=50, range=x_range)
33
- h2 = make_hist(x2, bins=50, range=x_range)
34
- h3 = make_hist(x3, bins=50, range=x_range)
35
- h4 = make_hist(x4, bins=50, range=x_range)
32
+ h1 = make_hist(x3, bins=50, range=x_range)
33
+ h2 = make_hist(x4, bins=50, range=x_range)
34
+ h3 = make_hist(x1, bins=50, range=x_range)
35
+ h4 = make_hist(x2, bins=50, range=x_range)
36
36
 
37
37
  # Create the 3 axes that we need for this plot
38
38
  fig, axes = create_comparison_figure(
@@ -62,10 +62,10 @@ plot_error_hist(h4, label="Test B", ax=ax_main, color="red", density=True)
62
62
 
63
63
  # First comparison is using pulls. We also change the color of the bars to make the plot easier to read
64
64
  plot_comparison(
65
- h4, h3, ax=ax1_comparison, comparison="pull", color=colors[0], alpha=0.7
65
+ h2, h1, ax=ax1_comparison, comparison="pull", color=colors[0], alpha=0.7
66
66
  )
67
67
  # Second comparison is using the default "ratio". Same strategy as pulls
68
- plot_comparison(h2, h1, ax=ax2_comparison, color=colors[1], alpha=0.7)
68
+ plot_comparison(h4, h3, ax=ax2_comparison, color=colors[1], alpha=0.7)
69
69
 
70
70
  # Harmonize the range of each axes
71
71
  ax_main.set_xlim(x_range)
@@ -62,7 +62,7 @@ fig, axes = create_comparison_figure(
62
62
  )
63
63
  background_sum = sum(background_hists)
64
64
 
65
- fig, ax_main, ax_comparison = plot_data_model_comparison(
65
+ plot_data_model_comparison(
66
66
  data_hist=data_hist,
67
67
  stacked_components=background_hists,
68
68
  stacked_labels=background_categories_labels,
@@ -77,9 +77,9 @@ fig, ax_main, ax_comparison = plot_data_model_comparison(
77
77
 
78
78
  add_text(
79
79
  "Multiple data-model comparisons, $\mathbf{with}$ model uncertainty",
80
- ax=ax_main,
80
+ ax=axes[0],
81
81
  )
82
- add_text(f' $\mathbf{{→}}$ comparison = "ratio"', ax=ax_comparison, fontsize=13)
82
+ add_text(f' $\mathbf{{→}}$ comparison = "ratio"', ax=axes[1], fontsize=13)
83
83
 
84
84
  for k_comp, comparison in enumerate(
85
85
  ["split_ratio", "pull", "relative_difference", "difference"], start=2
@@ -63,7 +63,7 @@ fig, axes = create_comparison_figure(
63
63
  )
64
64
  background_sum = sum(background_hists)
65
65
 
66
- fig, ax_main, ax_comparison = plot_data_model_comparison(
66
+ plot_data_model_comparison(
67
67
  data_hist=data_hist,
68
68
  stacked_components=background_hists,
69
69
  stacked_labels=background_categories_labels,
@@ -79,9 +79,9 @@ fig, ax_main, ax_comparison = plot_data_model_comparison(
79
79
 
80
80
  add_text(
81
81
  "Multiple data-model comparisons, $\mathbf{without}$ model uncertainty",
82
- ax=ax_main,
82
+ ax=axes[0],
83
83
  )
84
- add_text(f' $\mathbf{{→}}$ comparison = "ratio"', ax=ax_comparison, fontsize=13)
84
+ add_text(f' $\mathbf{{→}}$ comparison = "ratio"', ax=axes[1], fontsize=13)
85
85
 
86
86
  for k_comp, comparison in enumerate(
87
87
  ["split_ratio", "pull", "relative_difference", "difference"], start=2