Skip to content

Commit 4e56012

Browse files
authored
Merge pull request #209 from ecobee/dev
conditional skipping of DataClient tests if source unconfigured
2 parents f200aac + ba17235 commit 4e56012

11 files changed

+80
-77
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@
1717
- fixed `make_data_directories` usage when no local_cache is given
1818
- fixed `get_local_cache_file` usage when no local_cache is given
1919
- fixed `DataSpec.py` null_check_columns and units
20+
- conditional skipping of `DataClient` tests that use external data sources if those sources are not configured

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - \
8282
&& pyenv update && pyenv install 3.8.9 \
8383
&& mkdir "${LIB_DIR}" && mkdir "${EXT_DIR}" \
8484
&& cd "${EXT_DIR}" \
85-
&& wget "https://github.com/modelon-community/fmi-library/archive/2.2.3.zip" \
86-
&& unzip "2.2.3.zip" && mv "fmi-library-2.2.3" "FMIL" \
87-
&& rm -rf "2.2.3.zip" \
85+
&& wget "https://github.com/modelon-community/fmi-library/archive/refs/tags/2.3.zip" \
86+
&& unzip "2.3.zip" && mv "fmi-library-2.3" "FMIL" \
87+
&& rm -rf "2.3.zip" \
8888
&& cd "FMIL" \
8989
&& mkdir build-fmil; cd build-fmil \
9090
&& cmake -DFMILIB_INSTALL_PREFIX=./ ../ \
@@ -123,9 +123,9 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - \
123123
&& mv "${EXT_DIR}/Assimulo-Assimulo-3.2.5" "${EXT_DIR}/Assimulo-3.2.5" \
124124
# get PyFMI source
125125
&& cd "${EXT_DIR}" \
126-
&& wget "https://github.com/modelon-community/PyFMI/archive/refs/tags/PyFMI-2.8.6.tar.gz" \
127-
&& tar -xzf "PyFMI-2.8.6.tar.gz" && rm "PyFMI-2.8.6.tar.gz"\
128-
&& mv "${EXT_DIR}/PyFMI-PyFMI-2.8.6" "${EXT_DIR}/PyFMI" \
126+
&& wget "https://github.com/modelon-community/PyFMI/archive/refs/tags/PyFMI-2.8.10.tar.gz" \
127+
&& tar -xzf "PyFMI-2.8.10.tar.gz" && rm "PyFMI-2.8.10.tar.gz"\
128+
&& mv "${EXT_DIR}/PyFMI-PyFMI-2.8.10" "${EXT_DIR}/PyFMI" \
129129
# make PACKAGE_DIR and cleanup
130130
&& cd "${LIB_DIR}" \
131131
&& mkdir "${PACKAGE_DIR}" \

requirements.txt

+48-48
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,65 @@
11
adal==1.2.7
22
aiohttp==3.7.4.post0
33
alabaster==0.7.12
4+
algopy==0.5.7
45
appdirs==1.4.4
56
argon2-cffi==20.1.0
67
async-generator==1.10
78
async-timeout==3.0.1
8-
attrs==20.3.0
9-
Babel==2.9.0
9+
attrs==21.2.0
10+
Babel==2.9.1
1011
backcall==0.2.0
1112
beautifulsoup4==4.8.0
12-
black==20.8b1
13+
black==21.6b0
1314
bleach==3.3.0
1415
Bottleneck==1.3.2
15-
cachetools==4.2.1
16+
cachetools==4.2.2
1617
casadi==3.5.5
17-
certifi==2020.12.5
18+
certifi==2021.5.30
1819
cffi==1.14.5
1920
chardet==4.0.0
20-
click==7.1.2
21+
click==8.0.1
2122
cloudpickle==1.6.0
2223
coverage==5.5
2324
cryptography==3.4.7
2425
cycler==0.10.0
2526
Cython==0.29.23
26-
dask==2021.4.0
27-
decorator==5.0.7
27+
dask==2021.6.0
28+
decorator==5.0.9
2829
defusedxml==0.7.1
2930
docutils==0.16
3031
entrypoints==0.3
3132
eppy==0.5.56
32-
flake8==3.9.1
33-
fsspec==2021.4.0
33+
flake8==3.9.2
34+
fsspec==2021.6.0
3435
future==0.18.2
35-
gcsfs==0.8.0
36-
google-api-core==1.26.3
37-
google-api-python-client==2.2.0
38-
google-auth==1.29.0
36+
gcsfs==2021.6.0
37+
google-api-core==1.30.0
38+
google-api-python-client==2.8.0
39+
google-auth==1.31.0
3940
google-auth-httplib2==0.1.0
4041
google-auth-oauthlib==0.4.4
4142
google-cloud-bigquery==2.3.1
4243
google-cloud-bigquery-storage==2.4.0
4344
google-cloud-core==1.6.0
44-
google-cloud-storage==1.37.1
45+
google-cloud-storage==1.38.0
4546
google-crc32c==1.1.2
46-
google-resumable-media==1.2.0
47+
google-resumable-media==1.3.0
4748
googleapis-common-protos==1.53.0
4849
gprof2dot==2021.2.21
49-
grpcio==1.37.0
50+
grpcio==1.38.0
5051
h5pyd==0.8.0
5152
httplib2==0.19.1
5253
idna==2.10
5354
imagesize==1.2.0
5455
iniconfig==1.1.1
55-
ipykernel==5.5.3
56-
ipython==7.22.0
56+
ipykernel==5.5.5
57+
ipython==7.24.1
5758
ipython-genutils==0.2.0
5859
ipywidgets==7.6.3
5960
isodate==0.6.0
6061
jedi==0.18.0
61-
Jinja2==2.11.3
62+
Jinja2==3.0.1
6263
joblib==1.0.1
6364
json5==0.9.5
6465
jsonschema==3.2.0
@@ -69,12 +70,13 @@ jupyterlab-pygments==0.1.2
6970
jupyterlab-server==1.2.0
7071
jupyterlab-widgets==1.0.0
7172
kiwisolver==1.3.1
72-
libcst==0.3.18
73+
libcst==0.3.19
7374
llvmlite==0.36.0
7475
locket==0.2.1
7576
lxml==4.6.3
76-
MarkupSafe==1.1.1
77-
matplotlib==3.4.1
77+
MarkupSafe==2.0.1
78+
matplotlib==3.4.2
79+
matplotlib-inline==0.1.2
7880
mccabe==0.6.1
7981
mistune==0.8.4
8082
msrest==0.6.21
@@ -86,12 +88,12 @@ nbclient==0.5.3
8688
nbconvert==6.0.7
8789
nbformat==5.1.3
8890
nest-asyncio==1.5.1
89-
notebook==6.3.0
91+
notebook==6.4.0
9092
numba==0.53.1
91-
numdifftools==0.9.39
93+
numdifftools==0.9.40
9294
numexpr==2.7.3
93-
numpy==1.20.2
94-
oauthlib==3.1.0
95+
numpy==1.20.3
96+
oauthlib==3.1.1
9597
packaging==20.9
9698
pandas==1.2.4
9799
pandas-gbq==0.15.0
@@ -105,10 +107,10 @@ pickleshare==0.7.5
105107
Pillow==8.2.0
106108
plotly==4.14.3
107109
pluggy==0.13.1
108-
prometheus-client==0.10.1
110+
prometheus-client==0.11.0
109111
prompt-toolkit==3.0.18
110112
proto-plus==1.18.1
111-
protobuf==3.15.8
113+
protobuf==3.17.3
112114
psutil==5.8.0
113115
ptyprocess==0.7.0
114116
py==1.10.0
@@ -117,56 +119,54 @@ pyasn1==0.4.8
117119
pyasn1-modules==0.2.8
118120
pycodestyle==2.7.0
119121
pycparser==2.20
120-
pydata-google-auth==1.1.0
122+
pydata-google-auth==1.2.0
121123
pydot3k==1.0.17
122124
pyflakes==2.3.1
123-
Pygments==2.8.1
124-
PyJWT==2.0.1
125+
Pygments==2.9.0
126+
PyJWT==2.1.0
125127
pyparsing==2.4.7
126128
pyrsistent==0.17.3
127-
pytest==6.2.3
129+
pytest==6.2.4
128130
pytest-ordering==0.6
129131
pytest-profiling==1.7.0
130132
python-dateutil==2.8.1
131133
pytz==2021.1
132134
PyYAML==5.4.1
133-
pyzmq==22.0.3
135+
pyzmq==22.1.0
134136
regex==2021.4.4
135137
requests==2.25.1
136138
requests-oauthlib==1.3.0
137139
retrying==1.3.3
138140
rsa==4.7.2
139-
scikit-learn==0.24.1
140-
scipy==1.6.2
141+
scikit-learn==0.24.2
142+
scipy==1.6.3
141143
Send2Trash==1.5.0
142-
six==1.15.0
144+
six==1.16.0
143145
snowballstemmer==2.1.0
144146
soupsieve==2.2.1
145-
Sphinx==3.5.4
147+
Sphinx==4.0.2
146148
sphinx-rtd-theme==0.5.2
147149
sphinxcontrib-applehelp==1.0.2
148150
sphinxcontrib-devhelp==1.0.2
149-
sphinxcontrib-htmlhelp==1.0.3
151+
sphinxcontrib-htmlhelp==2.0.0
150152
sphinxcontrib-jsmath==1.0.1
151153
sphinxcontrib-qthelp==1.0.3
152-
sphinxcontrib-serializinghtml==1.1.4
154+
sphinxcontrib-serializinghtml==1.1.5
153155
statsmodels==0.12.2
154-
terminado==0.9.4
155-
testpath==0.4.4
156+
terminado==0.10.1
157+
testpath==0.5.0
156158
threadpoolctl==2.1.0
157159
timezonefinder==5.2.0
158160
tinynumpy==1.2.1
159161
toml==0.10.2
160162
toolz==0.11.1
161163
tornado==6.1
162-
tqdm==4.60.0
164+
tqdm==4.61.1
163165
traitlets==5.0.5
164-
typed-ast==1.4.3
165-
typing-extensions==3.7.4.3
166-
typing-inspect==0.6.0
167-
ujson==4.0.2
166+
typing-extensions==3.10.0.0
167+
typing-inspect==0.7.1
168168
uritemplate==3.0.1
169-
urllib3==1.26.4
169+
urllib3==1.26.5
170170
wcwidth==0.2.5
171171
webencodings==0.5.1
172172
widgetsnbextension==3.5.1

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# Semantic Versioning (https://semver.org/)
66
_MAJOR_VERSION = "0"
7-
_MINOR_VERSION = "4"
8-
_PATCH_VERSION = "1"
7+
_MINOR_VERSION = "5"
8+
_PATCH_VERSION = "0"
99

1010
_VERSION_SUFFIX = "alpha"
1111

src/python/BuildingControlsSimulator/BuildingModels/test_EnergyPlusBuildingModel.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,19 @@ def setup_class(cls):
3333
cls.eplus_version = os.environ["ENERGYPLUS_INSTALL_VERSION"]
3434

3535
# basic IDF file found in all EnergyPlus installations
36-
# cls.dummy_idf_name = "Furnace.idf"
37-
38-
# cls.dummy_epw_name = "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"
39-
4036
# make test/ dirs
4137
EnergyPlusBuildingModel.make_directories()
42-
# cls.building_model = EnergyPlusBuildingModel(
43-
# idf=IDFPreprocessor(
44-
# idf_file=cls.dummy_idf_path,
45-
# init_temperature=20.0,
46-
# ),
47-
# epw_path=cls.dummy_epw_path,
48-
# step_size_seconds=300,
49-
# )
5038

5139
cls.step_size = 300
5240

53-
# @pytest.mark.parametrize(
54-
# "dummy_idf_name, dummy_epw_path",
55-
# [("Furnace.idf", "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw")],
56-
# )
41+
5742
# pytest requires the obj containing the params to be called "request"
5843
@pytest.fixture(
5944
params=[
6045
(
6146
"Furnace.idf",
6247
"USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw",
6348
),
64-
# (
65-
# "IL_Chicago_gasfurnace_heatedbsmt_IECC_2018.idf.idf",
66-
# "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw",
67-
# ),
6849
]
6950
)
7051
def building_model(self, request):

src/python/BuildingControlsSimulator/Conversions/Conversions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def saturation_vapor_pressure(temperature):
2626

2727
@staticmethod
2828
def relative_humidity_from_dewpoint(temperature, dewpoint):
29-
""" Return RH in % [0-100]"""
29+
"""Return RH in % [0-100]"""
3030
return (
3131
Conversions.saturation_vapor_pressure(dewpoint)
3232
/ Conversions.saturation_vapor_pressure(temperature)

src/python/BuildingControlsSimulator/DataClients/test_GBQFlatFilesSource.py

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
logger = logging.getLogger(__name__)
2020

2121

22+
@pytest.mark.skipif(
23+
(not os.environ.get("TEST_FLATFILES_GBQ_IDENTIFIER"))
24+
or (not os.environ.get("FLATFILE_GOOGLE_CLOUD_PROJECT"))
25+
or (not os.environ.get("FLATFILES_GBQ_TABLE")),
26+
reason="GBQ FlatFiles not configured.",
27+
)
2228
class TestGBQFlatFilesSource:
2329
@classmethod
2430
def setup_class(cls):

src/python/BuildingControlsSimulator/DataClients/test_GCSDYDSource.py

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
logger = logging.getLogger(__name__)
1919

2020

21+
@pytest.mark.skipif(
22+
(not os.environ.get("DYD_GOOGLE_CLOUD_PROJECT"))
23+
or (not os.environ.get("DYD_GCS_URI_BASE")),
24+
reason="GCS output not configured.",
25+
)
2126
class TestGCSDYDSource:
2227
@classmethod
2328
def setup_class(cls):

src/python/BuildingControlsSimulator/DataClients/test_GCSDestination.py

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
logger = logging.getLogger(__name__)
2323

2424

25+
@pytest.mark.skipif(
26+
(not os.environ.get("BCS_GOOGLE_CLOUD_PROJECT"))
27+
or (not os.environ.get("BCS_OUTPUT_GCS_URI_BASE")),
28+
reason="GCS output not configured.",
29+
)
2530
class TestGCSDestination:
2631
@classmethod
2732
def setup_class(cls):

src/python/BuildingControlsSimulator/DataClients/test_GCSFlatFilesSource.py

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
logger = logging.getLogger(__name__)
2020

2121

22+
@pytest.mark.skipif(
23+
(not os.environ.get("FLATFILE_GOOGLE_CLOUD_PROJECT"))
24+
or (not os.environ.get("FLATFILES_GCS_URI_BASE")),
25+
reason="GCS output not configured.",
26+
)
2227
class TestGCSFlatFilesSource:
2328
@classmethod
2429
def setup_class(cls):
238 KB
Binary file not shown.

0 commit comments

Comments
 (0)