TNO Intern

Commit 47a3690e authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Merge branch '38-restructure-the-repo-and-clean-it-up-in-preparation-for-publishing' into 'main'

Resolve "Restructure the repo and clean it up in preparation for publishing"

Closes #38

See merge request AGS/pythermogis!40
parents 68cb08af 91be8f4c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
      <sourceFolder url="file://$MODULE_DIR$/tests/tests" isTestSource="true" />
      <sourceFolder url="file://$MODULE_DIR$/pythermogis" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/src/pythermogis" isTestSource="false" />
      <excludeFolder url="file://$MODULE_DIR$/.venv" />
    </content>
    <orderEntry type="jdk" jdkName="Python 3.13 (2)" jdkType="Python SDK" />
@@ -14,7 +15,7 @@
    <option name="namespacePackageFolders">
      <list>
        <option value="$MODULE_DIR$/resources" />
        <option value="$MODULE_DIR$/pythermogis" />
        <option value="$MODULE_DIR$/src/pythermogis" />
      </list>
    </option>
  </component>
+7 −8
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ pixi run pytg simulate-doublet --depth 500 --temperature 150 --thickness 200 --n
### 🧪 Basic Example

```python
from pythermogis import calculate_doublet_performance
from src.pythermogis import calculate_doublet_performance
import xarray as xr

input_data = xr.Dataset({
@@ -161,7 +161,7 @@ print(results)
### 🌍 2D Grid Example

```python
from pythermogis import calculate_doublet_performance
from src.pythermogis import calculate_doublet_performance
import xarray as xr
import numpy as np

@@ -184,7 +184,7 @@ print(results)
### 🗺️ Reading Raster Grids with pygridsio

```python
from pythermogis import calculate_doublet_performance
from src.pythermogis import calculate_doublet_performance
from pygridsio import read_grid

input_grids = read_grid("thickness.zmap").to_dataset(name="thickness_mean")
@@ -218,7 +218,7 @@ Here is an example, where the default utc_properties is used, but the UseHeatPum
`utc_properties` themselves, with the `.build()` method of the `utc_properties_builder`.

```python
from pythermogis import calculate_doublet_performance, instantiate_utc_properties_builder
from src.pythermogis import calculate_doublet_performance, instantiate_utc_properties_builder
import xarray as xr

input_data = xr.Dataset({
@@ -244,7 +244,7 @@ That being said, a plotting function is provided which will produce a plot of a
Check out the definition of `plot_doublet_performance_results` for more details.

```python
from pythermogis import calculate_doublet_performance, instantiate_utc_properties_builder, plot_doublet_performance_results
from src.pythermogis import calculate_doublet_performance, instantiate_utc_properties_builder, plot_doublet_performance_results
import xarray as xr

input_data = xr.Dataset({
@@ -386,9 +386,8 @@ The minimum parameters which are required in the XML file are:
| 109 | parasitic_power_fraction_of_net_power                                    |
| 110 | base_temperature                                                         |


```python
from pythermogis import calculate_doublet_performance, instantiate_utc_properties_from_xml
from src.pythermogis import calculate_doublet_performance, instantiate_utc_properties_from_xml
import xarray as xr

input_data = xr.Dataset({
+8 −8
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ environments:
      - pypi: https://files.pythonhosted.org/packages/d1/80/b9c19f1bb4ac6c5fa6f94a4f278bc68a778473d1814a86a375d7cffa193a/netCDF4-1.7.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/13/eb/2552ecebc0b887f539111c2cd241f538b8ff5891b8903dfe672e997529be/pillow-11.2.1-cp313-cp313-manylinux_2_28_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/02/65/ad2bc85f7377f5cfba5d4466d5474423a3fb7f6a97fd807c06f92dd3e721/plotly-6.0.1-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/fc/ee/41a18c1b90d919a4fc7e2ae26875d77a0fb08224f19c92df1c3079762205/pygridsio-0.3.25-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/c2/70/6b5ba59d170fa4a873ae30de74c5d234a12654c282df64b0479413f08ccc/pygridsio-0.3.27-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/ea/00/d815833441d8c52bf4a6930952e77d3de77d0bf67b3202ccc12dabdae279/pykrige-1.7.2.tar.gz
      - pypi: https://files.pythonhosted.org/packages/9f/bb/e12bebcf2668bcb83736cc76177f36ee300ac8069880fca3a73f8753fc70/pyogrio-0.11.0-cp313-cp313-manylinux_2_28_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/05/e7/df2285f3d08fee213f2d041540fa4fc9ca6c2d44cf36d3a035bf2a8d2bcc/pyparsing-3.2.3-py3-none-any.whl
@@ -276,7 +276,7 @@ environments:
      - pypi: https://files.pythonhosted.org/packages/66/b5/e04550fd53de57001dbd5a87242da7ff784c80790adc48897977b6ccf891/netCDF4-1.7.2-cp313-cp313-win_amd64.whl
      - pypi: https://files.pythonhosted.org/packages/6d/ec/1179083b8d6067a613e4d595359b5fdea65d0a3b7ad623fee906e1b3c4d2/pillow-11.2.1-cp313-cp313-win_amd64.whl
      - pypi: https://files.pythonhosted.org/packages/02/65/ad2bc85f7377f5cfba5d4466d5474423a3fb7f6a97fd807c06f92dd3e721/plotly-6.0.1-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/fc/ee/41a18c1b90d919a4fc7e2ae26875d77a0fb08224f19c92df1c3079762205/pygridsio-0.3.25-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/c2/70/6b5ba59d170fa4a873ae30de74c5d234a12654c282df64b0479413f08ccc/pygridsio-0.3.27-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/ea/00/d815833441d8c52bf4a6930952e77d3de77d0bf67b3202ccc12dabdae279/pykrige-1.7.2.tar.gz
      - pypi: https://files.pythonhosted.org/packages/46/8f/a9d134fbbf213db259b79f5bd5bbe7e3de1ff34fbe2a0b0be9d7d2919323/pyogrio-0.11.0-cp313-cp313-win_amd64.whl
      - pypi: https://files.pythonhosted.org/packages/05/e7/df2285f3d08fee213f2d041540fa4fc9ca6c2d44cf36d3a035bf2a8d2bcc/pyparsing-3.2.3-py3-none-any.whl
@@ -2151,10 +2151,10 @@ packages:
  - pkg:pypi/pygments?source=hash-mapping
  size: 888600
  timestamp: 1736243563082
- pypi: https://files.pythonhosted.org/packages/fc/ee/41a18c1b90d919a4fc7e2ae26875d77a0fb08224f19c92df1c3079762205/pygridsio-0.3.25-py3-none-any.whl
- pypi: https://files.pythonhosted.org/packages/c2/70/6b5ba59d170fa4a873ae30de74c5d234a12654c282df64b0479413f08ccc/pygridsio-0.3.27-py3-none-any.whl
  name: pygridsio
  version: 0.3.25
  sha256: 21c660a4e2995bee2a24d1d30a53f90552648cbd36870499f562b877922c78c1
  version: 0.3.27
  sha256: b8b222455de2a2c447609eb4ac13a11777ce63ce70512feb56ebe5898be7a674
  requires_dist:
  - numpy
  - pandas
@@ -2293,14 +2293,14 @@ packages:
  timestamp: 1740946648058
- pypi: .
  name: pythermogis
  version: 0.1.27
  sha256: 476b714058c996bda97b090a03da3514ff9d217f532bce8487e59c76fa952d62
  version: 0.1.28
  sha256: c80a52cf0838dae4fcbe27a0313cd66844b3d91052f2d018e82eb874e57a396d
  requires_dist:
  - jpype1>=1.5.2,<2
  - xarray==2024.9.0.*
  - pandas>=2.2.3,<3
  - pytz>=2024.1,<2025
  - pygridsio>=0.3.11,<0.4
  - pygridsio>=0.3.27,<0.4
  - build>=1.2.2.post1,<2
  requires_python: '>=3.11'
  editable: true
+8 −6
Original line number Diff line number Diff line
@@ -4,11 +4,12 @@ build-backend = "setuptools.build_meta"

[project]
name = "pythermogis"
version = "0.1.27"
version = "0.1.28"
description = "This repository is used as a python API for the ThermoGIS Doublet simulations"
authors = [
    { name = "Hen Brett", email = "hen.brett@tno.nl" },
    { name = "Florian Knappers", email = "florian.knappers@tno.nl" },
    { name = "Jan Diederik van Wees", email = "jan_diederik.vanwees@tno.nl" },
]
readme = "README.md"
license = { file = "LICENSE" }
@@ -18,7 +19,7 @@ dependencies = [
    "xarray==2024.9.0.*",
    "pandas>=2.2.3,<3",
    "pytz>=2024.1,<2025",
    "pygridsio>=0.3.11,<0.4"
    "pygridsio>=0.3.27,<0.4"
, "build>=1.2.2.post1,<2"]


@@ -31,7 +32,7 @@ markers = [
]

[tool.setuptools]
package-dir = {"" = "pythermogis"}
package-dir = {"" = "src"}

[project.scripts]
pytg = "main:app"
@@ -44,9 +45,10 @@ platforms = ["win-64", "linux-64"]
pythermogis = { path = ".", editable = true }

[tool.pixi.tasks]
test = "PYTHONPATH=pythermogis pytest -s tests/"
test_java_installation = "PYTHONPATH=pythermogis pytest -s tests/test_java_installation.py"

test = "PYTHONPATH=src/pythermogis pytest -s tests/"
test_java_installation = "PYTHONPATH=src pytest -s tests/test_java_installation.py"
build = "pixi run python -m build"
publish = "pixi run twine upload -r gitlab-pythermogis dist/*"

[tool.pixi.dependencies]
python = ">=3.13.2,<3.14"

pythermogis/__init__.py

deleted100644 → 0
+0 −3
Original line number Diff line number Diff line
from thermogis_classes.doublet import *
from thermogis_classes.utc_properties import *
from plotting.plot_doublet_performance_results import plot_doublet_performance_results
 No newline at end of file
Loading