From d7ae345e674bbddb64eff983a7a40e6866c0c09c Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 19:01:43 +0200 Subject: [PATCH 1/6] ensure that ``settings["res_gen"]`` is alsways set correctly --- app/ptxboa_functions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/ptxboa_functions.py b/app/ptxboa_functions.py index d734a17..a692f53 100644 --- a/app/ptxboa_functions.py +++ b/app/ptxboa_functions.py @@ -139,7 +139,9 @@ def calculate_results_list( settings.update({"secproc_co2": None}) # for all regions but the selected one, use Wind-PV-hybrid RE source: - if settings["region"] != st.session_state["region"]: + if settings["region"] == st.session_state["region"]: + settings["res_gen"] = st.session_state["res_gen"] + else: settings["res_gen"] = "Wind-PV-Hybrid" # consider user data in optimization only for parameter set in session state From ab08c87959bf6551574166518a550162399cbf6b Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 19:18:00 +0200 Subject: [PATCH 2/6] market scanning: add help texts. Closes #208 --- app/tab_market_scanning.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/tab_market_scanning.py b/app/tab_market_scanning.py index f747404..6c1bfa5 100644 --- a/app/tab_market_scanning.py +++ b/app/tab_market_scanning.py @@ -283,7 +283,17 @@ def content_market_scanning(api: PtxboaAPI, cd: dict) -> None: st.plotly_chart(fig, use_container_width=True) + st.caption( + ( + "Notes:\n" + "- For EU, trasportation distance to France is used.\n" + "- Countries are not plotted if either distance or demand data" + " is missing." + ) + ) + with st.expander("**Data**"): st.dataframe(df, use_container_width=True) + st.caption("Note: For EU, trasportation distance to France is used.") fn = "market_scanning_target_countries" prepare_and_download_df_as_excel(df, filename=fn) From c13aee1a6f9396b3a8052f0710a0eb48096c5763 Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 21:03:20 +0200 Subject: [PATCH 3/6] add help texts to input data tab. Closes #389 --- app/tab_input_data.py | 12 ++++++++++++ md/helptext_flh.md | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 md/helptext_flh.md diff --git a/app/tab_input_data.py b/app/tab_input_data.py index 534e3a7..86e7906 100644 --- a/app/tab_input_data.py +++ b/app/tab_input_data.py @@ -69,6 +69,8 @@ def content_input_data(api: PtxboaAPI) -> None: st.plotly_chart(fig, use_container_width=True) with st.expander("**Data**"): + if data_selection == "full load hours": + st.caption(read_markdown_file("md/helptext_flh.md")) df = display_and_edit_input_data( api, data_type=data_selection, @@ -98,6 +100,12 @@ def content_input_data(api: PtxboaAPI) -> None: with st.container(border=True): st.subheader("Global data") with st.expander("**Electricity generation**"): + st.caption( + ( + "CAPEX and full load hours of renewables" + " are region specific and are shown above." + ) + ) display_and_edit_input_data( api, data_type="electricity_generation", @@ -177,6 +185,10 @@ def content_input_data(api: PtxboaAPI) -> None: key="input_data_dac_and_desalination", ) with st.expander("**Specific costs for materials and energy carriers**"): + st.caption( + read_markdown_file("md/helptext_columns_specific_costs.md"), + unsafe_allow_html=True, + ) display_and_edit_input_data( api, data_type="specific_costs", diff --git a/md/helptext_flh.md b/md/helptext_flh.md new file mode 100644 index 0000000..d9fe5f8 --- /dev/null +++ b/md/helptext_flh.md @@ -0,0 +1,4 @@ +- Realized full load hours may be lower due to curtailment. +- For Wind-PV-Hybrid sites, combined full load hours are estimated for a fixed capacity relation of Wind Onshore and PV plants. The cost efficient capacity share is determined by optimization, which will also affect full load hours. +- Full load hours of electrolyzer and derivate production are not shown because they are determined by optimization and vary between regions, generation sites, and process chains. +- For the selected region and settings full load hours of all processes are shown in the **Optimization** tab. From be2f02f3f80dcd904b7a2867129efc40df69cffc Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 21:14:43 +0200 Subject: [PATCH 4/6] remove draft version warning --- ptxboa_streamlit.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ptxboa_streamlit.py b/ptxboa_streamlit.py index ac8624f..e20f623 100644 --- a/ptxboa_streamlit.py +++ b/ptxboa_streamlit.py @@ -91,13 +91,6 @@ st.title("PtX Business Opportunity Analyser") -with st.container(): - st.error( - f"**Draft version ({__version__})!** This app is under development." - " Results are preliminary, and there may be bugs or unexpected behaviour." - " Please do not cite." - ) - with st.container(): if st.session_state["edit_input_data"]: st.info("Data editing mode **ON**") From da0a6df4647bbdee2cc7036c2b819a3add19edc4 Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 21:15:24 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Bump=20version:=200.9.2=20=E2=86=92=201.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- .github/workflows/publish.yaml | 2 +- Dockerfile | 2 +- README.md | 2 +- app/tab_info.py | 2 +- ptxboa_streamlit.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f24a6dd..9b118e1 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.9.2 +current_version = 1.0.0 commit = True tag = True diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 408cf14..ab3d4b1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -23,4 +23,4 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: wingechr/ptx-boa:0.9.2 + tags: wingechr/ptx-boa:1.0.0 diff --git a/Dockerfile b/Dockerfile index f4ecbbc..6f1364a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.10-slim -LABEL version="0.9.2" +LABEL version="1.0.0" RUN apt-get update RUN apt-get install -y git diff --git a/README.md b/README.md index af4646e..e380628 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ scp -r ptxboa2:ptx-boa_offline_optimization/optimization_cache/* . # connect to server ssh ptxboa # pull latest image from dockerhub -VERSION=0.9.2 +VERSION=1.0.0 docker pull wingechr/ptx-boa:$VERSION # stop and delete the currently running container "app" docker stop app diff --git a/app/tab_info.py b/app/tab_info.py index 8fcd2c0..75c0bdf 100644 --- a/app/tab_info.py +++ b/app/tab_info.py @@ -4,7 +4,7 @@ from app.ptxboa_functions import read_markdown_file -__version__ = "0.9.2" +__version__ = "1.0.0" def content_info(): diff --git a/ptxboa_streamlit.py b/ptxboa_streamlit.py index e20f623..afb3fd6 100644 --- a/ptxboa_streamlit.py +++ b/ptxboa_streamlit.py @@ -6,7 +6,7 @@ >>> streamlit run ptxboa_streamlit.py """ -__version__ = "0.9.2" +__version__ = "1.0.0" import logging From 5e74e3beb64ecc254af361d09834b062ca12b15b Mon Sep 17 00:00:00 2001 From: Markus Haller Date: Sat, 22 Jun 2024 21:16:58 +0200 Subject: [PATCH 6/6] changelog.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d90ce07..c5645f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG.md +## 1.0.0 (2024-06-22) + +- launch release +- cosmetic changes + ## 0.9.2 (2024-06-21) - pre-launch release