raiseValueError("THERMOGIS_JAR environment variable is not set in the .env file.")
thermogis_jar_path=Path(tg_jar)
ifnotthermogis_jar_path.exists():
raiseFileNotFoundError(f"Jar file not found at {thermogis_jar_path}, check that you have downloaded the ThermoGIS Jar and set the THERMOGIS_JAR environment variable.")
returnstr(thermogis_jar_path)
@@ -22,8 +28,10 @@ def start_jvm():
This method ensures a clean startup of the jvm packaged with this repo
:return:
"""
ifos.getenv("JAVA_HOME")isNone:
raiseValueError("JAVA_HOME environment variable is not set")
java_home=os.getenv("JAVA_HOME")
ifjava_homeisNone:
raiseValueError("JAVA_HOME environment variable is not set in the .env file.")
ifnotjpype.isJVMStarted():
# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.