Metadata-Version: 2.3
Name: uhi
Version: 0.5.0
Summary: Unified Histogram Interface: tools to help library authors work with histograms
Project-URL: Homepage, https://github.com/Scikit-HEP/uhi
Project-URL: Repository, https://github.com/Scikit-HEP/uhi
Project-URL: Documentation, https://uhi.readthedocs.io/en/latest/
Project-URL: Changelog, https://github.com/scikit-hep/uhi/releases
Author-email: Henry Schreiner <henryschreineriii@gmail.com>, Hans Dembinski <hans.dembinski@gmail.com>, Jim Pivaski <pivarski@princeton.edu>
Maintainer-email: The Scikit-HEP admins <scikit-hep-admins@googlegroups.com>
License: BSD 3-Clause License
        
        Copyright (c) 2021, Henry Schreiner.
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of the vector package developers nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: numpy>=1.13.3
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: sphinx-copybutton>=0.3.1; extra == 'docs'
Requires-Dist: sphinx-github-changelog; extra == 'docs'
Requires-Dist: sphinx-jsonschema; extra == 'docs'
Requires-Dist: sphinx>=4.0; extra == 'docs'
Provides-Extra: schema
Requires-Dist: fastjsonschema; extra == 'schema'
Requires-Dist: importlib-resources; (python_version < '3.9') and extra == 'schema'
Provides-Extra: test
Requires-Dist: boost-histogram>=1.0; extra == 'test'
Requires-Dist: pytest>=6; extra == 'test'
Description-Content-Type: text/markdown

# UHI: Universal Histogram Interface

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]
[![pre-commit.ci Status][pre-commit-badge]][pre-commit-link]
[![Code style: black][black-badge]][black-link]

[![PyPI version][pypi-version]][pypi-link]
[![Conda-forge version][conda-badge]][conda-link]
[![PyPI platforms][pypi-platforms]][pypi-link]

[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
[![Gitter][gitter-badge]][gitter-link]
[![Zenodo][zenodo-badge]][zenodo-link]
[![Scikit-HEP][sk-badge]](https://scikit-hep.org/)


This is a package meant primarily for [documenting][rtd-link] histogram
indexing and the PlottableHistogram Protocol and any future cross-library
standards. It also contains the code for the PlottableHistogram Protocol, to be
used in type checking libraries wanting to conform to the protocol. Eventually,
it might gain a set of tools for testing conformance to UHI indexing, as well.
It is not usually a runtime dependency, but only a type checking, testing,
and/or docs dependency in support of other libraries (such as
[boost-histogram][] 0.13+, [hist][] 2.1+, [mplhep][] 0.2.15+, [uproot][] 4+,
and [histoprint][] 2+).  There are a few useful runtime usable components
(listed below). Older versions are available for Python 3.6+. [See what's
new](https://github.com/scikit-hep/uhi/releases).

To assist plotting libraries in accepting Histograms from classic sources, see
`uhi.numpy_plottable.ensure_plottable_histogram`, which will adapt NumPy style
tuples into a simple PlottableHistogram.

The Protocols provided do support runtime checking, so
`isinstance(h, uhi.typing.plotting.PlottableHistogram)` is valid at runtime and
might be simpler than manually checking for the expected methods.

[actions-badge]:            https://github.com/Scikit-HEP/uhi/workflows/CI/badge.svg
[actions-link]:             https://github.com/Scikit-HEP/uhi/actions
[black-badge]:              https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]:               https://github.com/psf/black
[conda-badge]:              https://img.shields.io/conda/vn/conda-forge/uhi
[conda-link]:               https://github.com/conda-forge/uhi-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
[github-discussions-link]:  https://github.com/Scikit-HEP/uhi/discussions
[gitter-badge]:             https://badges.gitter.im/https://github.com/Scikit-HEP/uhi/community.svg
[gitter-link]:              https://gitter.im/https://github.com/Scikit-HEP/uhi/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
[zenodo-badge]:             https://zenodo.org/badge/DOI/10.5281/zenodo.10014713.svg
[zenodo-link]:              https://doi.org/10.5281/zenodo.10014713
[pre-commit-badge]:         https://results.pre-commit.ci/badge/github/scikit-hep/uhi/main.svg
[pre-commit-link]:          https://results.pre-commit.ci/repo/github/309772485
[pypi-link]:                https://pypi.org/project/uhi/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/uhi
[pypi-version]:             https://badge.fury.io/py/uhi.svg
[rtd-badge]:                https://readthedocs.org/projects/uhi/badge/?version=latest
[rtd-link]:                 https://uhi.readthedocs.io/en/latest/?badge=latest
[sk-badge]:                 https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg

[boost-histogram]:          https://github.com/scikit-hep/boost-histogram
[hist]:                     https://github.com/scikit-hep/hist
[mplhep]:                   https://github.com/scikit-hep/mplhep
[uproot]:                   https://github.com/scikit-hep/uproot4
[histoprint]:               https://github.com/scikit-hep/histoprint
