Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages-custom
Browse files Browse the repository at this point in the history
  • Loading branch information
dhblum committed Jul 30, 2024
2 parents 8076617 + 3bff10e commit 412cdbb
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 62 deletions.
45 changes: 21 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,68 +28,65 @@ before_script:
jobs:
include:
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_parser
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_data
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_forecast
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_kpis
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1 rdflib==6.3.2 bacpypes==0.18.7
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1 rdflib==6.3.2 bacpypes==0.18.7
script: cd testing && make build_jm_image && make test_bacnet
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_testcase
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_readme_commands
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_testcase1
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_testcase2
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_testcase3
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_bestest_air
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_bestest_hydronic
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_bestest_hydronic_heat_pump
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_singlezone_commercial_hydronic
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && make test_twozone_apartment_hydronic
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_office_simple_air ARG="-s test_peak_heat_day,test_typical_heat_day"
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_office_simple_air ARG="-s test_peak_cool_day,test_typical_cool_day,test_mix_day"
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_office_simple_air ARG="-s API"
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_residential_hydronic ARG="-s test_peak_heat_day,test_shoulder"
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_residential_hydronic ARG="-s test_typical_heat_day,test_summer"
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_residential_hydronic ARG="-s API"
- python: 2.7
install: pip install --upgrade pip && pip install pandas==0.24.2 numpy==1.16.6 matplotlib==2.1.1 requests==2.18.4
script: cd testing && make test_python2
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ ENV HOME /home/user

# Download and install miniconda and pyfmi
RUN cd $HOME && \
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh -O $HOME/miniconda.sh && \
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_24.3.0-0-Linux-x86_64.sh -O $HOME/miniconda.sh && \
/bin/bash $HOME/miniconda.sh -b -p $HOME/miniconda && \
. miniconda/bin/activate && \
conda update -n base -c defaults conda && \
conda create --name pyfmi3 python=3.10 -y && \
conda activate pyfmi3 && \
conda install -c conda-forge pyfmi=2.11 -y && \
pip install flask-restful==0.3.9 werkzeug==2.2.3 && \
conda install pandas==1.5.3 flask_cors==3.0.10 matplotlib==3.7.1 requests==2.28.1
conda install -c conda-forge pyfmi=2.12 -y && \
pip install flask-restful==0.3.9 werkzeug==2.2.3 pandas==1.5.3 flask_cors==3.0.10 scipy==1.13.0 matplotlib==3.7.1 requests==2.28.1

WORKDIR $HOME

Expand Down
12 changes: 11 additions & 1 deletion data/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,20 @@ def _append_csv_data(self):

# Get zone and boundary data keys allowed
zon_keys, bou_keys = self._get_zone_and_boundary_keys()
weather_keys = list(self.categories['weather'].keys())

# Search for .csv files in the resources folder
for f in self.files:
if f.endswith('.csv'):
df = pd.read_csv(f, comment='#')
cols = df.keys()

# Check if all weather variables are included in weather.csv
if 'weather' in f:
if not set(cols) <= set(weather_keys):
warnings.warn('The file weather.csv is missing '\
'the following variables '+str(set(weather_keys).difference(set(cols)))+'.', Warning)

if 'time' in cols:
for col in cols.drop('time'):
# Raise error if col already appended
Expand Down Expand Up @@ -427,7 +435,8 @@ def load_data_and_jsons(self):

# Get zone and boundary data keys allowed
zon_keys, bou_keys = self._get_zone_and_boundary_keys()



# Initialize test case data frame
self.case.data = \
pd.DataFrame(index=index).rename_axis('time')
Expand All @@ -436,6 +445,7 @@ def load_data_and_jsons(self):
for f in files:
df = pd.read_csv(z_fmu.open(f))
cols = df.keys()

if 'time' in cols:
for col in cols.drop('time'):
# Check that column has any of the allowed data keys
Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
License
=======

BOPTEST. Copyright (c) 2018-2023
BOPTEST. Copyright (c) 2018-2024
International Building Performance Simulation Association (IBPSA) and
contributors.
All rights reserved.
Expand Down
12 changes: 12 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release Notes

## BOPTEST v0.6.0-dev

Released on xx/xx/xxxx.

**The following changes are backwards-compatible and do not significantly change benchmark results:**

- Update pyfmi version from 2.11 to 2.12 and miniconda version from py310_23.1.0-1-Linux-x86_64 to py310_24.3.0-0-Linux-x86_64. This is for [#643](https://github.com/ibpsa/project1-boptest/issues/643).
- Remove support and unit testing of example python controllers using Python 2. This is for [#634](https://github.com/ibpsa/project1-boptest/issues/634).
- Add a warning message upon test case compilation in ``data/data_manager.py`` that is displayed if any of the weather variables in ``data/categories.json`` is not in ``<testcase_folder>/resources/weather.csv``. This is for [#500](https://github.com/ibpsa/project1-boptest/issues/500).
- Remove matplotlib requirement from travis unit testing. This is for [#655](https://github.com/ibpsa/project1-boptest/issues/655).
- Specify version of scipy to 1.13.0 in test case Dockerfile. This is for [#657](https://github.com/ibpsa/project1-boptest/issues/657).

## BOPTEST v0.6.0

Released on 04/03/2024.
Expand Down
19 changes: 0 additions & 19 deletions testing/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -275,25 +275,6 @@ test_readme_commands:
curl http://127.0.0.1:5000/advance -d '{"oveTSetRooHea_u":293.15,"oveTSetRooHea_activate":1, "oveTSetRooCoo_activate":1,"oveTSetRooCoo_u":298.15}' -H "Content-Type: application/json"
cd .. && TESTCASE=testcase2 docker-compose down

test_python2:
# Test example controllers written in python run with python 2
# Test testcase1
cd .. && TESTCASE=testcase1 docker-compose up -d
python sleep10.py
cd ../examples/python && python testcase1.py
cd ../examples/python && python testcase1_scenario.py
cd .. && TESTCASE=testcase1 docker-compose down
# Test testcase2
cd .. && TESTCASE=testcase2 docker-compose up -d
python sleep10.py
cd ../examples/python && python testcase2.py
cd .. && TESTCASE=testcase2 docker-compose down
# Test testcase3
cd .. && TESTCASE=testcase3 docker-compose up -d
python sleep10.py
cd ../examples/python && python testcase3.py
cd .. && TESTCASE=testcase32 docker-compose down

###############################################################################

# Run all tests
Expand Down
2 changes: 1 addition & 1 deletion testing/references/bestest_air/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0\n", "buildingType": {"uid": "bestest_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.02730719968271573, "emis_tot": 0.785590772991245, "ener_tot": 3.7227262062358055, "idis_tot": 1221.6529527806554, "pdih_tot": null, "pele_tot": 0.010216143907980911, "pgas_tot": 0.12133848299596474, "tdis_tot": 5.687288484421467, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0-dev\n", "buildingType": {"uid": "bestest_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.02730719968271573, "emis_tot": 0.785590772991245, "ener_tot": 3.7227262062358055, "idis_tot": 1221.6529527806554, "pdih_tot": null, "pele_tot": 0.010216143907980911, "pgas_tot": 0.12133848299596474, "tdis_tot": 5.687288484421467, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/bestest_hydronic/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0\n", "buildingType": {"uid": "bestest_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.4660775943925745, "emis_tot": 1.6291465071977262, "ener_tot": 9.00349952561408, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.00025517153990852024, "pgas_tot": 0.11798036181564837, "tdis_tot": 18.21783776691252, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0-dev\n", "buildingType": {"uid": "bestest_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.4660775943925745, "emis_tot": 1.6291465071977262, "ener_tot": 9.00349952561408, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.00025517153990852024, "pgas_tot": 0.11798036181564837, "tdis_tot": 18.21783776691252, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/bestest_hydronic_heat_pump/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0\n", "buildingType": {"uid": "bestest_hydronic_heat_pump"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.8827810790417875, "emis_tot": 0.5807880184554309, "ener_tot": 3.4777725656013834, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.01891307030662192, "pgas_tot": null, "tdis_tot": 8.381692942513078, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0-dev\n", "buildingType": {"uid": "bestest_hydronic_heat_pump"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.8827810790417875, "emis_tot": 0.5807880184554309, "ener_tot": 3.4777725656013834, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.01891307030662192, "pgas_tot": null, "tdis_tot": 8.381692942513078, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/multizone_office_simple_air/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0\n", "buildingType": {"uid": "multizone_office_simple_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.1653760825456517, "emis_tot": 0.6104864888960548, "ener_tot": 1.7902829586394566, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03334236916573142, "pgas_tot": null, "tdis_tot": 11.835570350490515, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0-dev\n", "buildingType": {"uid": "multizone_office_simple_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.1653760825456517, "emis_tot": 0.6104864888960548, "ener_tot": 1.7902829586394566, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03334236916573142, "pgas_tot": null, "tdis_tot": 11.835570350490515, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0\n", "buildingType": {"uid": "multizone_residential_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.7911663939870216, "emis_tot": 1.4254044254077105, "ener_tot": 8.140200481262813, "idis_tot": 9114.558476792468, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532532, "tdis_tot": 22.00196096128404, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.6.0-dev\n", "buildingType": {"uid": "multizone_residential_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.7911663939870216, "emis_tot": 1.4254044254077105, "ener_tot": 8.140200481262813, "idis_tot": 9114.558476792468, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532532, "tdis_tot": 22.00196096128404, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
Loading

0 comments on commit 412cdbb

Please sign in to comment.