measur-tools-suite 1.0.11-beta.27 → 1.0.11-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.clang-format CHANGED
@@ -137,18 +137,30 @@ FixNamespaceComments: true
137
137
  # - KJ_IF_MAYBE
138
138
  IncludeBlocks: Regroup
139
139
  IncludeCategories:
140
- - Regex: '^"[^"]+\.h"' # Project-local includes, e.g. "myheader.h"
140
+ - Regex: '^<[^/ >]+>$' # C++ standard library headers, e.g., <string>, <vector>
141
141
  Priority: 1
142
142
  SortPriority: 0
143
143
  CaseSensitive: false
144
- - Regex: '^<[^/ >]+>$' # C++ standard library headers, e.g. <vector>, <string>
144
+ - Regex: '^"catch/.*"$' # Catch headers
145
145
  Priority: 2
146
146
  SortPriority: 0
147
147
  CaseSensitive: false
148
- - Regex: '^<.*>$' # System or external library headers, e.g. <boost/asio.hpp>, <QtCore/QObject>
148
+ - Regex: '^"fast-cpp-csv-parser/.*"$' # fast-cpp-csv-parser headers
149
+ Priority: 2
150
+ SortPriority: 0
151
+ CaseSensitive: false
152
+ - Regex: '^"sqlite/.*"$' # SQLite headers
149
153
  Priority: 3
150
154
  SortPriority: 0
151
155
  CaseSensitive: false
156
+ - Regex: '^".*"$' # Catch all for all other third-party headers, e.g., "someheader.h"
157
+ Priority: 4
158
+ SortPriority: 0
159
+ CaseSensitive: false
160
+ - Regex: '^"[^"]+\.h"' # Project-local includes, e.g., "myheader.h"
161
+ Priority: 5
162
+ SortPriority: 0
163
+ CaseSensitive: false
152
164
  # - Regex: ^<ext/.*\.h>
153
165
  # Priority: 2
154
166
  # SortPriority: 0
package/CONTRIBUTING.md CHANGED
@@ -35,7 +35,16 @@ Use Conventional Commits to structure your commit messages. This helps maintain
35
35
 
36
36
  - [Style Guide](#style-guide)
37
37
  - [Header Files](#header-files)
38
+ - [The #define Guard](#the-define-guard)
39
+ - [Format](#format)
40
+ - [Example](#example)
38
41
  - [Include What You Use](#include-what-you-use)
42
+ - [Forward Declarations](#forward-declarations)
43
+ - [Bad](#bad)
44
+ - [Good](#good)
45
+ - [Defining Functions in Header Files](#defining-functions-in-header-files)
46
+ - [Example](#example-1)
47
+ - [Names and Order of Includes](#names-and-order-of-includes)
39
48
  - [Scoping](#scoping)
40
49
  - [Namespaces](#namespaces)
41
50
  - [Local Variables](#local-variables)
@@ -78,46 +87,46 @@ Use Conventional Commits to structure your commit messages. This helps maintain
78
87
  - [Common Doxygen Tags](#common-doxygen-tags)
79
88
  - [Documenting Units for Physical Quantities](#documenting-units-for-physical-quantities)
80
89
  - [Template](#template)
81
- - [Example](#example)
90
+ - [Example](#example-2)
82
91
  - [Documenting Formulas](#documenting-formulas)
83
92
  - [Template](#template-1)
84
- - [Example](#example-1)
93
+ - [Example](#example-3)
85
94
  - [File Documentation](#file-documentation)
86
95
  - [Required tags](#required-tags)
87
96
  - [Optional tags](#optional-tags)
88
97
  - [Template](#template-2)
89
- - [Example](#example-2)
98
+ - [Example](#example-4)
90
99
  - [Function \& Method Documentation](#function--method-documentation)
91
100
  - [Required tags](#required-tags-1)
92
101
  - [Optional tags](#optional-tags-1)
93
102
  - [Template](#template-3)
94
- - [Example](#example-3)
103
+ - [Example](#example-5)
95
104
  - [Class \& Struct Documentation](#class--struct-documentation)
96
105
  - [Required tags](#required-tags-2)
97
106
  - [Optional tags](#optional-tags-2)
98
107
  - [Template](#template-4)
99
- - [Example](#example-4)
108
+ - [Example](#example-6)
100
109
  - [Data-Member Documentation](#data-member-documentation)
101
110
  - [Template](#template-5)
102
- - [Example](#example-5)
111
+ - [Example](#example-7)
103
112
  - [Enumeration Documentation](#enumeration-documentation)
104
113
  - [Required tags](#required-tags-3)
105
114
  - [Optional tags](#optional-tags-3)
106
115
  - [Template](#template-6)
107
- - [Example](#example-6)
116
+ - [Example](#example-8)
108
117
  - [Constant Documentation](#constant-documentation)
109
118
  - [Template](#template-7)
110
- - [Example](#example-7)
119
+ - [Example](#example-9)
111
120
  - [Namespace Documentation](#namespace-documentation)
112
121
  - [Required tags](#required-tags-4)
113
122
  - [Optional tags](#optional-tags-4)
114
123
  - [Template](#template-8)
115
- - [Example](#example-8)
124
+ - [Example](#example-10)
116
125
  - [Module (Group) Documentation](#module-group-documentation)
117
126
  - [Required tags](#required-tags-5)
118
127
  - [Optional tags](#optional-tags-5)
119
128
  - [Template](#template-9)
120
- - [Example](#example-9)
129
+ - [Example](#example-11)
121
130
  - [Conventional Commits](#conventional-commits)
122
131
  - [Commit Format](#commit-format)
123
132
  - [Commit Types](#commit-types)
@@ -135,6 +144,34 @@ This section describes the coding style for this project. It is based on the [Go
135
144
 
136
145
  ## Header Files
137
146
 
147
+ Every `.cpp` file should have an associated `.h` file. There are some common exceptions, such as unit tests and small `.cpp` files containing just a `main()` function.
148
+
149
+ ### The #define Guard
150
+
151
+ All header files should have `#define` guards to prevent multiple inclusion.
152
+
153
+ #### Format
154
+
155
+ ```cpp
156
+ #ifndef <PROJECT>_<PATH>_<FILE>_H_
157
+ #define <PROJECT>_<PATH>_<FILE>_H_
158
+
159
+ ...
160
+
161
+ #endif // <PROJECT>_<PATH>_<FILE>_H_
162
+ ```
163
+
164
+ #### Example
165
+
166
+ ```cpp
167
+ #ifndef GEOMETRY_POLYGON_AREA_H_
168
+ #define GEOMETRY_POLYGON_AREA_H_
169
+
170
+ ...
171
+
172
+ #endif // GEOMETRY_POLYGON_AREA_H_
173
+ ```
174
+
138
175
  ### Include What You Use
139
176
 
140
177
  If a source or header file refers to a symbol defined elsewhere, it must directly include the header that provides the declaration or definition of that symbol. Do not include headers for any other reason.
@@ -143,6 +180,71 @@ Do **not** rely on transitive inclusions (i.e., do not assume that a header is i
143
180
 
144
181
  This rule also applies to related headers: for example, if `foo.cpp` uses a symbol from `bar.h`, it should include `bar.h` directly, even if `foo.h` already includes `bar.h`.
145
182
 
183
+ ### Forward Declarations
184
+
185
+ Avoid using forward declarations where possible. Instead, include the headers you need.
186
+
187
+ #### Bad
188
+
189
+ ```cpp
190
+ class B; // Forward declaration without definition.
191
+ void FuncInB();
192
+ extern int variable_in_b;
193
+ ```
194
+
195
+ #### Good
196
+
197
+ ```cpp
198
+ #include "b.h"
199
+ void f(B*);
200
+ void f(void*);
201
+ void test(D* x) { f(x); } // Calls f(B*)
202
+ ```
203
+
204
+ ### Defining Functions in Header Files
205
+
206
+ Only define a function at its public declaration if it is short (10 lines or fewer) or if it is a template function. Place longer function bodies in the `.cpp` file unless they must be in the header for performance or technical reasons.
207
+
208
+ If a definition must be in the header, avoid placing it in the public section. Instead, put it in a private section, an `internal` namespace, or below a comment like `// Implementation details only below here`.
209
+
210
+ All function definitions in header files must be ODR-safe by using the `inline` specifier, being a function template, or being defined in a class body at first declaration.
211
+
212
+ #### Example
213
+
214
+ ```cpp
215
+ template <typename T>
216
+ class Foo {
217
+ public:
218
+ int bar() { return bar_; }
219
+
220
+ void MethodWithHugeBody();
221
+
222
+ private:
223
+ int bar_;
224
+ };
225
+
226
+ // Implementation details only below here
227
+
228
+ template <typename T>
229
+ void Foo<T>::MethodWithHugeBody() {
230
+ ...
231
+ }
232
+ ```
233
+
234
+ ### Names and Order of Includes
235
+
236
+ Project-specific and third-party library headers should be included using double quotes (`"myheader.h"`), while standard library headers should use angle brackets (`<vector>`).
237
+
238
+ All of a project's header files should be listed as descendants of the project's source directory. For example, `myproject/include/module/header.h` should be included as `"module/header.h"`.
239
+
240
+ The order of includes is handled automatically by Clang-Format using the `IncludeCategories` setting in the `.clang-format`. The general order is:
241
+ 1. Related header file for the current source file (e.g., `"foo.h"`).
242
+ 2. Standard library headers (e.g., `<string>` and `<vector>`).
243
+ 3. Third-party library headers (e.g., `<boost/some_header.h>`).
244
+ 4. Project-specific headers (e.g., `"project/some_header.h"`).
245
+
246
+ All third-party libraries should be defined as separate categories in the `.clang-format` file. When adding a new third-party library, update the `IncludeCategories` section in the `.clang-format` file to include it.
247
+
146
248
  ## Scoping
147
249
 
148
250
  ### Namespaces
@@ -319,7 +421,7 @@ Minimize the use of abbreviations that would likely be unknown to someone outsid
319
421
 
320
422
  Filenames are `snake_case` (all lowercase, with underscores between words). For instance: `my_class.cpp`, `polygon.cpp`.
321
423
 
322
- C++ files have a `.cpp` extension, and header files have a `.hpp` extension.
424
+ C++ files have a `.cpp` extension, and header files have a `.h` extension.
323
425
 
324
426
  ### Type Names
325
427
 
@@ -717,7 +819,7 @@ Use a **single Doxygen block** at the very top of every header file.
717
819
 
718
820
  ```cpp
719
821
  /**
720
- * @file <filename>.hpp
822
+ * @file <filename>.h
721
823
  * @author <First Last>, <First Last>
722
824
  * @ingroup <GroupName>
723
825
  * @brief <Short purpose of the file>
@@ -737,7 +839,7 @@ Use a **single Doxygen block** at the very top of every header file.
737
839
 
738
840
  ```cpp
739
841
  /**
740
- * @file polygon_area.hpp
842
+ * @file polygon_area.h
741
843
  * @author Alice Brown, Carlos Diaz
742
844
  * @ingroup Geometry
743
845
  * @brief Implements Shoelace-based area calculations for simple polygons.
@@ -747,8 +849,8 @@ Use a **single Doxygen block** at the very top of every header file.
747
849
  * @formula{shoelace; A = \frac{1}{2} \sum_{i=1}^{n} (x_i y_{i+1} - x_{i+1} y_i)}
748
850
  *
749
851
  * @note Assumes polygons are simple (non-self-intersecting).
750
- * @deprecated Will be superseded by `polygon_metrics.hpp` in v2.0
751
- * @see vector2.hpp
852
+ * @deprecated Will be superseded by `polygon_metrics.h` in v2.0
853
+ * @see vector2.h
752
854
  * @copyright 2025 Geometry Toolkit
753
855
  */
754
856
  ```
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  MEASUR Tools Suite
2
2
  ---------------
3
3
 
4
- ## Documentation Update
4
+ ## Update (07/03/2025)
5
5
 
6
- (6/20/25) The MEASUR Tools Suite is currently being updated for better usability by third parties. This includes a refactoring of the current code base to follow consistent practices, better organization and enhanced documentation around the engineering aspects of the calculations. Further details on timeline and implementation will be added shortly. Please check back for updates.
6
+ The MEASUR Tools Suite is currently undergoing a major update to improve usability and maintainability. This includes a refactoring of the codebase to follow consistent practices, better organization, and enhanced documentation around the engineering aspects of the calculations. To follow the progress of this update, please refer to the [Roadmap](ROADMAP.md).
7
7
 
8
8
  ## About
9
9
 
package/ROADMAP.md ADDED
@@ -0,0 +1,82 @@
1
+ # Roadmap
2
+
3
+ This document provides an overview of the refactoring and documentation efforts being undertaken to improve the codebase and enhance the understanding of its functionality.
4
+
5
+ ## Tasks
6
+
7
+ - [ ] Reorganize project directories to mirror the module structure
8
+ - [ ] `Pumping System Assessments`
9
+ - [ ] Create directory and migrate relevant files
10
+ - [ ] Create associated namespace
11
+ - [ ] Create `README.md` file to explain the purpose and functionality
12
+ - [ ] `Process Heating Assessments`
13
+ - [ ] Create directory and migrate relevant files
14
+ - [ ] Create associated namespace
15
+ - [ ] Create `README.md` file to explain the purpose and functionality
16
+ - [ ] `Process Cooling Assessments`
17
+ - [ ] Create directory and migrate relevant files
18
+ - [ ] Create associated namespace
19
+ - [ ] Create `README.md` file to explain the purpose and functionality
20
+ - [ ] `Fan System Assessments`
21
+ - [ ] Create directory and migrate relevant files
22
+ - [ ] Create associated namespace
23
+ - [ ] Create `README.md` file to explain the purpose and functionality
24
+ - [ ] `Steam System Assessments`
25
+ - [ ] Create directory and migrate relevant files
26
+ - [ ] Create associated namespace
27
+ - [ ] Create `README.md` file to explain the purpose and functionality
28
+ - [ ] `Compressed Air Assessments`
29
+ - [ ] Create directory and migrate relevant files
30
+ - [ ] Create associated namespace
31
+ - [ ] `Energy Treasure Hunt Module`
32
+ - [ ] Create directory and migrate relevant files
33
+ - [ ] Create associated namespace
34
+ - [ ] Create `README.md` file to explain the purpose and functionality
35
+ - [ ] `Simple Equipment and Property Calculators`
36
+ - [ ] Create directory and migrate relevant files
37
+ - [ ] Create associated namespace
38
+ - [ ] Create `README.md` file to explain the purpose and functionality
39
+ - [ ] `Waste Water Assessments`
40
+ - [ ] Create directory and migrate relevant files
41
+ - [ ] Create associated namespace
42
+ - [ ] Create `README.md` file to explain the purpose and functionality
43
+ - [ ] Update project `README.md` to reflect the new structure and provide an overview of each module
44
+ - [ ] Create global constants header file and refactor existing code to use it
45
+ - [ ] Create `constants.h` file
46
+ - [ ] Move existing constants from various modules into `constants.h`
47
+ - [ ] Update all modules to include `constants.h` where necessary
48
+ - [ ] Document the purpose and usage of each constant in `constants.h`
49
+ - [ ] Refactor & document `Pump System Assessments` module
50
+ - [ ] Refactor & document `Process Heating Assessments` module
51
+ - [ ] Refactor & document `Process Cooling Assessments` module
52
+ - [ ] Refactor & document `Fan System Assessments` module
53
+ - [ ] Refactor & document `fan203.h`
54
+ - [x] Rename header and associated source files to `fan203.h` and `fan203.cpp`
55
+ - [x] Refactor & document `FanRatedInfo` class
56
+ - [ ] Refactor & document `BaseGasDensity` class
57
+ - [ ] Refactor & document `PlaneData` class
58
+ - [ ] Refactor & document `Fan203` class
59
+ - [ ] Refactor `FanCurve.h`
60
+ - [ ] Rename header and associated source files to `fan_curve.h` and `fan_curve.cpp`
61
+ - [ ] Refactor & document `FanCurveType` enum
62
+ - [ ] Refactor & document `ResultData` class
63
+ - [ ] Refactor & document `FanCurveData` class
64
+ - [ ] Refactor & document `FanCurve` class
65
+ - [ ] Refactor `FanResult.h`
66
+ - [ ] Rename header and associated source files to `fan_result.h` and `fan_result.cpp`
67
+ - [ ] Refactor & document `Input` struct
68
+ - [ ] Refactor & document `FieldDataModified` struct
69
+ - [ ] Refactor & document `FieldDataBaseline` struct
70
+ - [ ] Refactor & document `FanResult` class
71
+ - [ ] Refactor & document `Planar.h`
72
+ - [ ] Rename header and associated source files to `planar.h` and `planar.cpp`
73
+ - [ ] Refactor & document `VelocityPressureTraverseData` class
74
+ - [ ] Refactor & document `Planar` class
75
+ - [ ] Refactor & document `FlangePlane` class
76
+ - [ ] Refactor & document `TraversePlane` class
77
+ - [ ] Refactor & document `MstPlane` class
78
+ - [ ] Refactor & document `Steam System Assessments` module
79
+ - [ ] Refactor & document `Compressed Air Assessments` module
80
+ - [ ] Refactor & document `Energy Treasure Hunt` module
81
+ - [ ] Refactor & document `Simple Equipment and Property Calculators` module
82
+ - [ ] Refactor & document `Waste Water Assessments` module
package/bin/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.11-beta.27",
3
+ "version": "1.0.11-beta.30",
4
4
  "engines": {
5
5
  "node": "20.16.0",
6
6
  "npm": "10.8.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.11-beta.27",
3
+ "version": "1.0.11-beta.30",
4
4
  "engines": {
5
5
  "node": "20.16.0",
6
6
  "npm": "10.8.1"