hepdata-lib


Namehepdata-lib JSON
Version 0.17.0 PyPI version JSON
download
home_pagehttps://github.com/HEPData/hepdata_lib
SummaryLibrary for getting your data into HEPData
upload_time2024-10-10 09:52:40
maintainerNone
docs_urlNone
authorAndreas Albert, Clemens Lange
requires_python>=3.6
licenseNone
keywords hepdata physics opendata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hepdata_lib

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1217998.svg)](https://doi.org/10.5281/zenodo.1217998)
[![PyPI version](https://badge.fury.io/py/hepdata-lib.svg)](https://badge.fury.io/py/hepdata-lib)
[![conda-forge version](https://img.shields.io/conda/vn/conda-forge/hepdata-lib.svg)](https://prefix.dev/channels/conda-forge/packages/hepdata-lib)
[![Actions Status](https://github.com/HEPData/hepdata_lib/workflows/tests/badge.svg)](https://github.com/HEPData/hepdata_lib/actions)
[![Coverage Status](https://codecov.io/gh/HEPData/hepdata_lib/graph/badge.svg?branch=main)](https://codecov.io/gh/HEPData/hepdata_lib?branch=main)
[![Documentation Status](https://readthedocs.org/projects/hepdata-lib/badge/)](http://hepdata-lib.readthedocs.io/)
[![Docker image](https://github.com/HEPData/hepdata_lib/actions/workflows/docker.yml/badge.svg)](https://github.com/HEPData/hepdata_lib/pkgs/container/hepdata_lib)

Library for getting your data into HEPData

- Documentation: https://hepdata-lib.readthedocs.io

This code works with Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.

## Installation

It is highly recommended you install `hepdata_lib` into a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).

```shell
python -m pip install hepdata_lib
```

Alternatively, install from [conda-forge](https://anaconda.org/conda-forge/hepdata-lib) using a `conda` ecosystem package manager:

```console
conda install --channel conda-forge hepdata-lib
```

If you are not sure about your Python environment, please also see below how to use `hepdata_lib` in a Docker or Apptainer container.
The use of Apptainer is recommended when working on typical HEP computing clusters such as CERN LXPLUS.

## Getting started

For using `hepdata_lib`, you don't even need to install it, but can use the [binder](https://mybinder.org/) or [SWAN](https://swan.cern.ch/) (CERN-only) services using one of the buttons below:

[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/Getting_started.ipynb)
[![SWAN](https://swanserver.web.cern.ch/swanserver/images/badge_swan_white_150.png)](https://cern.ch/swanserver/cgi-bin/go/?projurl=https://github.com/HEPData/hepdata_lib.git)

You can also use the Docker image (recommended when working on local machine):

```shell
docker run --rm -it -p 8888:8888 -v ${PWD}:/home/hepdata ghcr.io/hepdata/hepdata_lib:latest
```

And then point your browser to [http://localhost:8888](http://localhost:8888) and use the token that is printed out. The output will end up in your current working directory (`${PWD}`).

If you prefer a shell, instead run:

```shell
docker run --rm -it -p 8888:8888 -v ${PWD}:/home/hepdata ghcr.io/hepdata/hepdata_lib:latest bash
```

If on CERN LXPLUS or anywhere else where there is Apptainer available but not Docker, you can still use the docker image.

If CVMFS (specifically `/cvmfs/unpacked.cern.ch/`) is available:

```shell
export APPTAINER_CACHEDIR="/tmp/$(whoami)/apptainer"
apptainer shell -B /afs -B /eos /cvmfs/unpacked.cern.ch/ghcr.io/hepdata/hepdata_lib:latest
```

If CVMFS is not available:

```shell
export APPTAINER_CACHEDIR="/tmp/$(whoami)/apptainer"
apptainer shell -B /afs -B /eos docker://ghcr.io/hepdata/hepdata_lib:latest bash
```

Unpacking the image can take a few minutes the first time you use it. Please be patient. Both EOS and AFS should be available and the output will be in your current working directory.

## Further examples

There are a few more examples available that can directly be run using the [binder](https://mybinder.org/) links below or using [SWAN](https://swan.cern.ch/) (CERN-only, please use LCG release LCG_94 or later) and selecting the corresponding notebook manually:

- [Reading in text files](https://github.com/HEPData/hepdata_lib/blob/main/examples/Getting_started.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/Getting_started.ipynb)
<br/><br/>
- [Reading in a CMS combine ntuple](https://github.com/HEPData/hepdata_lib/blob/main/examples/combine_limits.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/combine_limits.ipynb)
<br/><br/>
- [Reading in ROOT histograms](https://github.com/HEPData/hepdata_lib/blob/main/examples/reading_histograms.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/reading_histograms.ipynb)
<br/><br/>
- [Reading a correlation matrix](https://github.com/HEPData/hepdata_lib/blob/main/examples/correlation.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/correlation.ipynb)
<br/><br/>
- [Reading TGraph and TGraphError from '.C' files](https://github.com/HEPData/hepdata_lib/blob/main/examples/read_c_file.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/read_c_file.ipynb)
<br/><br/>
- [Preparing scikit-hep histograms](https://github.com/HEPData/hepdata_lib/blob/main/examples/reading_scikithep_histograms.ipynb)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/reading_scikihep_histograms.ipynb)
<br/><br/>

## External dependencies

- [ROOT](https://root.cern.ch)
- [ImageMagick](https://www.imagemagick.org)

Make sure that you have `ROOT` in your `$PYTHONPATH` and that the `convert` command is available by adding its location to your `$PATH` if needed.

A ROOT installation is not strictly required if your input data is not in a ROOT format, for example, if
your input data is provided as text files or `scikit-hep/hist` histograms.  Most of the `hepdata_lib`
functionality can be used without a ROOT installation, other than the `RootFileReader` and `CFileReader` classes,
and other functions of the `hepdata_lib.root_utils` module.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HEPData/hepdata_lib",
    "name": "hepdata-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "HEPData physics OpenData",
    "author": "Andreas Albert, Clemens Lange",
    "author_email": "hepdata-lib@cern.ch",
    "download_url": "https://files.pythonhosted.org/packages/c2/d6/ace70a5f6963f2a588bc4ac15b6fc2ad27b133ae30ccfb75369e6b9b81d4/hepdata_lib-0.17.0.tar.gz",
    "platform": null,
    "description": "# hepdata_lib\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1217998.svg)](https://doi.org/10.5281/zenodo.1217998)\n[![PyPI version](https://badge.fury.io/py/hepdata-lib.svg)](https://badge.fury.io/py/hepdata-lib)\n[![conda-forge version](https://img.shields.io/conda/vn/conda-forge/hepdata-lib.svg)](https://prefix.dev/channels/conda-forge/packages/hepdata-lib)\n[![Actions Status](https://github.com/HEPData/hepdata_lib/workflows/tests/badge.svg)](https://github.com/HEPData/hepdata_lib/actions)\n[![Coverage Status](https://codecov.io/gh/HEPData/hepdata_lib/graph/badge.svg?branch=main)](https://codecov.io/gh/HEPData/hepdata_lib?branch=main)\n[![Documentation Status](https://readthedocs.org/projects/hepdata-lib/badge/)](http://hepdata-lib.readthedocs.io/)\n[![Docker image](https://github.com/HEPData/hepdata_lib/actions/workflows/docker.yml/badge.svg)](https://github.com/HEPData/hepdata_lib/pkgs/container/hepdata_lib)\n\nLibrary for getting your data into HEPData\n\n- Documentation: https://hepdata-lib.readthedocs.io\n\nThis code works with Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.\n\n## Installation\n\nIt is highly recommended you install `hepdata_lib` into a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).\n\n```shell\npython -m pip install hepdata_lib\n```\n\nAlternatively, install from [conda-forge](https://anaconda.org/conda-forge/hepdata-lib) using a `conda` ecosystem package manager:\n\n```console\nconda install --channel conda-forge hepdata-lib\n```\n\nIf you are not sure about your Python environment, please also see below how to use `hepdata_lib` in a Docker or Apptainer container.\nThe use of Apptainer is recommended when working on typical HEP computing clusters such as CERN LXPLUS.\n\n## Getting started\n\nFor using `hepdata_lib`, you don't even need to install it, but can use the [binder](https://mybinder.org/) or [SWAN](https://swan.cern.ch/) (CERN-only) services using one of the buttons below:\n\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/Getting_started.ipynb)\n[![SWAN](https://swanserver.web.cern.ch/swanserver/images/badge_swan_white_150.png)](https://cern.ch/swanserver/cgi-bin/go/?projurl=https://github.com/HEPData/hepdata_lib.git)\n\nYou can also use the Docker image (recommended when working on local machine):\n\n```shell\ndocker run --rm -it -p 8888:8888 -v ${PWD}:/home/hepdata ghcr.io/hepdata/hepdata_lib:latest\n```\n\nAnd then point your browser to [http://localhost:8888](http://localhost:8888) and use the token that is printed out. The output will end up in your current working directory (`${PWD}`).\n\nIf you prefer a shell, instead run:\n\n```shell\ndocker run --rm -it -p 8888:8888 -v ${PWD}:/home/hepdata ghcr.io/hepdata/hepdata_lib:latest bash\n```\n\nIf on CERN LXPLUS or anywhere else where there is Apptainer available but not Docker, you can still use the docker image.\n\nIf CVMFS (specifically `/cvmfs/unpacked.cern.ch/`) is available:\n\n```shell\nexport APPTAINER_CACHEDIR=\"/tmp/$(whoami)/apptainer\"\napptainer shell -B /afs -B /eos /cvmfs/unpacked.cern.ch/ghcr.io/hepdata/hepdata_lib:latest\n```\n\nIf CVMFS is not available:\n\n```shell\nexport APPTAINER_CACHEDIR=\"/tmp/$(whoami)/apptainer\"\napptainer shell -B /afs -B /eos docker://ghcr.io/hepdata/hepdata_lib:latest bash\n```\n\nUnpacking the image can take a few minutes the first time you use it. Please be patient. Both EOS and AFS should be available and the output will be in your current working directory.\n\n## Further examples\n\nThere are a few more examples available that can directly be run using the [binder](https://mybinder.org/) links below or using [SWAN](https://swan.cern.ch/) (CERN-only, please use LCG release LCG_94 or later) and selecting the corresponding notebook manually:\n\n- [Reading in text files](https://github.com/HEPData/hepdata_lib/blob/main/examples/Getting_started.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/Getting_started.ipynb)\n<br/><br/>\n- [Reading in a CMS combine ntuple](https://github.com/HEPData/hepdata_lib/blob/main/examples/combine_limits.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/combine_limits.ipynb)\n<br/><br/>\n- [Reading in ROOT histograms](https://github.com/HEPData/hepdata_lib/blob/main/examples/reading_histograms.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/reading_histograms.ipynb)\n<br/><br/>\n- [Reading a correlation matrix](https://github.com/HEPData/hepdata_lib/blob/main/examples/correlation.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/correlation.ipynb)\n<br/><br/>\n- [Reading TGraph and TGraphError from '.C' files](https://github.com/HEPData/hepdata_lib/blob/main/examples/read_c_file.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/read_c_file.ipynb)\n<br/><br/>\n- [Preparing scikit-hep histograms](https://github.com/HEPData/hepdata_lib/blob/main/examples/reading_scikithep_histograms.ipynb)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/HEPData/hepdata_lib/main?filepath=examples/reading_scikihep_histograms.ipynb)\n<br/><br/>\n\n## External dependencies\n\n- [ROOT](https://root.cern.ch)\n- [ImageMagick](https://www.imagemagick.org)\n\nMake sure that you have `ROOT` in your `$PYTHONPATH` and that the `convert` command is available by adding its location to your `$PATH` if needed.\n\nA ROOT installation is not strictly required if your input data is not in a ROOT format, for example, if\nyour input data is provided as text files or `scikit-hep/hist` histograms.  Most of the `hepdata_lib`\nfunctionality can be used without a ROOT installation, other than the `RootFileReader` and `CFileReader` classes,\nand other functions of the `hepdata_lib.root_utils` module.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Library for getting your data into HEPData",
    "version": "0.17.0",
    "project_urls": {
        "Bug Reports": "https://github.com/HEPData/hepdata_lib/issues",
        "Documentation": "https://hepdata-lib.readthedocs.io",
        "Homepage": "https://github.com/HEPData/hepdata_lib",
        "Source": "https://github.com/HEPData/hepdata_lib"
    },
    "split_keywords": [
        "hepdata",
        "physics",
        "opendata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1824328a0070c3b3e3020f741f7518f0e626e558f8549817d62847381b96441c",
                "md5": "060f427eda106f66d2a00ca829a943ed",
                "sha256": "8cc60579d87113744885c82e283039b865f61a6d280e7395d29ac7d951c0f98b"
            },
            "downloads": -1,
            "filename": "hepdata_lib-0.17.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "060f427eda106f66d2a00ca829a943ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 25373,
            "upload_time": "2024-10-10T09:52:39",
            "upload_time_iso_8601": "2024-10-10T09:52:39.805279Z",
            "url": "https://files.pythonhosted.org/packages/18/24/328a0070c3b3e3020f741f7518f0e626e558f8549817d62847381b96441c/hepdata_lib-0.17.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2d6ace70a5f6963f2a588bc4ac15b6fc2ad27b133ae30ccfb75369e6b9b81d4",
                "md5": "84073a947d7c4ea64edbffc959db8480",
                "sha256": "22b7c188551333025394b83cbc981700ffd0ef7ddfb91708274b9ff496a54a14"
            },
            "downloads": -1,
            "filename": "hepdata_lib-0.17.0.tar.gz",
            "has_sig": false,
            "md5_digest": "84073a947d7c4ea64edbffc959db8480",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 43774,
            "upload_time": "2024-10-10T09:52:40",
            "upload_time_iso_8601": "2024-10-10T09:52:40.858909Z",
            "url": "https://files.pythonhosted.org/packages/c2/d6/ace70a5f6963f2a588bc4ac15b6fc2ad27b133ae30ccfb75369e6b9b81d4/hepdata_lib-0.17.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-10 09:52:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HEPData",
    "github_project": "hepdata_lib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "hepdata-lib"
}
        
Elapsed time: 1.70890s