TNO Intern

Commit 4c9656a2 authored by Zanne Korevaar's avatar Zanne Korevaar
Browse files

Add paths to test dirs to a paths file in the test directory and remove the...

Add paths to test dirs to a paths file in the test directory and remove the path definitions from the constants file in the geoloop package core.
parent c23a55e5
Loading
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
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",

test/paths.py

0 → 100644
+6 −0
Original line number Diff line number Diff line
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
+2 −1
Original line number Diff line number Diff line
@@ -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

+2 −1
Original line number Diff line number Diff line
@@ -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

+2 −1
Original line number Diff line number Diff line
@@ -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


Loading