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.
- {plothist-1.7.0 → plothist-1.9.0}/.github/ISSUE_TEMPLATE/user-story.md +5 -5
- {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/cd.yaml +5 -7
- {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/ci.yaml +10 -7
- {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/coverage.yaml +2 -4
- {plothist-1.7.0 → plothist-1.9.0}/.pre-commit-config.yaml +16 -6
- plothist-1.9.0/AUTHORS.md +2 -0
- {plothist-1.7.0 → plothist-1.9.0}/CITATION.cff +8 -8
- {plothist-1.7.0 → plothist-1.9.0}/LICENSE +1 -1
- {plothist-1.7.0 → plothist-1.9.0}/PKG-INFO +29 -22
- {plothist-1.7.0 → plothist-1.9.0}/README.rst +17 -15
- {plothist-1.7.0 → plothist-1.9.0}/docs/CONTRIBUTING.rst +3 -3
- {plothist-1.7.0 → plothist-1.9.0}/docs/conf.py +1 -1
- {plothist-1.7.0 → plothist-1.9.0}/docs/usage/installation.rst +1 -1
- {plothist-1.7.0 → plothist-1.9.0}/noxfile.py +21 -10
- {plothist-1.7.0 → plothist-1.9.0}/pyproject.toml +37 -10
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/_version.py +2 -2
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/comparison.py +1 -1
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/1d_side_by_side_with_numbers.py +1 -1
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/asymmetry_comparison_advanced.py +3 -2
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/color_palette_squares.py +8 -3
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/histogramming.py +1 -2
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/plothist_style.py +24 -13
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/plotters.py +32 -29
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/variable_registry.py +25 -15
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_variable_registry.py +37 -0
- plothist-1.9.0/uv.lock +1599 -0
- plothist-1.7.0/AUTHORS.md +0 -2
- plothist-1.7.0/uv.lock +0 -1988
- {plothist-1.7.0 → plothist-1.9.0}/.github/dependabot.yaml +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/.github/release.yaml +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/.github/workflows/pr.yaml +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/.gitignore +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/.readthedocs.yaml +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/CONTRIBUTING.md +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/codecov.yml +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/advanced/model_examples.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/advanced/other_advanced.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/basics/1d_func.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/basics/1d_hist.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/basics/2d_hist.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/basics/variable_registry.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/documentation.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/statistics.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/documentation/troubleshooting.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_advanced.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_advanced.svg +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_asymmetry.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_difference.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_efficiency.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_only_efficiency.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_pull.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_ratio.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_relative_difference.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_comparison_split_ratio.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt1.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt1_stacked.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_elt2.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_hist_simple.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_int_category.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_profile.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_side_by_side.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_side_by_side_with_numbers.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/1d_str_category.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_0.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_1.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_correlations_2.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_simple.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_simple_discrete_colormap.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_uneven.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_with_projections.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/2d_hist_with_projections.svg +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/add_text_example.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/asymmetry_comparison_advanced.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/color_palette_hists.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/fct_1d.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/fct_1d_stacked.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/matplotlib_example.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_all_comparisons.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_all_comparisons_no_model_unc.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_flatten2D.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_pull.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_pull_no_model_unc.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked.svg +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_stacked_unstacked.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_examples_unstacked.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_with_stacked_and_unstacked_function_components.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/model_with_stacked_and_unstacked_histograms_components.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/plothist_example.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/pyhf_example.svg +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/ratio_data_vs_model_with_stacked_and_unstacked_function_components.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/savefig_comparisons.gif +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/uncertainty_types.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_YlGnBu_r_palette.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_coolwarm_palette.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_cubehelix.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_style_cycle.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/img/usage_viridis_palette.png +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/index.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/usage/plot_fitting_results.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/usage/style.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/docs/usage/utilities.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/__init__.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/_version.pyi +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/default_style.mplstyle +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_asymmetry.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_difference.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_efficiency.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_only_efficiency.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_pull.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_ratio.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_relative_difference.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_comparison_split_ratio.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt1.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt1_stacked.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_elt2.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_hist_simple.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_int_category.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_profile.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_side_by_side.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/1d_str_category.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/1d_hist/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_correlations.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_simple.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_simple_discrete_colormap.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_uneven.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/2d_hist_with_projections.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/2d_hist/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/1d_comparison_advanced.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/model_examples_flatten2D.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/fct_1d.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/func_1d/fct_1d_stacked.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_all_comparisons.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_all_comparisons_no_model_unc.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_pull.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_pull_no_model_unc.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_stacked.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_stacked_unstacked.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_examples_unstacked.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_function_components.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/model_ex/model_with_stacked_and_unstacked_histograms_components.py +0 -0
- {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
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/README.rst +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/add_text_example.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/color_palette_hists.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/matplotlib_vs_plothist_style.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/utility/uncertainty_types.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/src/plothist/test_helpers.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_boost_histogram_version.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_asymmetry.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_difference.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_efficiency.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_pull.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_comparison_ratio.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_1d_hist.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_2d_hist.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_advanced.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_data_model.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_func_1d.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_examples_utility.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_fonts.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_get_data.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_histogramming.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_plothist_style.py +0 -0
- {plothist-1.7.0 → plothist-1.9.0}/tests/test_plotters.py +0 -0
- {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
|
-
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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.
|
|
20
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
17
21
|
|
|
18
22
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@v6
|
|
20
24
|
|
|
21
25
|
- name: Install uv and set the python version
|
|
22
|
-
uses: astral-sh/setup-uv@
|
|
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
|
|
34
|
+
- name: Run prek
|
|
32
35
|
run: |
|
|
33
|
-
uv run
|
|
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@
|
|
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@
|
|
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@
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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:
|
|
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
|
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
- family-names: "Fillinger"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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/
|
|
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-
|
|
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.
|
|
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/
|
|
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/
|
|
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.
|
|
24
|
+
Requires-Python: >=3.10
|
|
19
25
|
Requires-Dist: boost-histogram>=1.4.0
|
|
20
|
-
Requires-Dist: matplotlib>=3.
|
|
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>=
|
|
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/
|
|
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/
|
|
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|
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
87
|
-
:target: https://github.com/
|
|
88
|
-
.. |GitHub Actions Status: CD| image:: https://github.com/
|
|
89
|
-
:target: https://github.com/
|
|
90
|
-
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/
|
|
91
|
-
:target: https://results.pre-commit.ci/latest/github/
|
|
92
|
-
.. |Code Coverage| image:: https://codecov.io/gh/
|
|
93
|
-
:target: https://codecov.io/gh/
|
|
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/
|
|
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/
|
|
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|
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
60
|
-
:target: https://github.com/
|
|
61
|
-
.. |GitHub Actions Status: CD| image:: https://github.com/
|
|
62
|
-
:target: https://github.com/
|
|
63
|
-
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/
|
|
64
|
-
:target: https://results.pre-commit.ci/latest/github/
|
|
65
|
-
.. |Code Coverage| image:: https://codecov.io/gh/
|
|
66
|
-
:target: https://codecov.io/gh/
|
|
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 `
|
|
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
|
|
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
|
|
79
|
+
uv run prek install
|
|
@@ -21,7 +21,7 @@ import plothist
|
|
|
21
21
|
# -- Project information -----------------------------------------------------
|
|
22
22
|
|
|
23
23
|
project = "plothist"
|
|
24
|
-
copyright = "2023-
|
|
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.
|
|
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.
|
|
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.
|
|
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("
|
|
20
|
-
session.run("
|
|
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.
|
|
28
|
+
requires-python = ">=3.10"
|
|
23
29
|
dependencies = [
|
|
24
30
|
"boost-histogram>=1.4.0",
|
|
25
31
|
"numpy>=1.14.5",
|
|
26
|
-
"matplotlib>=3.
|
|
27
|
-
"pyyaml>=
|
|
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/
|
|
40
|
+
Homepage = "https://github.com/8-hat/plothist"
|
|
36
41
|
Documentation = "https://plothist.readthedocs.io/"
|
|
37
|
-
"Bug Tracker" = "https://github.com/
|
|
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
|
-
"
|
|
51
|
+
"prek>=0.1.1",
|
|
47
52
|
]
|
|
48
53
|
test = [
|
|
49
|
-
"pytest>=
|
|
50
|
-
"pytest-cov>=
|
|
51
|
-
"pytest-mpl>=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.
|
|
32
|
-
__version_tuple__ = version_tuple = (1,
|
|
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(
|
{plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/1d_side_by_side_with_numbers.py
RENAMED
|
@@ -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)
|
{plothist-1.7.0 → plothist-1.9.0}/src/plothist/examples/advanced/asymmetry_comparison_advanced.py
RENAMED
|
@@ -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
|
|