7
7
8
8
#######################################################
9
9
#
10
- from collections import defaultdict
11
- from contextlib import contextmanager
12
- import difflib
13
- import fnmatch
14
10
import functools
15
11
import glob
16
12
import io
24
20
import sys
25
21
import tempfile
26
22
import time
27
- import webbrowser
23
+ from collections import defaultdict
24
+ from contextlib import contextmanager
25
+
28
26
# Third-party module or package imports.
29
27
import numpy as np
30
- import simplejson
28
+
31
29
# Code repository sub-package imports.
32
30
import pyfunnel
33
- from buildingspy .development import error_dictionary_openmodelica
34
- from buildingspy .development import error_dictionary_optimica
35
- from buildingspy .development import error_dictionary_dymola
36
- from buildingspy .io .outputfile import Reader
37
- from buildingspy .io .postprocess import Plotter
31
+
38
32
import buildingspy .io .outputfile as of
39
33
import buildingspy .io .reporter as rep
34
+ from buildingspy .development import (
35
+ error_dictionary_dymola ,
36
+ error_dictionary_openmodelica ,
37
+ error_dictionary_optimica ,
38
+ )
39
+ from buildingspy .io .outputfile import Reader
40
+ from buildingspy .io .postprocess import Plotter
40
41
41
42
42
43
def runSimulation (worDir , cmd ):
@@ -3880,7 +3881,7 @@ def _get(model, key, data):
3880
3881
return 0
3881
3882
3882
3883
with open (self ._statistics_log , 'r' ) as f :
3883
- staVal = simplejson .loads (f .read ())
3884
+ staVal = json .loads (f .read ())
3884
3885
data = []
3885
3886
for case in staVal ['testCase' ]:
3886
3887
if 'translate' in case :
@@ -3902,7 +3903,7 @@ def _get(model, key, data):
3902
3903
temp ['simulation' ]['state_events' ] = case ['simulate' ]['state_events' ] if 'state_events' in case ['simulate' ] else 0
3903
3904
temp ['simulation' ]['success' ] = case ['simulate' ]['result' ]
3904
3905
data .append (temp )
3905
- dataJson = simplejson .dumps (data )
3906
+ dataJson = json .dumps (data )
3906
3907
return dataJson
3907
3908
3908
3909
def run (self ):
@@ -4135,7 +4136,7 @@ def run(self):
4135
4136
# For Dymola: store available simulation info into
4136
4137
# self._comp_info used for reporting.
4137
4138
val = self ._run_simulation_info ()
4138
- self ._comp_info = simplejson .loads (val )
4139
+ self ._comp_info = json .loads (val )
4139
4140
4140
4141
r = self ._checkReferencePoints (ans )
4141
4142
if r != 0 : # In case of comparison error. Comparison warnings are handled
@@ -4154,7 +4155,7 @@ def run(self):
4154
4155
# For OpenModelica and OPTIMICA: store available translation and simulation info
4155
4156
# into self._comp_info used for reporting or for rewriting the configuration file.
4156
4157
with open (self ._simulator_log_file , 'r' ) as f :
4157
- self ._comp_info = simplejson .loads (f .read ())
4158
+ self ._comp_info = json .loads (f .read ())
4158
4159
4159
4160
if not self ._skip_verification :
4160
4161
r = self ._checkReferencePoints (ans = 'N' )
0 commit comments