Test Data#

aivkit.testdata provides helper functions to download test data used by AIV pipelines and test suites from the CTAO test data server (an S3-compatible MinIO instance).

Installation#

aivkit.testdata depends on boto3 and python-dotenv, which are not installed by default. Install them via the testdata extra:

$ pip install ./aiv-toolkit/[testdata]

Credentials#

Access to the test data server requires the MINIO_ACCESS_KEY and MINIO_SECRET_KEY environment variables to be set, for example via a .env file in the working directory (loaded automatically using python-dotenv). The server URL defaults to https://minio-cta.zeuthen.desy.de and can be overridden with the MINIO_URL environment variable.

Usage#

aivkit.testdata.download_test_file(bucket: str, name: str, output_path: Path, skip_if_exists=True, client=None)#

Get a file from the test data server.

aivkit.testdata.download_test_directory(bucket: str, name: str, output_path: Path, skip_if_exists=True)#

Get a directory from the test data server.