From bd1bb5c85c14a7ea8833c8371fdf826d3f10442b Mon Sep 17 00:00:00 2001 From: David Blum Date: Mon, 25 Nov 2024 07:37:20 -0800 Subject: [PATCH 01/14] Update version.txt --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index faef31a43..e1bde8025 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.7.0 +0.7.0-dev From 91ba8d427ec120829e4b8dc167d79322a0ec08b6 Mon Sep 17 00:00:00 2001 From: David Blum Date: Mon, 25 Nov 2024 07:38:13 -0800 Subject: [PATCH 02/14] Update releasenotes.md --- releasenotes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/releasenotes.md b/releasenotes.md index 25486eb4c..0bf055ede 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,5 +1,10 @@ # Release Notes +## BOPTEST v0.7.0-dev + +Released on xx/xx/xxxx. + + ## BOPTEST v0.7.0 Released on 11/25/2024. From 6a50eb17b3190ba3034bd08365a44d1c41ae51dc Mon Sep 17 00:00:00 2001 From: David Blum Date: Mon, 25 Nov 2024 07:41:16 -0800 Subject: [PATCH 03/14] Update versions in testing references --- testing/references/bestest_air/submit.json | 2 +- testing/references/bestest_hydronic/submit.json | 2 +- testing/references/bestest_hydronic_heat_pump/submit.json | 2 +- testing/references/multizone_office_simple_air/submit.json | 2 +- testing/references/multizone_office_simple_hydronic/submit.json | 2 +- testing/references/multizone_residential_hydronic/submit.json | 2 +- testing/references/singlezone_commercial_hydronic/submit.json | 2 +- testing/references/testcase1/submit.json | 2 +- testing/references/testcase2/submit.json | 2 +- testing/references/testcase3/submit.json | 2 +- testing/references/twozone_apartment_hydronic/submit.json | 2 +- testing/utilities.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/testing/references/bestest_air/submit.json b/testing/references/bestest_air/submit.json index 5dfb9897a..97137e01a 100644 --- a/testing/references/bestest_air/submit.json +++ b/testing/references/bestest_air/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.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.7.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"}]}} diff --git a/testing/references/bestest_hydronic/submit.json b/testing/references/bestest_hydronic/submit.json index 787d0645e..7e7abfa7b 100644 --- a/testing/references/bestest_hydronic/submit.json +++ b/testing/references/bestest_hydronic/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.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.7.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"}]}} diff --git a/testing/references/bestest_hydronic_heat_pump/submit.json b/testing/references/bestest_hydronic_heat_pump/submit.json index c0d4bb281..481e96540 100644 --- a/testing/references/bestest_hydronic_heat_pump/submit.json +++ b/testing/references/bestest_hydronic_heat_pump/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.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.7.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"}]}} diff --git a/testing/references/multizone_office_simple_air/submit.json b/testing/references/multizone_office_simple_air/submit.json index 8d28085ba..f48d0a377 100644 --- a/testing/references/multizone_office_simple_air/submit.json +++ b/testing/references/multizone_office_simple_air/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.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.7.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"}]}} diff --git a/testing/references/multizone_office_simple_hydronic/submit.json b/testing/references/multizone_office_simple_hydronic/submit.json index c78fb4feb..8718e89be 100644 --- a/testing/references/multizone_office_simple_hydronic/submit.json +++ b/testing/references/multizone_office_simple_hydronic/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "multizone_office_simple_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.1635567919951241, "emis_tot": 0.20668064092366395, "ener_tot": 1.073923612094895, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.01725481348883811, "pgas_tot": null, "tdis_tot": 4.834027893201376, "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.7.0-dev\n", "buildingType": {"uid": "multizone_office_simple_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.1635567919951241, "emis_tot": 0.20668064092366395, "ener_tot": 1.073923612094895, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.01725481348883811, "pgas_tot": null, "tdis_tot": 4.834027893201376, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/multizone_residential_hydronic/submit.json b/testing/references/multizone_residential_hydronic/submit.json index 9a5b0dc15..6a9148b69 100644 --- a/testing/references/multizone_residential_hydronic/submit.json +++ b/testing/references/multizone_residential_hydronic/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "multizone_residential_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.8145745610598426, "emis_tot": 1.4321317708442538, "ener_tot": 8.24351289540961, "idis_tot": 9141.559410046144, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532532, "tdis_tot": 21.408637265613642, "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.7.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.8145745610598426, "emis_tot": 1.4321317708442538, "ener_tot": 8.24351289540961, "idis_tot": 9141.559410046144, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532532, "tdis_tot": 21.408637265613642, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/singlezone_commercial_hydronic/submit.json b/testing/references/singlezone_commercial_hydronic/submit.json index 38699ec10..e5a8ed21c 100644 --- a/testing/references/singlezone_commercial_hydronic/submit.json +++ b/testing/references/singlezone_commercial_hydronic/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "singlezone_commercial_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.2631876743024744, "emis_tot": 0.3835816361039315, "ener_tot": 3.216796741203613, "idis_tot": 5.423390226236728, "pdih_tot": 0.08966856983946767, "pele_tot": 0.004907797325142573, "pgas_tot": null, "tdis_tot": 7.995222085010505, "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.7.0-dev\n", "buildingType": {"uid": "singlezone_commercial_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.2631876743024744, "emis_tot": 0.3835816361039315, "ener_tot": 3.216796741203613, "idis_tot": 5.423390226236728, "pdih_tot": 0.08966856983946767, "pele_tot": 0.004907797325142573, "pgas_tot": null, "tdis_tot": 7.995222085010505, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/testcase1/submit.json b/testing/references/testcase1/submit.json index 81e4d7367..fa218dc05 100644 --- a/testing/references/testcase1/submit.json +++ b/testing/references/testcase1/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "testcase1"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.8992178091703856, "emis_tot": 2.569193740486816, "ener_tot": 12.845968702434082, "idis_tot": 7118.611500670603, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.11536491775526585, "tdis_tot": 503.9889403913656, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_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.7.0-dev\n", "buildingType": {"uid": "testcase1"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.8992178091703856, "emis_tot": 2.569193740486816, "ener_tot": 12.845968702434082, "idis_tot": 7118.611500670603, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.11536491775526585, "tdis_tot": 503.9889403913656, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/testcase2/submit.json b/testing/references/testcase2/submit.json index 279b9ac1a..eb3799790 100644 --- a/testing/references/testcase2/submit.json +++ b/testing/references/testcase2/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "testcase2"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 1.5461528250629257, "emis_tot": 5.779869004038503, "ener_tot": 11.559738008077005, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.08727961999507106, "pgas_tot": null, "tdis_tot": 0.5880089705328525, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_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.7.0-dev\n", "buildingType": {"uid": "testcase2"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 1.5461528250629257, "emis_tot": 5.779869004038503, "ener_tot": 11.559738008077005, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.08727961999507106, "pgas_tot": null, "tdis_tot": 0.5880089705328525, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/testcase3/submit.json b/testing/references/testcase3/submit.json index 00198495c..8fa12b7cf 100644 --- a/testing/references/testcase3/submit.json +++ b/testing/references/testcase3/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "testcase3"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.9674593335412667, "emis_tot": 2.7641695244036195, "ener_tot": 13.820847622018096, "idis_tot": 3606.22674562425, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.12017492256526957, "tdis_tot": 443.7163025810678, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_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.7.0-dev\n", "buildingType": {"uid": "testcase3"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.9674593335412667, "emis_tot": 2.7641695244036195, "ener_tot": 13.820847622018096, "idis_tot": 3606.22674562425, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.12017492256526957, "tdis_tot": 443.7163025810678, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/references/twozone_apartment_hydronic/submit.json b/testing/references/twozone_apartment_hydronic/submit.json index 8a0895875..7200416ab 100644 --- a/testing/references/twozone_apartment_hydronic/submit.json +++ b/testing/references/twozone_apartment_hydronic/submit.json @@ -1 +1 @@ -{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.7.0\n", "buildingType": {"uid": "twozone_apartment_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.20051259900734056, "emis_tot": 0.32921968567745863, "ener_tot": 1.055191300248265, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03982223355202276, "pgas_tot": null, "tdis_tot": 37.36270794223908, "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.7.0-dev\n", "buildingType": {"uid": "twozone_apartment_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "forecastParameters": {}, "isShared": true, "kpis": {"cost_tot": 0.20051259900734056, "emis_tot": 0.32921968567745863, "ener_tot": 1.055191300248265, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03982223355202276, "pgas_tot": null, "tdis_tot": 37.36270794223908, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}} diff --git a/testing/utilities.py b/testing/utilities.py index 47202253d..7b319d247 100644 --- a/testing/utilities.py +++ b/testing/utilities.py @@ -443,7 +443,7 @@ def test_get_version(self): result = requests.get('{0}/version'.format(self.url)).json()['payload'] # Create a regex object as three decimal digits seperated by period r_num = re.compile('\d.\d.\d') - r_dev = re.compile('0.6.0-dev\n') + r_dev = re.compile('0.7.0-dev\n') # Test that the returned version matches the expected string format if r_num.match(result['version']) or r_dev.match(result['version']): self.assertTrue(True) From 53210eb6728f0273f69cf0ebef1222e489717d82 Mon Sep 17 00:00:00 2001 From: David Blum Date: Wed, 4 Dec 2024 11:28:52 -0500 Subject: [PATCH 04/14] Update README.md --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a4d7a6b9..1549524ab 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,13 @@ BOPTEST can be deployed and used on your own computing resource by following the 2) Install [Docker](https://docs.docker.com/get-docker/). -3) Use Docker to build and run BOPTEST. In the root of this repository, run the following command. Note that if you want to be able to deploy multiple test cases at the same time, append the argument ``--scale worker=n`` where ``n`` equals the number of test cases you want to be able to have running at the same time. +3) Use Docker to build and run BOPTEST. In the root of this repository, run the following command: ``docker compose up web worker provision`` +- If you want to be able to deploy multiple test cases at the same time, append the argument ``--scale worker=n`` to the command above where ``n`` equals the number of test cases you want to be able to have running at the same time. +- If no request is made to a running test case for some time, the test case will be automatically stopped and the associated worker will be freed up. By default this timeout is 15 minutes. If you would like to change this timeout period, you can edit the environment variable ``BOPTEST_TIMEOUT`` in the ``.env`` file before starting BOPTEST with the command above. + 4) In a separate process, use the API below to first select a test case to run, and then interact with it using your test controller. Send API requests to ``http://127.0.0.1:80/`` 5) Shutdown BOPTEST by the command ``docker compose down`` executed in the root directory of this repository. NOTE: This is the best and most complete way to shutdown BOPTEST to prevent issues upon redeployment. @@ -139,13 +142,17 @@ as a hook on all commits by calling `pre-commit install` in the root directory o ## Additional Software -### OpenAI-Gym Environment -An OpenAI-Gym environment for BOPTEST is implemented in [ibpsa/project1-boptest-gym](https://github.com/ibpsa/project1-boptest-gym). +### OpenAI-Gym Environment Interface +An OpenAI-Gym environment interface for BOPTEST is implemented in [ibpsa/project1-boptest-gym](https://github.com/ibpsa/project1-boptest-gym). See the documentation there for getting started. ### BACnet Interface A BACnet interface for BOPTEST is implemented in the ``/bacnet`` directory of this repository. See the ``/bacnet/README.md`` there for getting started. +### Julia Interface +A Julia interface for BOPTEST is implemented as a Julia package in [BOPTestAPI.jl](https://terion-io.github.io/BOPTestAPI.jl/stable/). +See the documentation there for getting started. + ### Results Dashboard A proposed BOPTEST home page and dashboard for creating accounts and sharing results is published here https://xd.adobe.com/view/0e0c63d4-3916-40a9-5e5c-cc03f853f40a-783d/. From 7a6caa7b1b58b7b8441286c155b147ef061baafb Mon Sep 17 00:00:00 2001 From: David Blum Date: Wed, 4 Dec 2024 11:36:56 -0500 Subject: [PATCH 05/14] Update releasenotes.md --- releasenotes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/releasenotes.md b/releasenotes.md index 0bf055ede..65f413877 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -4,6 +4,11 @@ Released on xx/xx/xxxx. +**The following changes are backwards-compatible and do not significantly change benchmark results:** + +- Add note to ``README.md`` about using environment variable ``BOPTEST_TIMEOUT`` to edit the timeout period for idle workers. This is for [#715](https://github.com/ibpsa/project1-boptest/issues/715). +- Add note to ``README.md`` about a Julia interface implemented by [BOPTestAPI.jl](https://terion-io.github.io/BOPTestAPI.jl/stable/). This is for [#707](https://github.com/ibpsa/project1-boptest/issues/707). + ## BOPTEST v0.7.0 From f5e2310309ce16943851d86b081238d7896cce55 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Thu, 26 Dec 2024 09:46:38 -0700 Subject: [PATCH 06/14] add ci to build and test service containers --- .github/workflows/build_test_containers.yml | 96 +++++++++++++++++++++ ci/publish_to_docker.sh | 32 +++++++ ci/publish_to_github.sh | 29 +++++++ 3 files changed, 157 insertions(+) create mode 100644 .github/workflows/build_test_containers.yml create mode 100755 ci/publish_to_docker.sh create mode 100755 ci/publish_to_github.sh diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml new file mode 100644 index 000000000..05af44d6f --- /dev/null +++ b/.github/workflows/build_test_containers.yml @@ -0,0 +1,96 @@ +name: Build, test and publish containers + +on: + pull_request: + branches: + - '*' + push: + branches: + - '*' + tags: + - '*' + +jobs: + + simulation-tests: + name: Build containers and run boptest simulation tests + runs-on: ubuntu-22.04 + timeout-minutes: 240 + env: + COMPOSE_PROJECT_NAME: boptest_service + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + + - name: Build and run stack + run: | + cd service + docker compose build + docker compose up -d web worker + + - name: dump docker logs + uses: jwalton/gh-docker-logs@v1 + + - name: Upload test cases to minio + run: | + # The provision script will wait for the web service to be available, + # so there is no need for an external wait-for-it script + cd service + docker compose run --no-deps provision + curl http://localhost/testcases + + - name: Run example + run: | + cd service + python --version + pip install requests matplotlib numpy pandas + PYTHONPATH=$GITHUB_WORKSPACE + echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV + # Storing PYTHONPATH above doesn't work for python so setting it below at run + cd boptest && PYTHONPATH=$PWD python examples/python/testcase1.py + + - name: Run tests + run: | + cd service + docker compose run --no-deps test + + - name: Dump docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v1 + +#------------------------- Push to GitHub registry (disabled) ----------------------------- +# +# - name: Log in to the GitHub container registry +# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 +# with: +# registry: ghcr.io +# username: ${{ github.actor }} +# password: ${{ secrets.GH_REGISTRY }} + +# - name: Publish docker images to GitHub Registry +# if: | +# github.ref == 'refs/heads/develop' || +# contains(github.ref, 'refs/tags') +# shell: bash +# run: ci/publish_to_github.sh + +#------------------ Push to docker hub (disabled) ------------------------------------- + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Publish docker images to Docker Hub + if: | + github.ref == 'refs/heads/develop' || + github.ref == 'refs/heads/experimental' || + contains(github.ref, 'refs/tags') + shell: bash + run: ci/publish_to_docker.sh diff --git a/ci/publish_to_docker.sh b/ci/publish_to_docker.sh new file mode 100755 index 000000000..02357d13a --- /dev/null +++ b/ci/publish_to_docker.sh @@ -0,0 +1,32 @@ +# load .env defines in root of repo +export $(egrep -v '^#' .env | xargs) +export WEB_REGISTRY_URI=boptest_service-web +export WORKER_REGISTRY_URI=boptest_service-worker +export DOCKER_HUB_WEB_REGISTRY_URI=nrel/boptest-web +export DOCKER_HUB_WORKER_REGISTRY_URI=nrel/boptest-worker + +if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then + export VERSION_TAG="develop" + echo "The docker tag is set to: ${VERSION_TAG}" +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then + export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" + echo "The docker tag is set to: ${VERSION_TAG}" +elif [[ "${GITHUB_REF}" == "refs/heads/experimental" ]]; then + export VERSION_TAG="experimental" + echo "The docker tag is set to: ${VERSION_TAG}" +fi + + if [[ "${VERSION_TAG}" == "develop" ]] || [[ "${VERSION_TAG}" =~ ^v[0-9].* ]] || [[ "${VERSION_TAG}" == "experimental" ]] ; then + + docker image ls + docker tag ${WEB_REGISTRY_URI}:latest ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + docker tag ${WORKER_REGISTRY_URI}:latest ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + + echo "pushing ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}" + docker push ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + echo "pushing ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}" + docker push ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + +fi + +exit $exit_status diff --git a/ci/publish_to_github.sh b/ci/publish_to_github.sh new file mode 100755 index 000000000..9a9bea218 --- /dev/null +++ b/ci/publish_to_github.sh @@ -0,0 +1,29 @@ +# load .env defines in root of repo +export $(egrep -v '^#' .env | xargs) +export GITHUB_WEB_REGISTRY_URI=ghcr.io/NREL/boptest-web +export GITHUB_WORKER_REGISTRY_URI=ghcr.io/NREL/boptest-worker + +if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then + export VERSION_TAG="develop" + echo "The docker tag is set to: ${VERSION_TAG}" +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then + export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" + echo "The docker tag is set to: ${VERSION_TAG}" +# use conditional below if you want to build a custom branch +# elif [[] "${GITHUB_REF}" == "refs/heads/boptest-service-custom" ]]; then +# export VERSION_TAG="experimental" +fi + + if [[ "${VERSION_TAG}" == "develop" ]] || [[ "${VERSION_TAG}" =~ ^v[0-9].* ]] || [[ "${VERSION_TAG}" == "experimental" ]] ; then + + docker tag ${WEB_REGISTRY_URI}:latest ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + docker tag ${WORKER_REGISTRY_URI}:latest ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + + echo "pushing ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}" + docker push ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + echo "pushing ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}" + docker push ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) + +fi + +exit $exit_status From 11dc6ef8bba5656b78c1f64064d7ade37f0b1bf8 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Thu, 26 Dec 2024 10:00:01 -0700 Subject: [PATCH 07/14] update ci for new repodir structure --- .github/workflows/build_test_containers.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index 05af44d6f..aad56431c 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -46,13 +46,12 @@ jobs: - name: Run example run: | - cd service python --version pip install requests matplotlib numpy pandas PYTHONPATH=$GITHUB_WORKSPACE echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV # Storing PYTHONPATH above doesn't work for python so setting it below at run - cd boptest && PYTHONPATH=$PWD python examples/python/testcase1.py + PYTHONPATH=$PWD python examples/python/testcase1.py - name: Run tests run: | From 38eaa0ad6e8b5b192c0b01b035b1b0e5555ef70c Mon Sep 17 00:00:00 2001 From: tijcolem Date: Thu, 26 Dec 2024 10:22:01 -0700 Subject: [PATCH 08/14] service already had cifolder scripts --- .github/workflows/build_test_containers.yml | 2 +- ci/publish_to_docker.sh | 32 --------------------- ci/publish_to_github.sh | 29 ------------------- 3 files changed, 1 insertion(+), 62 deletions(-) delete mode 100755 ci/publish_to_docker.sh delete mode 100755 ci/publish_to_github.sh diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index aad56431c..2b44563f6 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -92,4 +92,4 @@ jobs: github.ref == 'refs/heads/experimental' || contains(github.ref, 'refs/tags') shell: bash - run: ci/publish_to_docker.sh + run: service/ci/publish_to_docker.sh diff --git a/ci/publish_to_docker.sh b/ci/publish_to_docker.sh deleted file mode 100755 index 02357d13a..000000000 --- a/ci/publish_to_docker.sh +++ /dev/null @@ -1,32 +0,0 @@ -# load .env defines in root of repo -export $(egrep -v '^#' .env | xargs) -export WEB_REGISTRY_URI=boptest_service-web -export WORKER_REGISTRY_URI=boptest_service-worker -export DOCKER_HUB_WEB_REGISTRY_URI=nrel/boptest-web -export DOCKER_HUB_WORKER_REGISTRY_URI=nrel/boptest-worker - -if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then - export VERSION_TAG="develop" - echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then - export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" - echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" == "refs/heads/experimental" ]]; then - export VERSION_TAG="experimental" - echo "The docker tag is set to: ${VERSION_TAG}" -fi - - if [[ "${VERSION_TAG}" == "develop" ]] || [[ "${VERSION_TAG}" =~ ^v[0-9].* ]] || [[ "${VERSION_TAG}" == "experimental" ]] ; then - - docker image ls - docker tag ${WEB_REGISTRY_URI}:latest ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - docker tag ${WORKER_REGISTRY_URI}:latest ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - - echo "pushing ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}" - docker push ${DOCKER_HUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - echo "pushing ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}" - docker push ${DOCKER_HUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - -fi - -exit $exit_status diff --git a/ci/publish_to_github.sh b/ci/publish_to_github.sh deleted file mode 100755 index 9a9bea218..000000000 --- a/ci/publish_to_github.sh +++ /dev/null @@ -1,29 +0,0 @@ -# load .env defines in root of repo -export $(egrep -v '^#' .env | xargs) -export GITHUB_WEB_REGISTRY_URI=ghcr.io/NREL/boptest-web -export GITHUB_WORKER_REGISTRY_URI=ghcr.io/NREL/boptest-worker - -if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then - export VERSION_TAG="develop" - echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then - export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" - echo "The docker tag is set to: ${VERSION_TAG}" -# use conditional below if you want to build a custom branch -# elif [[] "${GITHUB_REF}" == "refs/heads/boptest-service-custom" ]]; then -# export VERSION_TAG="experimental" -fi - - if [[ "${VERSION_TAG}" == "develop" ]] || [[ "${VERSION_TAG}" =~ ^v[0-9].* ]] || [[ "${VERSION_TAG}" == "experimental" ]] ; then - - docker tag ${WEB_REGISTRY_URI}:latest ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - docker tag ${WORKER_REGISTRY_URI}:latest ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - - echo "pushing ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}" - docker push ${GITHUB_WEB_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - echo "pushing ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}" - docker push ${GITHUB_WORKER_REGISTRY_URI}:${VERSION_TAG}; (( exit_status = exit_status || $? )) - -fi - -exit $exit_status From 4a1efe872784274c201bf54b738aefaa35c828f1 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Thu, 26 Dec 2024 11:15:20 -0700 Subject: [PATCH 09/14] tags that have appended -service will be pushed to docker hub and/or github registry --- service/ci/publish_to_docker.sh | 2 +- service/ci/publish_to_github.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/ci/publish_to_docker.sh b/service/ci/publish_to_docker.sh index 02357d13a..8e6a7fa1c 100755 --- a/service/ci/publish_to_docker.sh +++ b/service/ci/publish_to_docker.sh @@ -8,7 +8,7 @@ export DOCKER_HUB_WORKER_REGISTRY_URI=nrel/boptest-worker if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then export VERSION_TAG="develop" echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].*-service ]]; then export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" echo "The docker tag is set to: ${VERSION_TAG}" elif [[ "${GITHUB_REF}" == "refs/heads/experimental" ]]; then diff --git a/service/ci/publish_to_github.sh b/service/ci/publish_to_github.sh index 792db8ea9..6e54782a5 100755 --- a/service/ci/publish_to_github.sh +++ b/service/ci/publish_to_github.sh @@ -6,7 +6,7 @@ export GITHUB_WORKER_REGISTRY_URI=ghcr.io/NREL/boptest-worker if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then export VERSION_TAG="develop" echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].*-service ]]; then export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" echo "The docker tag is set to: ${VERSION_TAG}" # use conditional below if you want to build a custom branch From 28a365b93638e0bfdf47a6d6c0130ae6e7cbcf6a Mon Sep 17 00:00:00 2001 From: tijcolem Date: Fri, 10 Jan 2025 10:01:20 -0700 Subject: [PATCH 10/14] Changing docker registry from docker hub to github projects Cleanup exisiting bash scripts For tags no longer using "-service" and just using the boptest tag name for both boptest library and the web and worker images. --- .github/workflows/build_test_containers.yml | 46 ++++++++++----------- service/ci/publish_to_docker.sh | 7 ++-- service/ci/publish_to_github.sh | 16 ++++--- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index 2b44563f6..0302c198c 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -63,33 +63,33 @@ jobs: uses: jwalton/gh-docker-logs@v1 #------------------------- Push to GitHub registry (disabled) ----------------------------- -# -# - name: Log in to the GitHub container registry -# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 -# with: -# registry: ghcr.io -# username: ${{ github.actor }} -# password: ${{ secrets.GH_REGISTRY }} - -# - name: Publish docker images to GitHub Registry -# if: | -# github.ref == 'refs/heads/develop' || -# contains(github.ref, 'refs/tags') -# shell: bash -# run: ci/publish_to_github.sh -#------------------ Push to docker hub (disabled) ------------------------------------- - - - name: Log in to Docker Hub + - name: Log in to the GitHub container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Publish docker images to Docker Hub + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GH_REGISTRY }} + + - name: Publish docker images to GitHub Registry if: | github.ref == 'refs/heads/develop' || - github.ref == 'refs/heads/experimental' || contains(github.ref, 'refs/tags') shell: bash - run: service/ci/publish_to_docker.sh + run: ci/publish_to_github.sh + +#------------------ Push to docker hub (disabled) ------------------------------------- +# +# - name: Log in to Docker Hub +# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 +# with: +# username: ${{ secrets.DOCKER_USER }} +# password: ${{ secrets.DOCKER_PASS }} +# +# - name: Publish docker images to Docker Hub +# if: | +# github.ref == 'refs/heads/develop' || +# github.ref == 'refs/heads/experimental' || +# contains(github.ref, 'refs/tags') +# shell: bash +# run: service/ci/publish_to_docker.sh diff --git a/service/ci/publish_to_docker.sh b/service/ci/publish_to_docker.sh index 8e6a7fa1c..62ab3d998 100755 --- a/service/ci/publish_to_docker.sh +++ b/service/ci/publish_to_docker.sh @@ -2,13 +2,14 @@ export $(egrep -v '^#' .env | xargs) export WEB_REGISTRY_URI=boptest_service-web export WORKER_REGISTRY_URI=boptest_service-worker -export DOCKER_HUB_WEB_REGISTRY_URI=nrel/boptest-web -export DOCKER_HUB_WORKER_REGISTRY_URI=nrel/boptest-worker +export GITHUB_ORG=tijcolem +export DOCKER_HUB_WEB_REGISTRY_URI=$GITHUB_ORG/boptest-web +export DOCKER_HUB_WORKER_REGISTRY_URI=$GITHUB_ORG/boptest-worker if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then export VERSION_TAG="develop" echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].*-service ]]; then +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" echo "The docker tag is set to: ${VERSION_TAG}" elif [[ "${GITHUB_REF}" == "refs/heads/experimental" ]]; then diff --git a/service/ci/publish_to_github.sh b/service/ci/publish_to_github.sh index 6e54782a5..598c1d3db 100755 --- a/service/ci/publish_to_github.sh +++ b/service/ci/publish_to_github.sh @@ -1,17 +1,21 @@ # load .env defines in root of repo export $(egrep -v '^#' .env | xargs) -export GITHUB_WEB_REGISTRY_URI=ghcr.io/NREL/boptest-web -export GITHUB_WORKER_REGISTRY_URI=ghcr.io/NREL/boptest-worker +export WEB_REGISTRY_URI=boptest_service-web +export WORKER_REGISTRY_URI=boptest_service-worker +export GITHUB_ORG=tijcolem +export GITHUB_WEB_REGISTRY_URI=ghcr.io/$GITHUB_ORG/boptest-web +export GITHUB_WORKER_REGISTRY_URI=ghcr.io/$GITHUB_ORG/boptest-worker + if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then export VERSION_TAG="develop" echo "The docker tag is set to: ${VERSION_TAG}" -elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].*-service ]]; then +elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" echo "The docker tag is set to: ${VERSION_TAG}" -# use conditional below if you want to build a custom branch -# elif [[] "${GITHUB_REF}" == "refs/heads/boptest-service-custom" ]]; then -# export VERSION_TAG="experimental" +elif [[ "${GITHUB_REF}" == "refs/heads/experimental" ]]; then + export VERSION_TAG="experimental" + echo "The docker tag is set to: ${VERSION_TAG}" fi if [[ "${VERSION_TAG}" == "develop" ]] || [[ "${VERSION_TAG}" =~ ^v[0-9].* ]] || [[ "${VERSION_TAG}" == "experimental" ]] ; then From 2f2bace998267a511c1a5cabe978599168949ee4 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Fri, 10 Jan 2025 10:49:48 -0700 Subject: [PATCH 11/14] fix broken path --- .github/workflows/build_test_containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index 0302c198c..b4fd13444 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -76,7 +76,7 @@ jobs: github.ref == 'refs/heads/develop' || contains(github.ref, 'refs/tags') shell: bash - run: ci/publish_to_github.sh + run: service/ci/publish_to_github.sh #------------------ Push to docker hub (disabled) ------------------------------------- # From eab8eea856d115abba4c0eb51ed5c2b968e69d01 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Fri, 10 Jan 2025 12:05:04 -0700 Subject: [PATCH 12/14] clean up naming --- service/ci/publish_to_docker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/ci/publish_to_docker.sh b/service/ci/publish_to_docker.sh index 62ab3d998..9feac85fb 100755 --- a/service/ci/publish_to_docker.sh +++ b/service/ci/publish_to_docker.sh @@ -2,9 +2,9 @@ export $(egrep -v '^#' .env | xargs) export WEB_REGISTRY_URI=boptest_service-web export WORKER_REGISTRY_URI=boptest_service-worker -export GITHUB_ORG=tijcolem -export DOCKER_HUB_WEB_REGISTRY_URI=$GITHUB_ORG/boptest-web -export DOCKER_HUB_WORKER_REGISTRY_URI=$GITHUB_ORG/boptest-worker +export DOCKER_ORG=nrel +export DOCKER_HUB_WEB_REGISTRY_URI=$DOCKER_ORG/boptest-web +export DOCKER_HUB_WORKER_REGISTRY_URI=$DOCKER_ORG/boptest-worker if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then export VERSION_TAG="develop" From 181b63025012a1be603f4d282c915d24c4fdd2bc Mon Sep 17 00:00:00 2001 From: tijcolem Date: Mon, 13 Jan 2025 15:50:09 -0700 Subject: [PATCH 13/14] fix github org name and remove comment line --- .github/workflows/build_test_containers.yml | 2 -- service/ci/publish_to_github.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index b4fd13444..8b9fc0067 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -62,8 +62,6 @@ jobs: if: failure() uses: jwalton/gh-docker-logs@v1 -#------------------------- Push to GitHub registry (disabled) ----------------------------- - - name: Log in to the GitHub container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: diff --git a/service/ci/publish_to_github.sh b/service/ci/publish_to_github.sh index 598c1d3db..81abcbf47 100755 --- a/service/ci/publish_to_github.sh +++ b/service/ci/publish_to_github.sh @@ -2,7 +2,7 @@ export $(egrep -v '^#' .env | xargs) export WEB_REGISTRY_URI=boptest_service-web export WORKER_REGISTRY_URI=boptest_service-worker -export GITHUB_ORG=tijcolem +export GITHUB_ORG=ibpsa export GITHUB_WEB_REGISTRY_URI=ghcr.io/$GITHUB_ORG/boptest-web export GITHUB_WORKER_REGISTRY_URI=ghcr.io/$GITHUB_ORG/boptest-worker From c4df024f32d40e1088722510bb51a9a13f59b2fe Mon Sep 17 00:00:00 2001 From: tijcolem Date: Tue, 14 Jan 2025 11:22:19 -0700 Subject: [PATCH 14/14] use github username defined as github secret vs github.actor --- .github/workflows/build_test_containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_containers.yml b/.github/workflows/build_test_containers.yml index 8b9fc0067..a9bebe20c 100644 --- a/.github/workflows/build_test_containers.yml +++ b/.github/workflows/build_test_containers.yml @@ -66,7 +66,7 @@ jobs: uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ secrets.GH_USERNAME }} password: ${{ secrets.GH_REGISTRY }} - name: Publish docker images to GitHub Registry