TNO Intern

Commit e974f113 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Adding pydoublet calc to the project as an editable file

parent 00721824
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,12 @@ PyThermoGIS has been designed to be used as a python package you import into you
It works by creating a python API access to the ThermoGIS techno-economic application, which is written in Java. 
Because of this dependency you need to Install a Java 17 VM and store the ThermoGIS Jar (a Java executable file) on your computer:

## Installing pydoubletcalc locally

```bash
 pixi add --editable pydoubletcalc@file:C:path\to\pydoubletcalc --pypi
```

### 1. Install Java 17 and Download the ThermoGIS JAR

This package requires a Java 17 VM (we recommend using [Amazon Corretto 17](https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html)) and a [ThermoGIS Jar file](https://ci.tno.nl/gitlab/ags_public/pythermogis/-/blob/main/resources/thermogis_jar/thermogis-1.7.0-shaded.jar?ref_type=heads) (Version >=1.7).
+4 −4
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ environments:
      - pypi: https://files.pythonhosted.org/packages/d1/a7/5c9cb413e4e2ce52c16be717e94abd40ce91b1f8974624d5d56154c5d40b/shapely-2.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl
      - pypi: ./
      - pypi: C:/Users/knappersfy/work/thermogis/pydoubletcalc
      - pypi: C:/work/projects/pydoubletcalc
      win-64:
      - conda: https://conda.anaconda.org/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda
      - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda
@@ -503,7 +503,7 @@ environments:
      - pypi: https://files.pythonhosted.org/packages/e3/f0/9f8cdf2258d7aed742459cea51c70d184de92f5d2d6f5f7f1ded90a18c31/shapely-2.1.0-cp313-cp313-win_amd64.whl
      - pypi: https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl
      - pypi: ./
      - pypi: C:/Users/knappersfy/work/thermogis/pydoubletcalc
      - pypi: C:/work/projects/pydoubletcalc
packages:
- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
  sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726
@@ -4762,7 +4762,7 @@ packages:
  - pkg:pypi/pycparser?source=hash-mapping
  size: 110100
  timestamp: 1733195786147
- pypi: C:/Users/knappersfy/work/thermogis/pydoubletcalc
- pypi: C:/work/projects/pydoubletcalc
  name: pydoubletcalc
  version: 0.0.1
  sha256: af6852e94daff598f382da9a04e74eb8649592424d163653d66a833bc140c065
@@ -4943,7 +4943,7 @@ packages:
- pypi: ./
  name: pythermogis
  version: 1.2.0
  sha256: f25432777c09250f39cf8019497063cc9860feeb7207723ab5ec7783781125d6
  sha256: 854f508e9aa3672887f5ab062a2aeb06ef019944c70aa0c96a345e478f35e6d9
  requires_dist:
  - jpype1>=1.5.2,<2
  - xarray==2024.9.0.*
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ platforms = ["win-64", "linux-64"]

[tool.pixi.pypi-dependencies]
pythermogis = { path = ".", editable = true }
pydoubletcalc = { path = 'C:\Users\knappersfy\work\thermogis\pydoubletcalc', editable = true }
pydoubletcalc = { path = 'C:\work\projects\pydoubletcalc', editable = true }

[tool.pixi.tasks]
test = "PYTHONPATH=src/pythermogis pytest -s tests/"
+3 −2
Original line number Diff line number Diff line
from pythermogis.workflow.utc.utc_properties import UTCConfiguration
import numpy as np

from pythermogis.workflow.utc.doublet import DoubletInput
from pythermogis.workflow.utc.flow import calculate_volumetric_flow
from pythermogis.workflow.utc.utc_properties import UTCConfiguration

import numpy as np

def test_calculate_volumetric_flow():
    props = UTCConfiguration()