TNO Intern

Commit 59d64a78 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Merge branch '50-update-version-number' into 'main'

Resolve "update version number"

Closes #50

See merge request AGS/pythermogis!60
parents 0420de61 a825b4e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2516,8 +2516,8 @@ packages:
  timestamp: 1740946648058
- pypi: .
  name: pythermogis
  version: 0.1.28
  sha256: 1ca2e51218b8e797c92048075bd6b61ea1cec52999cf47acb88d4fc0fbe325e7
  version: 0.2.1
  sha256: 6f81f23eaefa18f2bc184d095874e19be3998818ef3fbe476876720099bd123e
  requires_dist:
  - jpype1>=1.5.2,<2
  - xarray==2024.9.0.*
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pythermogis"
version = "0.1.28"
version = "0.2.1"
description = "This repository is used as a python API for the ThermoGIS Doublet simulations"
authors = [
    { name = "Hen Brett", email = "hen.brett@tno.nl" },
+5 −0
Original line number Diff line number Diff line
import os
from pathlib import Path
import jpype
import faulthandler

def get_thermogis_jar_path() -> str:
    """
@@ -25,6 +26,10 @@ def start_jvm():
        raise ValueError("JAVA_HOME environment variable is not set")

    if not jpype.isJVMStarted():
        # when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
        # the current workaround from the jpype package is to disable the pytest faulthandler. (This will not prevent python or java errors in the test).
        faulthandler.disable()

        jpype.startJVM(classpath=[get_thermogis_jar_path()])

def close_jvm():
+0 −5
Original line number Diff line number Diff line
@@ -2,11 +2,6 @@ from unittest import TestCase

from pythermogis import *

# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
# the current workaround from the jpype package is to disable the pytest faulthandler. (This will not prevent python or java errors in the test).
import faulthandler
faulthandler.disable()

class ThermoGISDoubletBenchmark(TestCase):
    """
    This is a series of tests which copy exactly tests found in the Java code; this ensures that the Jpype implementation of Java still produces the same results as the native java implementation
+0 −6
Original line number Diff line number Diff line
import numpy as np

# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
# the current workaround from the jpype package is to disable the pytest faulthandler. (This will not prevent python or java errors in the test).
import faulthandler
faulthandler.disable()


def test_example_1():
    from pythermogis import calculate_doublet_performance
    import xarray as xr
Loading