Package: scikit-hep-testdata
scikit-hep-testdataA 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 usageTo install:python-mpipinstallscikit-hep-testdataOnce installed, absolute file paths can be resolved using the helper methods:fromskhep_testdataimportdata_pathfilename=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 methodraise_missing=False:filename=data_path("unknown_file.root",raise_missing=False)The files are not stored on PyPI, so if installed from SDist/wheel, the "local"
files will not be present, but will be downloaded from GitHub and cached in the~/.local/skhepdatadirectory. If you make an editable install from the Git repo,
or if you setSKHEP_DATA=1when building/installing from the Git repo, you will
have the data files locally.You can see all "local" files withskhep_testdata.known_files, and you can
download all files at once withskhep_testdata.download_all(), optionally selecting
the download cache directory.Remote vs. Local filesSome 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 samedata_pathmethod 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.
WARNING: the local file caching system has not yet been applied to remote
files.Command-line invocationYou can also interact with this package from the command-line:# Print a path (download if needed)python-mskhep_testdatacms_hep_2012_tutorial/data.root# Show all "local" filespython-mskhep_testdata--list# Download all files to an existing directorypython-mskhep_testdata--all--dirlocalYou can also usepipx run scikit-hep-testdatato access the above CLI without installing.Adding new filesWe'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 filesThe following lists describe the files known by this package.Files stored in this packageListed hereKnown remote filesCMS HEP public tutorial from 2012ContributorsWe hereby acknowledge the contributors that made this project possible (emoji key):benkrikler💻📖Jim Pivarski🚧🔣📖Henry Schreiner🚧🔣💻📖Eduardo Rodrigues🚧🔣💻Matthew Feickert🔣💻Pratyush Das🔣💻Jerry Ling🔣💻Jonas Eschle💻Giordon Stark🔣💻Dmitry Kalinkin🔣Michele Peresano🔣Luis Antonio Obis Aparicio🔣Oksana Shadura🔣Nicholas Smith🔣Beojan Stanislaus🔣Lukas🔣Johannes Schumann🔣Elliott Kauffman🔣Tom Eichlersmith🔣Alexander Puck Neuwirth🔣ioanaif🔣This project follows theall-contributorsspecification.AcknowledgementsMany of the files collected directly within this package were collated originally by Jim Pivarski foruprootRunning the testsThis package usespytestto run the unit tests. Install withpip install scikit-hep-testdata[test]orpip install -e .[test](dev) to get the testing requirements.
then run:pytest