Skip to content

Commit d503ae2

Browse files
authored
Updated Pyfunnel to correct issue with regular expression (#596)
This is for #594
1 parent 3aa54c1 commit d503ae2

File tree

7 files changed

+13
-19
lines changed

7 files changed

+13
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
- DOCKER_REPONAME=lbnlblum
1414
- OMC_VERSION=ubuntu-2204-omc:1.24.0-1
1515
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.55.11
16-
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2025x-x86_64
16+
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2025x-x86_64_rev-1
1717
- MPLBACKEND=agg
1818

1919
notifications:

buildingspy/CHANGES.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
BuildingsPy Changelog
22
---------------------
33

4-
Version 5.2.0, xxxx
5-
^^^^^^^^^^^^^^^^^^^
4+
Version 5.2.0, March 14, 2025
5+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7+
- Updated pyfunnel requirement to version 1.0.2 to avoid a problem with regular expressions.
8+
(https://github.com/lbl-srg/BuildingsPy/issues/594)
79
- In buildingspy/simulate/Dymola.py and in buildingspy/development/regressiontest.py,
810
switched simulator from dymola to dmc unless a gui window is requested.
911
(https://github.com/lbl-srg/BuildingsPy/issues/590)
@@ -13,10 +15,6 @@ Version 5.2.0, xxxx
1315
(https://github.com/lbl-srg/BuildingsPy/issues/586)
1416
- In buildingspy/simulate/base_simulator.py, corrected statement for error reporting.
1517
(https://github.com/lbl-srg/BuildingsPy/issues/583)
16-
- In buildingspy/development/simulationCompare.py, added option to skip verification of results.
17-
The default is set to False and hence this change does not affect the behavior of scripts developed
18-
for previous versions.
19-
(https://github.com/lbl-srg/BuildingsPy/issues/568)
2018
- In buildingspy/development/merger.py, added new comment form to allow excluding
2119
Modelica code for certain libraries.
2220
(https://github.com/lbl-srg/BuildingsPy/issues/566)

buildingspy/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.dev0
1+
5.2.0

buildingspy/development/simulationCompare.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class Comparator(object):
3333
:param branches: A list of branches to compare, such as ``['master', 'issueXXX']``.
3434
:param package: Name of top-level package to compare, such as ``Buildings`` or ``Buildings.Examples``.
3535
:param repo: Name of repository, such as ``https://github.com/lbl-srg/modelica-buildings``.
36-
:param skipVerification: Boolean (default ``False``).
37-
If ``True``, unit test results are not verified against reference points.
3836
:param nPro: Number of threads that are used to run the translations and simulations.
3937
Set to ``0`` to use all processors.
4038
:param tolAbsTim: float (default ``0.1``). Absolute tolerance in time, if exceeded, results will be flagged in summary table.
@@ -55,7 +53,6 @@ class Comparator(object):
5553
... branches=['master'],
5654
... package='Buildings',
5755
... repo='https://github.com/lbl-srg/modelica-buildings',
58-
... skipVerification = True,
5956
... postCloneCommand=[
6057
... "python",
6158
... "Buildings/Resources/src/ThermalZones/install.py",
@@ -87,7 +84,6 @@ def __init__(
8784
branches,
8885
package,
8986
repo,
90-
skipVerification=False,
9187
nPro=0,
9288
simulate=True,
9389
tolAbsTime=0.1,
@@ -99,7 +95,6 @@ def __init__(
9995
self._branches = branches
10096
self._package = package
10197
self._lib_src = repo
102-
self._skip_verification = skipVerification
10398
self._nPro = nPro
10499
self._tolAbsTime = tolAbsTime
105100
self._tolRelTime = tolRelTime
@@ -180,9 +175,7 @@ def _runUnitTest(self, package, tool):
180175
else:
181176
num_pro = f"-n {self._nPro}"
182177

183-
ski_ver = f"--skip-verification" if {self._skip_verification} else ""
184-
185-
command = f"../bin/runUnitTests.py {single_package} {ski_ver} {num_pro} -t {tool} --batch"
178+
command = f"../bin/runUnitTests.py {single_package} {num_pro} -t {tool} --batch"
186179
try:
187180
os.system(command)
188181
except OSError:

buildingspy/tests/MyModelicaLibrary/Resources/C-Sources/MySleep.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <Windows.h>
33
#else
44
#include <unistd.h>
5+
#include <time.h>
56
#endif
67

78
int MySleep(int sec)
@@ -10,6 +11,8 @@ int MySleep(int sec)
1011
Sleep(sec);
1112
return 0;
1213
#else
13-
return sleep(sec);
14+
clock_t start_time = clock();
15+
while (clock() < start_time + sec*1000);
16+
return 0;
1417
#endif
1518
}

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gitpython>=3.1.33; python_version>='3.8'
77
pytidylib==0.3.2
88
simplejson==3.16.0
99
six==1.14.0
10-
pyfunnel==0.3.0
10+
pyfunnel==1.0.2
1111
PyYAML==6.0.1
1212
cerberus==1.3.4
1313

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'pytidylib>=0.3.2',
4242
'simplejson>=3.16',
4343
'six>=1.14',
44-
'pyfunnel>=0.3.0',
44+
'pyfunnel>=1.0.2',
4545
'PyYAML>=6.0.1',
4646
'cerberus>=1.3.4',
4747
],

0 commit comments

Comments
 (0)