Library for getting your data into HEPData
Project description
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, 3.12 or 3.13.
Installation
It is highly recommended you install hepdata_lib into a virtual environment.
python -m pip install hepdata_lib
Alternatively, install from conda-forge using a conda ecosystem package manager:
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 or SWAN (CERN-only) services using one of the buttons below:
You can also use the Docker image (recommended when working on local machine):
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 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:
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:
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:
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 links below or using SWAN (CERN-only, please use LCG release LCG_94 or later) and selecting the corresponding notebook manually:
- Reading in text files
- Reading in a CMS combine ntuple
- Reading in ROOT histograms
- Reading a correlation matrix
- Reading TGraph and TGraphError from '.C' files
- Preparing scikit-hep histograms
External dependencies
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hepdata_lib-0.20.0.tar.gz.
File metadata
- Download URL: hepdata_lib-0.20.0.tar.gz
- Upload date:
- Size: 44.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f906783e5eb62d16bea3e7f97e1f8f5dcdd3782db7f50376b7f81e3bb136d55d
|
|
| MD5 |
abfbde060eae55c4fff288d89706070e
|
|
| BLAKE2b-256 |
40deeae50e2406a4cf7116f12d98cbdd81041dd7fb03c99cc395bfd98300c9ab
|
Provenance
The following attestation bundles were made for hepdata_lib-0.20.0.tar.gz:
Publisher:
publish.yml on HEPData/hepdata_lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hepdata_lib-0.20.0.tar.gz -
Subject digest:
f906783e5eb62d16bea3e7f97e1f8f5dcdd3782db7f50376b7f81e3bb136d55d - Sigstore transparency entry: 560434156
- Sigstore integration time:
-
Permalink:
HEPData/hepdata_lib@96aab5ea8ab8e135ab1140080702f8a2868092ee -
Branch / Tag:
refs/tags/v0.20.0 - Owner: https://github.com/HEPData
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96aab5ea8ab8e135ab1140080702f8a2868092ee -
Trigger Event:
release
-
Statement type:
File details
Details for the file hepdata_lib-0.20.0-py3-none-any.whl.
File metadata
- Download URL: hepdata_lib-0.20.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
042bacf7aab3a8e694d02b6c73d286e80a6ec0ddc171e5d3d074506f9793e862
|
|
| MD5 |
b14a4b2b2d8ca01dcae6aa9f4e965148
|
|
| BLAKE2b-256 |
bfd749fe238a6840cafc1c059b4828d5585a63b88ce81909d9951ed6f6bcd3ec
|
Provenance
The following attestation bundles were made for hepdata_lib-0.20.0-py3-none-any.whl:
Publisher:
publish.yml on HEPData/hepdata_lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hepdata_lib-0.20.0-py3-none-any.whl -
Subject digest:
042bacf7aab3a8e694d02b6c73d286e80a6ec0ddc171e5d3d074506f9793e862 - Sigstore transparency entry: 560434178
- Sigstore integration time:
-
Permalink:
HEPData/hepdata_lib@96aab5ea8ab8e135ab1140080702f8a2868092ee -
Branch / Tag:
refs/tags/v0.20.0 - Owner: https://github.com/HEPData
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96aab5ea8ab8e135ab1140080702f8a2868092ee -
Trigger Event:
release
-
Statement type: