Skip to main content

Library for getting your data into HEPData

Project description

hepdata_lib

DOI PyPI version conda-forge version Actions Status Coverage Status Documentation Status Docker image

Library for getting your data into HEPData

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.

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:

Binder SWAN

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hepdata_lib-0.16.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

hepdata_lib-0.16.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file hepdata_lib-0.16.0.tar.gz.

File metadata

  • Download URL: hepdata_lib-0.16.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for hepdata_lib-0.16.0.tar.gz
Algorithm Hash digest
SHA256 bb316bcd984930b23d678d0a0dc78f9d2d8ef38c519e7ca5e31dfec5dd415eb5
MD5 c91c849487076847dd02cd5db0b9dc1a
BLAKE2b-256 fec095ccd3eaae652f622abfb74de950a153bcb22ac98e1a1d206f56a9906661

See more details on using hashes here.

File details

Details for the file hepdata_lib-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: hepdata_lib-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for hepdata_lib-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb793f5a1d1c6e52eb780e63f79cfdf6eb9f24f09a73625967ff58a2039bad95
MD5 f36f7d12622876a518b6289a49fd2ccf
BLAKE2b-256 80a762e74d2f2cc8fbe5302f9958db85d73b9d77d7df7d86970f7fb04b05ddc7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page