Example HEP files for testing and demonstrating
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
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
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.
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
- 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.
pytest -vv tests/
Use the pytest-cov plugin to get a report on the test coverage:
pytest --cov=skhep_testdata --cov-report=html -vv tests/
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size scikit-hep-testdata-0.1.3.tar.gz (56.6 MB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for scikit-hep-testdata-0.1.3.tar.gz