Metadata-Version: 2.1
Name: g4edge-testdata
Version: 0.1.0
Summary: Retrieve g4edge test data from Python
Home-page: https://github.com/g4edge/testdata
Author: Luigi Pertoldi
Author-email: gipert@pm.me
Maintainer: The g4edge developers
License: GPL-3.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: GitPython
Provides-Extra: all
Requires-Dist: g4edge-testdata[docs,test] ; extra == 'all'
Provides-Extra: docs
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: myst-parser ; extra == 'docs'
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-copybutton ; extra == 'docs'
Provides-Extra: test
Requires-Dist: pre-commit ; extra == 'test'
Requires-Dist: pytest (>=6.0) ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'

# g4edge test data

![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/g4edge/testdata?logo=git)
[![GitHub Workflow Status](https://img.shields.io/github/checks-status/g4edge/testdata/main?label=main%20branch&logo=github)](https://github.com/g4edge/testdata/actions)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![GitHub issues](https://img.shields.io/github/issues/g4edge/testdata?logo=github)
![GitHub pull requests](https://img.shields.io/github/issues-pr/g4edge/testdata?logo=github)
![License](https://img.shields.io/github/license/g4edge/testdata)

Install (with pip):

```console
$ python -m pip install g4edge-testdata
```

### Usage

Instantiating a `G4EdgeTestData` object:

```python
from g4edgetestdata import G4EdgeTestData

g4data = G4EdgeTestData()
```

Clones [g4edge/testdata](https://github.com/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:

```python
from g4edgetestdata import G4EdgeTestData

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

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

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