Skip to content

Commit 65de389

Browse files
committed
More in-software user guidance
1 parent 5e74e6d commit 65de389

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

activity_browser/app/ui/tabs/LCA_setup.py

+21-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
CSActivityTable, CSList, CSMethodsTable, PresamplesList, ScenarioImportTable
1818
)
1919
from ..widgets import ExcelReadDialog
20+
from .base import BaseRightTab
2021

2122
"""
2223
Lifecycle of a calculation setup
@@ -281,16 +282,26 @@ def enable_calculations(self):
281282
self.scenario_calc_btn.setEnabled(valid_cs)
282283

283284

284-
class ScenarioImportPanel(QtWidgets.QWidget):
285+
class ScenarioImportPanel(BaseRightTab):
285286
MAX_TABLES = 5
286287

287288
"""Special kind of QWidget that contains one or more tables side by side."""
288289
def __init__(self, parent=None):
289290
super().__init__(parent)
290291

292+
self.explain_text = """
293+
<p>You can import two different scenario types here:</p>
294+
<p>1. <b>flow-scenarios</b>: flow scenarios are alternative values for exchanges (flows between processes or between processes and the environment)</p>
295+
<p>2. <b>parameter-scenarios</b>: alternative values for parameters you use within a project</p>
296+
<p>If you do not know how such files look like, you can go to the Parameters --> Scenarios tab.
297+
Then click "Export parameter-scenarios" to obtain a parameter-scenarios file or
298+
"Export as flow-scenarios" to obtain a flow-scenarios file.
299+
Note that you need to have at least one parameterized activity to obtain flow-scenarios</p>
300+
"""
301+
291302
self.tables = []
292303
layout = QtWidgets.QVBoxLayout()
293-
row = QtWidgets.QHBoxLayout()
304+
294305
self.scenario_tables = QtWidgets.QHBoxLayout()
295306
self.table_btn = QtWidgets.QPushButton(qicons.add, "Add")
296307

@@ -311,11 +322,16 @@ def __init__(self, parent=None):
311322
input_field_layout.addWidget(self.addition_choice)
312323
self.group_box.setHidden(True)
313324

314-
row.addWidget(header("Scenarios"))
325+
row = QtWidgets.QToolBar()
326+
row.addWidget(header("Scenarios:"))
327+
row.addAction(
328+
qicons.question, "Scenarios help",
329+
self.explanation
330+
)
315331
row.addWidget(self.table_btn)
316332
row.addWidget(self.group_box)
317-
row.addStretch(1)
318-
layout.addLayout(row)
333+
# row.addStretch(1)
334+
layout.addWidget(row)
319335
layout.addLayout(self.scenario_tables)
320336
layout.addStretch(1)
321337
self.setLayout(layout)

activity_browser/app/ui/tabs/parameters.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,13 @@ class ParameterScenariosTab(BaseRightTab):
276276
def __init__(self, parent=None):
277277
super().__init__(parent)
278278

279-
self.load_btn = QPushButton(qicons.add, "Import table from excel")
279+
self.load_btn = QPushButton(qicons.add, "Import parameter-scenarios")
280280
self.save_btn = QPushButton(
281281
self.style().standardIcon(QStyle.SP_DialogSaveButton),
282-
"Export table to excel"
282+
"Export parameter-scenarios"
283283
)
284284
self.calculate_btn = QPushButton(
285-
qicons.calculate, "Process table and export"
285+
qicons.calculate, "Export as flow-scenarios"
286286
)
287287
self.hide_group = QCheckBox("Show group column")
288288

@@ -293,18 +293,18 @@ def __init__(self, parent=None):
293293

294294
self.explain_text = """
295295
<p>This tab has 3 functions:</p>
296-
<p>1. <b> Export table to excel </b> : this exports the table as shown below to an Excel file. You can modify it there and use
296+
<p>1. <b> Export parameter-scenarios </b> : this exports the table as shown below to an Excel file. You can modify it there and use
297297
it in scenario LCAs (see Calculation Setup tab)</p>
298-
<p>2. <b>Import table from excel</b>: imports a table like the one shown below from Excel. If parameters are missing in Excel,
298+
<p>2. <b>Import parameter-scenarios</b>: imports a table like the one shown below from Excel. If parameters are missing in Excel,
299299
the default values will be used. IMPORTANT NOTE: the ONLY function this button serves is to display the Excel file.
300300
If you want to use the Excel file in scenario LCA, please import it in the Calculation Setup tab.</p>
301-
<p>3. <b>Process table and export</b>: This converts a "parameter-scenarios" file (alternative values for parameters) to a
301+
<p>3. <b>Export as flow-scenarios</b>: This converts a "parameter-scenarios" file (alternative values for parameters) to a
302302
"flow-scenarios" file (alternative values for the exchanges as used in LCA calculations).</p>
303303
304-
<p><b>Suggested workflow to create scenarios for your parameters</b>:</p>
305-
<p>Export table to excel. Add scenarios (columns). You may want to delete rows that you intend to change or rows that
306-
are for dependent parameters (those that depend on other parameters) as these values will be overwritten by the formulas.
307-
Finally, import the parameter-scenarios in the Calculation Setup to perform scenario calculations.</p>
304+
<p><b>Suggested <i>workflow</i> to create scenarios for your parameters</b>:</p>
305+
<p>Export parameter-scenarios. This will generate an Excel file for you where you can add scenarios (columns).
306+
You may want to delete rows that you intend to change or rows that are for dependent parameters (those that depend on other parameters) as these values will be overwritten by the formulas.
307+
Finally, import the parameter-scenarios in the <i>Calculation Setup</i> (not here!) to perform scenario calculations (you need to select "Scenario-based LCA").</p>
308308
309309
<p>For more information on this topic see also the
310310
<a href="https://2.docs.brightway.dev/intro.html#parameterized-datasets">Brightway2 documentation</a>.</p>

0 commit comments

Comments
 (0)