TNO Intern

Commit 893057dc authored by Hen Brett's avatar Hen Brett 🐔
Browse files

moving the pixi.toml information into a single pyproject.toml

parent 506c2693
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@
    <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$/.pixi/envs/default" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/.pixi/envs/default/DLLs" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/.pixi/envs/default/Lib" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/.pixi/envs/default/Lib/site-packages" isTestSource="false" />
      <excludeFolder url="file://$MODULE_DIR$/.venv" />
    </content>
    <orderEntry type="jdk" jdkName="Python 3.13 (2)" jdkType="Python SDK" />
+9 −8
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ pip install pythermogis --index-url https://__token__:<your_personal_token>@ci.t
### 🧪 Basic Example

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

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

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

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

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

input_grids = read_grid("thickness.zmap").to_dataset(name="thickness_mean")
@@ -174,8 +174,9 @@ Common properties to change include:

Here is an example, where the default utc_properties is used, but the UseHeatPump option is set to True. this is achievied by instantiating a `utc_properties_builder` class, running `.useHeatPump(True)` on that class, and then building the 
`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 import calculate_doublet_performance, instantiate_utc_properties_builder
import xarray as xr

input_data = xr.Dataset({
@@ -196,7 +197,7 @@ print(results)
If you have a valid configuration file, you can parse a utc_properties class using the method: `instantiate_utc_properties_from_xml`, some example configuration xml files are found in `tests/resources/scenarios`.

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

input_data = xr.Dataset({
@@ -234,7 +235,7 @@ This project is licensed under the MIT License. See the `LICENSE` file for detai

```bash
git clone https://gitlab.com/your-repo/pythermogis.git
cd pythermogis
cd src
pixi install
```

@@ -277,7 +278,7 @@ This will generate `.whl` and `.tar.gz` files in the `dist/` directory.
#### 3. Upload to GitLab

```bash
pixi run twine upload -r gitlab-pythermogis dist/*
pixi run twine upload -r gitlab-src dist/*
```

If `.pypirc` is set up correctly, this will upload the package to the GitLab registry.
+1369 −283

File changed.

Preview size limit exceeded, changes collapsed.

pixi.toml

deleted100644 → 0
+0 −34
Original line number Diff line number Diff line
[project]
authors = ["Brett <hen.brett@tno.nl>"]
channels = ["conda-forge"]
description = "This is a python API to the ThermoGIS java code"
name = "pythermogis"
platforms = ["win-64"]
version = "0.1.0"

[tasks]
tg = "main:calculate"

[dependencies]
python = ">=3.13.2,<3.14"
jpype1 = ">=1.5.2,<2"
xarray = "2024.9.0.*"
pandas = ">=2.2.3,<3"
pytz = ">=2024.1,<2025"
setuptools = ">=75.8.2,<76"
wheel = ">=0.45.1,<0.46"
twine = ">=6.1.0,<7"
pip = ">=25.0.1,<26"
sphinx = ">=8.2.3,<9"
sphinx_rtd_theme = ">=3.0.1,<4"
typer = ">=0.15.3,<0.16"

[tool.pixi]
pypi_index_url = "https://pypi.org/simple"
pypi_extra_index_urls = ["https://ci.tno.nl/gitlab/api/v4/projects/18271/packages/pypi"]

[pypi-dependencies]
pygridsio = ">=0.3.11, <0.4"
build = "*"

+44 −7
Original line number Diff line number Diff line
@@ -3,10 +3,13 @@ requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pythermogis"
name = "pythermoGIS"
version = "0.1.16"
description = "This is a Python API to the ThermoGIS Java code"
authors = [{ name = "Brett", email = "hen.brett@tno.nl" }]
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" },
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
@@ -18,9 +21,43 @@ dependencies = [
    "pygridsio>=0.3.11,<0.4"
]


[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--strict-markers -ra"
testpaths = ["."]
markers = [
    "integration: Marks integration tests (deselect with '-m \"not integration\"')"
]

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

[tool.setuptools.packages.find]
where = ["."]
include = ["pythermogis*"]  # Ensure all submodules are included
where = ["src"]

[project.scripts]
calculate = "main:calculate"

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64"]

[tool.pixi.pypi-dependencies]
pythermogis = { path = ".", editable = true }

[tool.pixi.tasks]

[tool.twine]
repository = "pypi"
[tool.pixi.dependencies]
python = ">=3.13.2,<3.14"
jpype1 = ">=1.5.2,<2"
xarray = "2024.9.0.*"
pandas = ">=2.2.3,<3"
pytz = ">=2024.1,<2025"
setuptools = ">=75.8.2,<76"
wheel = ">=0.45.1,<0.46"
twine = ">=6.1.0,<7"
pip = ">=25.0.1,<26"
sphinx = ">=8.2.3,<9"
sphinx_rtd_theme = ">=3.0.1,<4"
typer = ">=0.15.3,<0.16"
 No newline at end of file
Loading