Skip to content

Commit 77da92b

Browse files
Update dependencies and changelog, clean imports
1 parent 86da620 commit 77da92b

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

buildingspy/CHANGES.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ BuildingsPy Changelog
44
Version 5.2.1, ...
55
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
- Updated pyfunnel to version 1.0.3 to fix plotting issues.
8-
([#599](https://github.com/lbl-srg/BuildingsPy/issues/599))
7+
- Updated pyfunnel to version 2.0.1 to fix plotting issues.
8+
With this change, Python 2 is no longer supported.
9+
(https://github.com/lbl-srg/BuildingsPy/issues/599)
910

1011
Version 5.2.0, March 14, 2025
1112
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

buildingspy/development/regressiontest.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
# [email protected] 2011-02-23
88
#######################################################
99
#
10-
from collections import defaultdict
11-
from contextlib import contextmanager
12-
import difflib
13-
import fnmatch
1410
import functools
1511
import glob
1612
import io
@@ -24,19 +20,24 @@
2420
import sys
2521
import tempfile
2622
import time
27-
import webbrowser
23+
from collections import defaultdict
24+
from contextlib import contextmanager
25+
2826
# Third-party module or package imports.
2927
import numpy as np
30-
import simplejson
28+
3129
# Code repository sub-package imports.
3230
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+
3832
import buildingspy.io.outputfile as of
3933
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
4041

4142

4243
def runSimulation(worDir, cmd):
@@ -3880,7 +3881,7 @@ def _get(model, key, data):
38803881
return 0
38813882

38823883
with open(self._statistics_log, 'r') as f:
3883-
staVal = simplejson.loads(f.read())
3884+
staVal = json.loads(f.read())
38843885
data = []
38853886
for case in staVal['testCase']:
38863887
if 'translate' in case:
@@ -3902,7 +3903,7 @@ def _get(model, key, data):
39023903
temp['simulation']['state_events'] = case['simulate']['state_events'] if 'state_events' in case['simulate'] else 0
39033904
temp['simulation']['success'] = case['simulate']['result']
39043905
data.append(temp)
3905-
dataJson = simplejson.dumps(data)
3906+
dataJson = json.dumps(data)
39063907
return dataJson
39073908

39083909
def run(self):
@@ -4135,7 +4136,7 @@ def run(self):
41354136
# For Dymola: store available simulation info into
41364137
# self._comp_info used for reporting.
41374138
val = self._run_simulation_info()
4138-
self._comp_info = simplejson.loads(val)
4139+
self._comp_info = json.loads(val)
41394140

41404141
r = self._checkReferencePoints(ans)
41414142
if r != 0: # In case of comparison error. Comparison warnings are handled
@@ -4154,7 +4155,7 @@ def run(self):
41544155
# For OpenModelica and OPTIMICA: store available translation and simulation info
41554156
# into self._comp_info used for reporting or for rewriting the configuration file.
41564157
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())
41584159

41594160
if not self._skip_verification:
41604161
r = self._checkReferencePoints(ans='N')

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ gitpython>=3.1.33; python_version>='3.8'
55
--only-binary numpy==1.21.4; python_version>='3.8'
66
--only-binary scipy==1.7.3; python_version>='3.8'
77
pytidylib==0.3.2
8-
simplejson==3.16.0
9-
six==1.14.0
10-
pyfunnel==1.0.3
8+
9+
pyfunnel==2.0.1
1110
PyYAML==6.0.1
1211
cerberus==1.3.4
1312

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import io
2-
import platform
32
import os
3+
44
from setuptools import setup
55

66
# Python setup file.
@@ -39,9 +39,8 @@
3939
'numpy>=1.21',
4040
'scipy>=1.7',
4141
'pytidylib>=0.3.2',
42-
'simplejson>=3.16',
43-
'six>=1.14',
44-
'pyfunnel>=1.0.3',
42+
43+
'pyfunnel>=2.0.1',
4544
'PyYAML>=6.0.1',
4645
'cerberus>=1.3.4',
4746
],

0 commit comments

Comments
 (0)