Skip to main content

Example HEP files for testing and demonstrating

Project description

PyPI version Github Actions badge Build Status codecov

scikit-hep-testdata

A common package to provide example files (e.g. ROOT) for testing and developing packages against. The sample of files is representative of typical files found "in the wild".

In addition to including some root files directly, this package adds some simple helper methods to get larger files from common open-access data repositories.

Installing and usage

To install:

pip install scikit-hep-testdata

Once installed, absolute file paths can be resolved using the helper methods:

from skhep_testdata import data_path

filename = data_path("some_file.root")

By default, if an unknown file is requested an exception is raised but this can be skipped by passing the above method raise_missing=False:

filename = data_path("unknown_file.root", raise_missing=False)

Remote vs. Local files

Some files, particularly large ones, for example, are not stored within this package and instead live on a remote server; we call these "remote files". To obtain these use the same data_path method as above, however this will trigger the code to download and configure the remote file. This might be slow the first time round but will subsequently be as fast as for a local file.

Command-line invocation

You can also interact with this package from the command-line:

python -m skhep_testdata cms_hep_2012_tutorial/data.root

Adding new files

We're on the look out for new, interesting files!

  • Large files: If the file is particularly large, for example > 25 MB, it might be worth adding to an external open access data repository and adding a configuration here so that the internal helper methods can pull this down.
  • Experiment data policies: Please make sure you have permissions to add the file to this collection, and that any private or sensitive data has been appropriately masked, salted, or scrambled.

List of files

The following lists describe the files known by this package.

Files stored in this package

Known remote files

Acknowledgements

  • Many of the files collected directly within this package were collated originally by Jim Pivarski for uproot

Running the tests

This package uses pytest to run the unit tests. Install with pip install scikit-hep-testdata[test] or pip install -e .[test] (dev) to get the testing requirements. then run:

pytest

The pytest-cov plugin is used to get a report on the test coverage:

pytest --cov=skhep_testdata --cov-report=html -vv tests/

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

scikit_hep_testdata-0.3.7-py2.py3-none-any.whl (79.7 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file scikit_hep_testdata-0.3.7-py2.py3-none-any.whl.

File metadata

  • Download URL: scikit_hep_testdata-0.3.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 79.7 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for scikit_hep_testdata-0.3.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 02ec94b916a3a1eb250a743d334f805c6c769a23e2983d70e3030c6a4ec4b265
MD5 6a1ffc1d60c4af7bda7324aa460b4acc
BLAKE2b-256 4869c0b66319a0ddbd1692e6954ead61fa7cce9c120dbdc0f054e77cb3296065

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