Skip to content

Commit 594d659

Browse files
committed
create rather than read in params
1 parent 641bff5 commit 594d659

1 file changed

Lines changed: 25 additions & 30 deletions

File tree

tests/test_output_plots.py

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import matplotlib.image as mpimg
1010
import matplotlib.pyplot as plt
1111
from ogcore import utils, output_plots, constants
12+
from ogcore.parameters import Specifications
1213

1314

1415
# Load in test results and parameters
@@ -19,42 +20,36 @@
1920
base_tpi = utils.safe_read_pickle(
2021
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_baseline.pkl")
2122
)
22-
if sys.version_info[1] < 11:
23-
base_params = utils.safe_read_pickle(
24-
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
25-
)
26-
elif sys.version_info[1] == 11:
27-
base_params = utils.safe_read_pickle(
28-
os.path.join(
29-
CUR_PATH, "test_io_data", "model_params_baseline_v311.pkl"
30-
)
31-
)
32-
else:
33-
base_params = utils.safe_read_pickle(
34-
os.path.join(
35-
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
36-
)
37-
)
23+
base_params = Specifications()
24+
base_params.update_specifications(
25+
{
26+
"M": 3,
27+
"gamma": [0.5, 0.5, 0.5],
28+
"gamma_g": [0.0, 0.0, 0.0],
29+
"epsilon": [0.5, 0.5, 0.5],
30+
"I": 3,
31+
"alpha_c": [0.3, 0.4, 0.3],
32+
"io_matrix": np.eye(3)
33+
}
34+
)
3835
reform_ss = utils.safe_read_pickle(
3936
os.path.join(CUR_PATH, "test_io_data", "SS_vars_reform.pkl")
4037
)
4138
reform_tpi = utils.safe_read_pickle(
4239
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_reform.pkl")
4340
)
44-
if sys.version_info[1] < 11:
45-
reform_params = utils.safe_read_pickle(
46-
os.path.join(CUR_PATH, "test_io_data", "model_params_reform.pkl")
47-
)
48-
elif sys.version_info[1] == 11:
49-
reform_params = utils.safe_read_pickle(
50-
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v311.pkl")
51-
)
52-
else:
53-
reform_params = utils.safe_read_pickle(
54-
os.path.join(
55-
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
56-
)
57-
)
41+
reform_params = Specifications()
42+
reform_params.update_specifications(
43+
{
44+
"M": 3,
45+
"gamma": [0.5, 0.5, 0.5],
46+
"gamma_g": [0.0, 0.0, 0.0],
47+
"epsilon": [0.5, 0.5, 0.5],
48+
"I": 3,
49+
"alpha_c": [0.3, 0.4, 0.3],
50+
"io_matrix": np.eye(3)
51+
}
52+
)
5853
reform_taxfunctions = utils.safe_read_pickle(
5954
os.path.join(CUR_PATH, "test_io_data", "TxFuncEst_reform.pkl")
6055
)

0 commit comments

Comments
 (0)