diff --git a/pyproject.toml b/pyproject.toml index 233e1bc074d3984bd3516c73a0ef6b032345b872..01427eab080262a8b57c14d149e9e5688536ecf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "geoloop" -version = "1.0.1" +version = "1.0.2" description = "This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems" authors = [ { name = "Zanne Korevaar", email = "zanne.korevaar@tno.nl" }, diff --git a/src/geoloop/constants.py b/src/geoloop/constants.py index e1e55cfa596741b33a51f021241e6eeb39f2a416..827212e3605eab7e737a28e382095023a27d54f2 100644 --- a/src/geoloop/constants.py +++ b/src/geoloop/constants.py @@ -1,15 +1,3 @@ -from pathlib import Path - -repo_path = Path(__file__).parent.parent.parent - -# Test directories -test_dir = repo_path / "test" -tests_input_path = test_dir / "input" -test_output_path = test_dir / "output" - -# Resources directory -resources_path = repo_path / "resources" - # Dictionary of units for various parameters in the model. units_dict = { "Q_b": "W", diff --git a/test/paths.py b/test/paths.py new file mode 100644 index 0000000000000000000000000000000000000000..cabb5a1aeb036fd4b5a1ba741718dbd7d0126b90 --- /dev/null +++ b/test/paths.py @@ -0,0 +1,6 @@ +from pathlib import Path + +# Test directories +test_dir = Path(__file__).parent +tests_input_path = test_dir / "input" +test_output_path = test_dir / "output" \ No newline at end of file diff --git a/test/test_b2g.py b/test/test_b2g.py index acbffbad03e353733234f50aea449c3446aa3240..ff06652f352ec0dfd408d35f313cb00bb8d9319e 100644 --- a/test/test_b2g.py +++ b/test/test_b2g.py @@ -4,10 +4,11 @@ from pathlib import Path import numpy as np import xarray as xr +from paths import test_dir, tests_input_path + from geoloop.configuration import SingleRunConfig, LithologyConfig, load_nested_config from geoloop.utils.helpers import save_singlerun_results from geoloop.bin.SingleRunSim import SingleRun -from geoloop.constants import test_dir, tests_input_path from geoloop.geoloopcore.b2g import B2G from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity diff --git a/test/test_b2g_ana.py b/test/test_b2g_ana.py index 98cd9e3172761de44dceea354215e8499317ef89..5cb80d78ff374c27e49a9acbc728a57375e23359 100644 --- a/test/test_b2g_ana.py +++ b/test/test_b2g_ana.py @@ -4,6 +4,8 @@ from pathlib import Path import numpy as np import xarray as xr +from paths import test_dir, tests_input_path + from geoloop.configuration import SingleRunConfig, load_nested_config, LithologyConfig, StochasticRunConfig from geoloop.utils.helpers import ( save_MCrun_results, @@ -11,7 +13,6 @@ from geoloop.utils.helpers import ( ) from geoloop.utils.RunManager import run_models from geoloop.bin.SingleRunSim import SingleRun -from geoloop.constants import test_dir, tests_input_path from geoloop.geoloopcore.b2g_ana import B2G_ana from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity diff --git a/test/test_h5.py b/test/test_h5.py index 898162d44f0929e4f8ba7dd9e3c6e221e3388e47..e4086aa7610512c3da1c339a71cff5241758cef4 100644 --- a/test/test_h5.py +++ b/test/test_h5.py @@ -4,10 +4,11 @@ from pathlib import Path import numpy as np import xarray as xr +from paths import test_dir, tests_input_path + from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig from geoloop.utils.helpers import save_singlerun_results from geoloop.bin.SingleRunSim import SingleRun -from geoloop.constants import test_dir, tests_input_path from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity diff --git a/test/test_lithology.py b/test/test_lithology.py index 0e45e451ba5d0b4e6cdac686d1eb4f78de15c054..00c36fdd3c7ad703842b6c5eebe031112ad69e33 100644 --- a/test/test_lithology.py +++ b/test/test_lithology.py @@ -2,7 +2,8 @@ import unittest import xarray as xr -from geoloop.constants import tests_input_path, test_output_path +from paths import tests_input_path, test_output_path + from geoloop.configuration import LithologyConfig, load_single_config from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity diff --git a/test/test_loadflowdata.py b/test/test_loadflowdata.py index 2c26e123d89484a7d21e8419383aa1efbafa0920..3b6d85455922cefc7f5cfb2add05b746fa2150ef 100644 --- a/test/test_loadflowdata.py +++ b/test/test_loadflowdata.py @@ -2,9 +2,10 @@ import unittest import numpy as np +from paths import tests_input_path, test_output_path + from geoloop.configuration import LoadProfileConfig, FlowDataConfig, load_single_config from geoloop.utils.helpers import apply_smoothing -from geoloop.constants import tests_input_path, test_output_path from geoloop.loadflowdata.flow_data import FlowData from geoloop.loadflowdata.loadprofile import LoadProfile diff --git a/test/test_plotting.py b/test/test_plotting.py index 582fbb179f7b35ea39b3b3e0cb57daccfc53419e..ac48211e1c414aa06e99e0e6491db246966ce3b7 100644 --- a/test/test_plotting.py +++ b/test/test_plotting.py @@ -7,9 +7,10 @@ import matplotlib.pyplot as plt import numpy as np import xarray as xr +from paths import test_dir, tests_input_path + from geoloop.configuration import PlotInputConfig, load_single_config from geoloop.bin.Plotmain import DataSelection, DataTotal, PlotInput -from geoloop.constants import test_dir, tests_input_path from geoloop.plotting.create_plots import PlotResults diff --git a/test/test_pyg_ana.py b/test/test_pyg_ana.py index fdcf29cf2e6e340b1015d9794a936b41b07aee3a..b94720f709e16bf71e338226f0cf08c696b955fe 100644 --- a/test/test_pyg_ana.py +++ b/test/test_pyg_ana.py @@ -4,10 +4,11 @@ from pathlib import Path import numpy as np import xarray as xr +from paths import test_dir, tests_input_path + from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig from geoloop.utils.helpers import save_singlerun_results from geoloop.bin.SingleRunSim import SingleRun -from geoloop.constants import test_dir, tests_input_path from geoloop.geoloopcore.pyg_ana import PYG_ana from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity diff --git a/test/test_pygfield_ana.py b/test/test_pygfield_ana.py index 1e0e5d9b1754a1f8f4d3c97e24ad9a5104463fbe..b62e183051c1c2efe2f2326780c8ef6a01a251e3 100644 --- a/test/test_pygfield_ana.py +++ b/test/test_pygfield_ana.py @@ -2,9 +2,10 @@ import unittest import numpy as np +from paths import tests_input_path + from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig from geoloop.bin.SingleRunSim import SingleRun -from geoloop.constants import tests_input_path from geoloop.geoloopcore.pygfield_ana import ( PYGFIELD_ana, create_curved_borehole, diff --git a/uv.lock b/uv.lock index 6917e2b44b70f8757ae34872e8a0bd5e7c41982d..e8c0ae4389d587a3b0ac6dbac788d61d29399705 100644 --- a/uv.lock +++ b/uv.lock @@ -340,7 +340,7 @@ wheels = [ [[package]] name = "geoloop" -version = "1.0.0" +version = "1.0.1" source = { editable = "." } dependencies = [ { name = "h5netcdf" },