#!/usr/bin/env python3

import opengate as gate
import opengate_core as g4
import click

CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])


@click.command(context_settings=CONTEXT_SETTINGS)
def opengate_info():
    """
    Print information about OpenGate and the environment
    """

    gi = g4.GateInfo
    v = gi.get_G4Version().replace("$Name: ", "")
    v = v.replace("$", "")

    print(f"Geant4 version   {v}")
    print(f"Geant4 MT ?      {gi.get_G4MULTITHREADED()}")
    print(f"Geant4 date      {gi.get_G4Date()}")
    print(f"Geant4 data      {g4.get_G4_data_folder()}")
    print(f"ITK version      {gi.get_ITKVersion()}")
    print(f"Site package     {g4.get_site_packages_dir()}")


if __name__ == "__main__":
    opengate_info()
