Skip to content

Commit 00717e0

Browse files
authored
v1 Nicky gui comments (#30)
* 24 functionrole of exposure units by drf (#26) * separate depths table for mrb * update mrb * add depths column name joining * exposure unit harmonization working on backend * fix ui test parameter handling * add exposure units to plots * fix labels * add units section to documentation * Squashed commit of the following: commit d4fb374a6eebc67faa4d4f5b1b1ff1b5ebc0a6f5 Author: Seth Bryant <[email protected]> Date: Wed Oct 30 17:10:58 2024 -0600 comment updates commit 623332e4cd011dd0016f209bde1ada19c2a99335 Author: Seth Bryant <[email protected]> Date: Wed Oct 30 10:26:03 2024 -0600 lint fixes * fix 'storys' * documentation tweaks * update to 3.34.12 * Update README.md rtd badge * v1 GUI comments from Nicky Remove cancel button Fix typos Add some categories Remove bold/italics Add 'testing' blurb change some defaults tates
1 parent afc01d8 commit 00717e0

File tree

5 files changed

+32
-44
lines changed

5 files changed

+32
-44
lines changed

cancurve/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#===============================================================================
22
# plugin metadata
33
#===============================================================================
4-
__version__='1.0.0'
4+
__version__='1.0.1'
55

66
#===============================================================================
77
# plugin entry point

cancurve/bldgs/cc_bldgs_dialog.ui

+23-37
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ QTabBar::tab:selected { /* Style for selected tabs */
140140
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
141141
p, li { white-space: pre-wrap; }
142142
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:14px; font-weight:400; font-style:normal;&quot;&gt;
143-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Welcome to the CanCurve &lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Buildings Tool.&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; This tool is designed to create &lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-style:italic;&quot;&gt;Depth Damage Functions&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; (DDF) for Canadian buildings. To get started or to learn more, see the &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve&quot;&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline; color:#0000ff;&quot;&gt;Documentation&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
143+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Welcome to the CanCurve &amp;lt;&amp;lt;Buildings Tool&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; This tool is designed to create flood Depth Damage Functions (DDF) for Canadian buildings. To get started or to learn more, see the &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve&quot;&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline; color:#0000ff;&quot;&gt;Documentation&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
144144
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/plugins/cancurve/img/icon.png&quot; /&gt;&lt;/p&gt;
145145
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
146+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600; color:#ff0000;&quot;&gt;v1.0 limited release&lt;/span&gt;&lt;span style=&quot; font-size:14pt; color:#ff0000;&quot;&gt;: CanCurve is an experimental tool in active development. The Buildings Tool has been released to a select group for feedback and testing prior to the full public release. If you identify any bugs, errors, or typos, please post an &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve/issues&quot;&gt;&lt;span style=&quot; font-size:14pt; text-decoration: underline; color:#ff0000;&quot;&gt;issue on the GitHub page&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:14pt; color:#ff0000;&quot;&gt; so we can address the problem as soon as possible. Once you have finished your review, please fill out &lt;/span&gt;&lt;a href=&quot;https://docs.google.com/forms/d/e/1FAIpQLSdpCNen4gyLxOES3XcdfRvGfAb3_sryLp5FIieJfmdQ5ATVMw/viewform?usp=sf_link&quot;&gt;&lt;span style=&quot; font-size:14pt; text-decoration: underline; color:#ff0000;&quot;&gt;this form&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:14pt; color:#ff0000;&quot;&gt; to provide us some feedback.&lt;/span&gt;&lt;/p&gt;
147+
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
146148
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;The following inputs are required:&lt;/span&gt;&lt;/p&gt;
147-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Metadata&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: These standard flood-related building properties are specified on the &lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-style:italic;&quot;&gt;Metadata&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; tab. This metadata will be used to populate the metadata of your DDF. Some of the fields are also used in the calculation process.&lt;/span&gt;&lt;/p&gt;
148-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Cost-Item Table: &lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;This table of restoration items and their costs is specifed as a CSV file on the &lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-style:italic;&quot;&gt;Data Input&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; tab. Click &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve/blob/main/tests/data/bldgs/case1/R_1-L-BD-CU_ABCA.csv&quot;&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline; color:#0000ff;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; for an example. &lt;/span&gt;&lt;span style=&quot; font-size:14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
149+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Metadata: Information on the building properties is entered on the &amp;lt;&amp;lt;Metadata&amp;gt;&amp;gt; tab. This metadata will be output in the DDF and provides information about the building. Some of the fields are also used in the calculation process.&lt;/span&gt;&lt;/p&gt;
150+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Cost-Item Table&lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;This table provides costing information on restoration of flood damaged items and is input as a csv file on the Data Input tab. Click &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve/blob/main/tutorial/01/R_1-L-BD-CU_ABCA.csv&quot;&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline; color:#0000ff;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; for an example. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
149151
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;The following inputs are optional:&lt;/span&gt;&lt;/p&gt;
150-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Depth Replacement-Factor (DRF) dataset&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: This dataset relates flood depth to the percentage loss or damage of a restoration item and is specified on the &lt;/span&gt;&lt;span style=&quot; font-size:12pt; font-style:italic;&quot;&gt;Data Input&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; tab. By default, the DRF dataset shipped with CanCurve will be used.&lt;/span&gt;&lt;/p&gt;
152+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Depth Replacement-Factor (DRF) dataset: This dataset relates flood depth to the percentage loss or damage of a restoration item and is specified on the &amp;lt;&amp;lt;Data Input&amp;gt;&amp;gt; tab. By default, the DRF dataset shipped with CanCurve will be used.&lt;/span&gt;&lt;/p&gt;
151153
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:16px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
152154
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Navigate through the tabs at the top of the window from left-to-right to create your own DDF. For help and support, see the &lt;/span&gt;&lt;a href=&quot;https://github.com/NRCan/CanCurve/issues&quot;&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline; color:#0000ff;&quot;&gt;CanCurve Project GitHub Issues Page&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
153155
</property>
@@ -266,7 +268,7 @@ p, li { white-space: pre-wrap; }
266268
<item>
267269
<widget class="QLabel" name="label_13">
268270
<property name="text">
269-
<string>Populate the metadta for your building. *required field</string>
271+
<string>Populate the metadata for your building. *required field</string>
270272
</property>
271273
</widget>
272274
</item>
@@ -286,7 +288,7 @@ p, li { white-space: pre-wrap; }
286288
<property name="geometry">
287289
<rect>
288290
<x>0</x>
289-
<y>-298</y>
291+
<y>0</y>
290292
<width>745</width>
291293
<height>947</height>
292294
</rect>
@@ -562,7 +564,7 @@ QGroupBox {
562564
<string/>
563565
</property>
564566
<property name="text">
565-
<string>m</string>
567+
<string>meters</string>
566568
</property>
567569
</widget>
568570
</item>
@@ -978,14 +980,14 @@ QGroupBox {
978980
<item row="0" column="0">
979981
<widget class="QLabel" name="basementRCVstory1Label">
980982
<property name="text">
981-
<string>Basement RCV (storey -1): </string>
983+
<string>Basement Costs (storey -1): </string>
982984
</property>
983985
</widget>
984986
</item>
985987
<item row="1" column="0">
986988
<widget class="QLabel" name="mainFloorRCVstory0Label">
987989
<property name="text">
988-
<string>Main Floor RCV (storey 0):</string>
990+
<string>Main Floor Costs (storey 0):</string>
989991
</property>
990992
</widget>
991993
</item>
@@ -1146,7 +1148,7 @@ QGroupBox {
11461148
<item>
11471149
<widget class="QLabel" name="label_5">
11481150
<property name="text">
1149-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;The following steps will create your Depth-Damage Function (DDF). You can select &lt;/span&gt;&lt;span style=&quot; font-size:11pt; font-style:italic;&quot;&gt;All&lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; to execute all steps in sequence, or &lt;/span&gt;&lt;span style=&quot; font-size:11pt; font-style:italic;&quot;&gt;Individual steps&lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; to execute each individually.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1151+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;The following steps will create your Depth-Damage Function (DDF). You can select &lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&amp;lt;&amp;lt;All&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; to execute all steps in sequence, or &amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Individual steps&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; to execute each individually.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
11501152
</property>
11511153
<property name="wordWrap">
11521154
<bool>true</bool>
@@ -1227,13 +1229,13 @@ QGroupBox {
12271229
</size>
12281230
</property>
12291231
<property name="title">
1230-
<string notr="true">Output Control</string>
1232+
<string notr="true">Output Settings</string>
12311233
</property>
12321234
<property name="flat">
12331235
<bool>true</bool>
12341236
</property>
12351237
<property name="collapsed">
1236-
<bool>true</bool>
1238+
<bool>false</bool>
12371239
</property>
12381240
<property name="saveCollapsedState">
12391241
<bool>false</bool>
@@ -1260,7 +1262,7 @@ QGroupBox {
12601262
<string/>
12611263
</property>
12621264
<property name="checked">
1263-
<bool>false</bool>
1265+
<bool>true</bool>
12641266
</property>
12651267
</widget>
12661268
</item>
@@ -1327,7 +1329,7 @@ QGroupBox {
13271329
<item row="4" column="0">
13281330
<widget class="QLabel" name="launchResultingDDFLabel">
13291331
<property name="text">
1330-
<string>Launch output DDF:</string>
1332+
<string>Open DDF automatically:</string>
13311333
</property>
13321334
</widget>
13331335
</item>
@@ -1347,7 +1349,7 @@ QGroupBox {
13471349
<item row="1" column="0">
13481350
<widget class="QLabel" name="launchPlotDialogLabel">
13491351
<property name="text">
1350-
<string>Launch plot dialogs:</string>
1352+
<string>Launch plot windows:</string>
13511353
</property>
13521354
</widget>
13531355
</item>
@@ -1590,7 +1592,7 @@ QLabel {
15901592
<bool>false</bool>
15911593
</property>
15921594
<property name="text">
1593-
<string>cost-item summary plot</string>
1595+
<string>cost-item totals plot</string>
15941596
</property>
15951597
<property name="checked">
15961598
<bool>false</bool>
@@ -1603,7 +1605,7 @@ QLabel {
16031605
<bool>false</bool>
16041606
</property>
16051607
<property name="text">
1606-
<string>DRF summary plot</string>
1608+
<string>DRF category plot</string>
16071609
</property>
16081610
</widget>
16091611
</item>
@@ -1695,7 +1697,7 @@ QLabel {
16951697
<bool>false</bool>
16961698
</property>
16971699
<property name="text">
1698-
<string>depth-RCV summary plot</string>
1700+
<string>depth-RCV by story plot</string>
16991701
</property>
17001702
</widget>
17011703
</item>
@@ -1787,7 +1789,7 @@ QLabel {
17871789
<bool>false</bool>
17881790
</property>
17891791
<property name="text">
1790-
<string>depth-damage per-storey plot</string>
1792+
<string>DDF plot</string>
17911793
</property>
17921794
</widget>
17931795
</item>
@@ -1946,7 +1948,7 @@ QLabel {
19461948
<rect>
19471949
<x>0</x>
19481950
<y>0</y>
1949-
<width>575</width>
1951+
<width>656</width>
19501952
<height>68</height>
19511953
</rect>
19521954
</property>
@@ -1996,7 +1998,7 @@ QLabel {
19961998
}</string>
19971999
</property>
19982000
<property name="text">
1999-
<string>Welcome to CanCurve!</string>
2001+
<string/>
20002002
</property>
20012003
<property name="alignment">
20022004
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -2016,22 +2018,6 @@ QLabel {
20162018
<layout class="QVBoxLayout" name="verticalLayout_19">
20172019
<item>
20182020
<layout class="QHBoxLayout" name="horizontalLayout_7">
2019-
<item>
2020-
<widget class="QPushButton" name="cancel_pushButton">
2021-
<property name="sizePolicy">
2022-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
2023-
<horstretch>0</horstretch>
2024-
<verstretch>0</verstretch>
2025-
</sizepolicy>
2026-
</property>
2027-
<property name="text">
2028-
<string>Cancel</string>
2029-
</property>
2030-
<property name="flat">
2031-
<bool>false</bool>
2032-
</property>
2033-
</widget>
2034-
</item>
20352021
<item>
20362022
<widget class="QPushButton" name="close_pushButton">
20372023
<property name="sizePolicy">

cancurve/bldgs/dialog.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ def close_dialog():
159159
self.pluginObject.first_start=True #not ideal
160160
self.close()
161161

162-
self.close_pushButton.clicked.connect(close_dialog)
163-
self.cancel_pushButton.clicked.connect(self.action_cancel_process)
162+
self.close_pushButton.clicked.connect(close_dialog)
163+
164+
"""not using
165+
self.cancel_pushButton.clicked.connect(self.action_cancel_process)"""
164166

165167
from cancurve import __version__
166168
self.label_version.setText(f'v{__version__}')

cancurve/bldgs/parameters_ui.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
'heatingType': ['Baseboard-electric', 'Baseboard-hot Water', 'Forced Air - Electric', 'Forced Air - Gas', 'Forced Air - Unknown', 'Heatpump', 'Mixed', 'Solar', 'Oil', 'Woodstove', 'Other'],
1919
'coolingType': ['Central air', 'Heat pump'],
20-
'garageType': ['Yes, Attached', 'Yes, Detached', 'None'],
21-
'garageSize': ['Single', 'Single Plus', 'Double', 'Triple'],
20+
'garageType': ['None', 'Attached', 'Detached', 'Underground single-level', 'Underground multi-level', 'Surface Parking', 'Other'],
21+
'garageSize': ['Single', 'Single Plus', 'Double', 'Triple', '>10'],
2222
'buildingLayout':['default'], #needed by DRF, but not sure about values other than 'default'
2323

2424

@@ -51,7 +51,7 @@
5151
"NU", # Nunavut
5252
"YT" # Yukon
5353
],
54-
'taxesIncluded': ['PST', 'PST & GST', 'GST', 'None'],
54+
'taxesIncluded': ['PST', 'PST & GST', 'GST', 'HST', 'HST & QST', 'None'],
5555
'currency':['$CAD', '$USD', 'Other'],
5656
'costBasis':['Replacement Cost', 'Depreciated Cost']
5757
}

tests/bldgs/test_dialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def test_parameters():
216216
assert set(building_details_options_d.keys()).difference(df.index)==set(), 'parameters_ui doesnt match paramter csv'
217217

218218

219-
#@pytest.mark.dev
219+
@pytest.mark.dev
220220
def test_init(dialog,):
221221

222222

0 commit comments

Comments
 (0)