#! /usr/bin/env python3

# ICON
#
# ------------------------------------------
# Copyright (C) 2004-2026, DWD, MPI-M, DKRZ, KIT, ETH, MeteoSwiss
# Contact information: icon-model.org
# See AUTHORS.TXT for a list of authors
# See LICENSES/ for license information
# SPDX-License-Identifier: BSD-3-Clause
# ------------------------------------------
import os

import click
from yaml_experiment_test_processor import ExperimentTestCollection


@click.command()
@click.option("--experiment", "exp", type=str, required=True)
@click.option("--param", "param", type=str, required=True)
def main(exp, param):
    bb_name = os.getenv("BB_NAME")
    if not bb_name:
        raise Exception("Environment variable BB_NAME is not set")
    tests = ExperimentTestCollection()
    tests.print_param_for_exp_by_machine(exp, param, bb_name)


if __name__ == "__main__":
    main()
