Skip to content

g4edge/testdata

Repository files navigation

g4edge test data

PyPI GitHub tag (latest by date) GitHub Workflow Status pre-commit Code style: black GitHub issues GitHub pull requests License

Install (with pip):

$ python -m pip install g4edge-testdata

Usage

Instantiating a G4EdgeTestData object:

from g4edgetestdata import G4EdgeTestData

g4data = G4EdgeTestData()

Clones g4edge/testdata in a temporary location (not preserved across system reboots), unless the environment variable G4EDGE_TESTDATA is set and points to the location of an existing g4edge/testdata clone.

Alternatively, the path to an existing g4edge/testdata clone can be provided to the class constructor:

from g4edgetestdata import G4EdgeTestData

g4data = G4EdgeTestData("path/to/g4edge/testdata")

Access to data files is provided through the square brackets operator:

>>> g4data["gdml/001_box.gdml"]
PosixPath('/tmp/g4edge-testdata-gipert/data/gdml/001_box.gdml')