raain-model 2.6.10 → 3.0.1

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.
Files changed (215) hide show
  1. package/CHANGELOG.md +94 -7
  2. package/README.md +14 -13
  3. package/RELEASE_PROCESS.md +91 -4
  4. package/cartesian/CartesianMeasureValue.d.ts +46 -0
  5. package/{src/cartesian/CartesianMeasureValue.ts → cartesian/CartesianMeasureValue.js} +41 -73
  6. package/cartesian/CartesianMeasureValue.js.map +1 -0
  7. package/cartesian/CartesianTools.d.ts +32 -0
  8. package/{src/cartesian/CartesianTools.ts → cartesian/CartesianTools.js} +69 -130
  9. package/cartesian/CartesianTools.js.map +1 -0
  10. package/cartesian/CartesianValue.d.ts +14 -0
  11. package/cartesian/CartesianValue.js +17 -0
  12. package/cartesian/CartesianValue.js.map +1 -0
  13. package/cartesian/EarthMap.d.ts +5 -0
  14. package/cartesian/EarthMap.js +3 -0
  15. package/cartesian/EarthMap.js.map +1 -0
  16. package/cartesian/ICartesianMeasureValue.d.ts +23 -0
  17. package/cartesian/ICartesianMeasureValue.js +3 -0
  18. package/cartesian/ICartesianMeasureValue.js.map +1 -0
  19. package/cartesian/LatLng.d.ts +16 -0
  20. package/cartesian/LatLng.js +34 -0
  21. package/cartesian/LatLng.js.map +1 -0
  22. package/cartesian/RadarCartesianMeasureValue.d.ts +27 -0
  23. package/cartesian/RadarCartesianMeasureValue.js +24 -0
  24. package/cartesian/RadarCartesianMeasureValue.js.map +1 -0
  25. package/cartesian/RainCartesianMeasureValue.d.ts +25 -0
  26. package/cartesian/RainCartesianMeasureValue.js +25 -0
  27. package/cartesian/RainCartesianMeasureValue.js.map +1 -0
  28. package/cartesian/index.js +25 -0
  29. package/cartesian/index.js.map +1 -0
  30. package/gauge/GaugeMeasure.d.ts +30 -0
  31. package/gauge/GaugeMeasure.js +30 -0
  32. package/gauge/GaugeMeasure.js.map +1 -0
  33. package/gauge/GaugeNode.d.ts +95 -0
  34. package/{src/gauge/GaugeNode.ts → gauge/GaugeNode.js} +28 -54
  35. package/gauge/GaugeNode.js.map +1 -0
  36. package/gauge/GaugeNodeMap.d.ts +35 -0
  37. package/gauge/GaugeNodeMap.js +42 -0
  38. package/gauge/GaugeNodeMap.js.map +1 -0
  39. package/gauge/index.js +20 -0
  40. package/gauge/index.js.map +1 -0
  41. package/index.js +24 -0
  42. package/index.js.map +1 -0
  43. package/organization/EventNode.d.ts +30 -0
  44. package/organization/EventNode.js +30 -0
  45. package/organization/EventNode.js.map +1 -0
  46. package/organization/IVersion.js +3 -0
  47. package/organization/IVersion.js.map +1 -0
  48. package/organization/Link.d.ts +16 -0
  49. package/{src/organization/Link.ts → organization/Link.js} +15 -15
  50. package/organization/Link.js.map +1 -0
  51. package/organization/Measure.d.ts +30 -0
  52. package/organization/Measure.js +51 -0
  53. package/organization/Measure.js.map +1 -0
  54. package/organization/PeopleNode.d.ts +23 -0
  55. package/{src/organization/PeopleNode.ts → organization/PeopleNode.js} +10 -20
  56. package/organization/PeopleNode.js.map +1 -0
  57. package/organization/RaainNode.d.ts +95 -0
  58. package/{src/organization/RaainNode.ts → organization/RaainNode.js} +38 -63
  59. package/organization/RaainNode.js.map +1 -0
  60. package/organization/TeamNode.d.ts +51 -0
  61. package/organization/TeamNode.js +52 -0
  62. package/organization/TeamNode.js.map +1 -0
  63. package/organization/index.js +24 -0
  64. package/organization/index.js.map +1 -0
  65. package/package.json +4 -2
  66. package/polar/AbstractPolarMeasureValue.d.ts +31 -0
  67. package/{src/polar/AbstractPolarMeasureValue.ts → polar/AbstractPolarMeasureValue.js} +34 -62
  68. package/polar/AbstractPolarMeasureValue.js.map +1 -0
  69. package/polar/IPolarMeasureValue.d.ts +19 -0
  70. package/polar/IPolarMeasureValue.js +3 -0
  71. package/polar/IPolarMeasureValue.js.map +1 -0
  72. package/polar/MeasureValuePolarContainer.d.ts +24 -0
  73. package/{src/polar/MeasureValuePolarContainer.ts → polar/MeasureValuePolarContainer.js} +13 -29
  74. package/polar/MeasureValuePolarContainer.js.map +1 -0
  75. package/polar/PolarFilter.d.ts +16 -0
  76. package/polar/PolarFilter.js +45 -0
  77. package/polar/PolarFilter.js.map +1 -0
  78. package/polar/PolarMeasureValue.d.ts +51 -0
  79. package/{src/polar/PolarMeasureValue.ts → polar/PolarMeasureValue.js} +62 -125
  80. package/polar/PolarMeasureValue.js.map +1 -0
  81. package/polar/PolarMeasureValueMap.d.ts +45 -0
  82. package/{src/polar/PolarMeasureValueMap.ts → polar/PolarMeasureValueMap.js} +88 -165
  83. package/polar/PolarMeasureValueMap.js.map +1 -0
  84. package/polar/PolarValue.d.ts +10 -0
  85. package/polar/PolarValue.js +12 -0
  86. package/polar/PolarValue.js.map +1 -0
  87. package/polar/RadarPolarMeasureValue.d.ts +33 -0
  88. package/{src/polar/RadarPolarMeasureValue.ts → polar/RadarPolarMeasureValue.js} +31 -39
  89. package/polar/RadarPolarMeasureValue.js.map +1 -0
  90. package/polar/RainPolarMeasureValue.d.ts +24 -0
  91. package/polar/RainPolarMeasureValue.js +46 -0
  92. package/polar/RainPolarMeasureValue.js.map +1 -0
  93. package/polar/index.js +25 -0
  94. package/polar/index.js.map +1 -0
  95. package/quality/QualityPoint.d.ts +37 -0
  96. package/{src/quality/QualityPoint.ts → quality/QualityPoint.js} +33 -56
  97. package/quality/QualityPoint.js.map +1 -0
  98. package/quality/SpeedMatrix.d.ts +83 -0
  99. package/{src/quality/SpeedMatrix.ts → quality/SpeedMatrix.js} +76 -117
  100. package/quality/SpeedMatrix.js.map +1 -0
  101. package/quality/SpeedMatrixContainer.d.ts +102 -0
  102. package/{src/quality/SpeedMatrixContainer.ts → quality/SpeedMatrixContainer.js} +103 -210
  103. package/quality/SpeedMatrixContainer.js.map +1 -0
  104. package/quality/history/CartesianGaugeHistory.d.ts +15 -0
  105. package/quality/history/CartesianGaugeHistory.js +14 -0
  106. package/quality/history/CartesianGaugeHistory.js.map +1 -0
  107. package/quality/history/CartesianRainHistory.d.ts +9 -0
  108. package/quality/history/CartesianRainHistory.js +11 -0
  109. package/quality/history/CartesianRainHistory.js.map +1 -0
  110. package/quality/history/PositionHistory.d.ts +20 -0
  111. package/quality/history/PositionHistory.js +17 -0
  112. package/quality/history/PositionHistory.js.map +1 -0
  113. package/{src/quality/index.ts → quality/index.d.ts} +0 -3
  114. package/quality/index.js +26 -0
  115. package/quality/index.js.map +1 -0
  116. package/quality/position/Position.d.ts +22 -0
  117. package/quality/position/Position.js +50 -0
  118. package/quality/position/Position.js.map +1 -0
  119. package/quality/position/PositionValue.d.ts +9 -0
  120. package/quality/position/PositionValue.js +12 -0
  121. package/quality/position/PositionValue.js.map +1 -0
  122. package/quality/tools/QualityTools.d.ts +9 -0
  123. package/{src/quality/tools/QualityTools.ts → quality/tools/QualityTools.js} +17 -18
  124. package/quality/tools/QualityTools.js.map +1 -0
  125. package/radar/RadarMeasure.d.ts +38 -0
  126. package/radar/RadarMeasure.js +33 -0
  127. package/radar/RadarMeasure.js.map +1 -0
  128. package/radar/RadarNode.d.ts +41 -0
  129. package/radar/RadarNode.js +58 -0
  130. package/radar/RadarNode.js.map +1 -0
  131. package/radar/RadarNodeMap.d.ts +51 -0
  132. package/radar/RadarNodeMap.js +50 -0
  133. package/radar/RadarNodeMap.js.map +1 -0
  134. package/radar/index.js +20 -0
  135. package/radar/index.js.map +1 -0
  136. package/rain/MergeStrategy.d.ts +13 -0
  137. package/rain/MergeStrategy.js +11 -0
  138. package/rain/MergeStrategy.js.map +1 -0
  139. package/rain/RainComputation.d.ts +59 -0
  140. package/rain/RainComputation.js +68 -0
  141. package/rain/RainComputation.js.map +1 -0
  142. package/rain/RainComputationAbstract.d.ts +89 -0
  143. package/rain/RainComputationAbstract.js +207 -0
  144. package/rain/RainComputationAbstract.js.map +1 -0
  145. package/rain/RainComputationMap.d.ts +113 -0
  146. package/{src/rain/RainComputationMap.ts → rain/RainComputationMap.js} +26 -60
  147. package/rain/RainComputationMap.js.map +1 -0
  148. package/rain/RainComputationQuality.d.ts +58 -0
  149. package/{src/rain/RainComputationQuality.ts → rain/RainComputationQuality.js} +52 -89
  150. package/rain/RainComputationQuality.js.map +1 -0
  151. package/rain/RainMeasure.d.ts +17 -0
  152. package/rain/RainMeasure.js +18 -0
  153. package/rain/RainMeasure.js.map +1 -0
  154. package/rain/RainNode.d.ts +60 -0
  155. package/rain/RainNode.js +198 -0
  156. package/rain/RainNode.js.map +1 -0
  157. package/{src/rain/index.ts → rain/index.d.ts} +1 -0
  158. package/rain/index.js +24 -0
  159. package/rain/index.js.map +1 -0
  160. package/.cursorignore +0 -10
  161. package/.github/workflows/ci.yml +0 -29
  162. package/LICENSE +0 -21
  163. package/RELEASE.md +0 -19
  164. package/specs/REQUIREMENTS.md +0 -42
  165. package/specs/TECHNICAL.md +0 -57
  166. package/specs/cartesian/Cartesian.spec.ts +0 -82
  167. package/specs/cartesian/CartesianTools.spec.ts +0 -121
  168. package/specs/gauge/Gauge.spec.ts +0 -39
  169. package/specs/organization/Organization.spec.ts +0 -38
  170. package/specs/polar/Polar.spec.ts +0 -267
  171. package/specs/quality/Position.spec.ts +0 -18
  172. package/specs/quality/QualityPointEdgeCases.spec.ts +0 -215
  173. package/specs/quality/QualityTools.spec.ts +0 -67
  174. package/specs/quality/SpeedMatrix.spec.ts +0 -214
  175. package/specs/radar/Radar.spec.ts +0 -129
  176. package/specs/rain/Rain.spec.ts +0 -334
  177. package/specs/tsconfig.json +0 -12
  178. package/src/cartesian/CartesianValue.ts +0 -26
  179. package/src/cartesian/EarthMap.ts +0 -5
  180. package/src/cartesian/ICartesianMeasureValue.ts +0 -22
  181. package/src/cartesian/LatLng.ts +0 -43
  182. package/src/cartesian/RadarCartesianMeasureValue.ts +0 -32
  183. package/src/cartesian/RainCartesianMeasureValue.ts +0 -32
  184. package/src/gauge/GaugeMeasure.ts +0 -42
  185. package/src/gauge/GaugeNodeMap.ts +0 -55
  186. package/src/organization/EventNode.ts +0 -43
  187. package/src/organization/Measure.ts +0 -61
  188. package/src/organization/TeamNode.ts +0 -91
  189. package/src/polar/IPolarMeasureValue.ts +0 -21
  190. package/src/polar/PolarFilter.ts +0 -46
  191. package/src/polar/PolarValue.ts +0 -16
  192. package/src/polar/RainPolarMeasureValue.ts +0 -57
  193. package/src/quality/history/CartesianGaugeHistory.ts +0 -23
  194. package/src/quality/history/CartesianRainHistory.ts +0 -15
  195. package/src/quality/history/PositionHistory.ts +0 -31
  196. package/src/quality/position/Position.ts +0 -59
  197. package/src/quality/position/PositionValue.ts +0 -15
  198. package/src/radar/RadarMeasure.ts +0 -41
  199. package/src/radar/RadarNode.ts +0 -78
  200. package/src/radar/RadarNodeMap.ts +0 -61
  201. package/src/rain/MergeStrategy.ts +0 -15
  202. package/src/rain/RainComputation.ts +0 -96
  203. package/src/rain/RainComputationAbstract.ts +0 -262
  204. package/src/rain/RainMeasure.ts +0 -25
  205. package/src/rain/RainNode.ts +0 -235
  206. package/tsconfig.json +0 -17
  207. package/tslint.json +0 -79
  208. package/typedoc.json +0 -31
  209. /package/{src/cartesian/index.ts → cartesian/index.d.ts} +0 -0
  210. /package/{src/gauge/index.ts → gauge/index.d.ts} +0 -0
  211. /package/{src/index.ts → index.d.ts} +0 -0
  212. /package/{src/organization/IVersion.ts → organization/IVersion.d.ts} +0 -0
  213. /package/{src/organization/index.ts → organization/index.d.ts} +0 -0
  214. /package/{src/polar/index.ts → polar/index.d.ts} +0 -0
  215. /package/{src/radar/index.ts → radar/index.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,160 +7,247 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [2.6.10] - 2025-03-22
10
+ ## [3.0.1] - 2025-04-17
11
+
11
12
  ### Added
13
+
14
+ - Major version upgrade to 3.0.0
15
+ - Enhanced TypeScript 5.0.4 support
16
+ - Improved documentation and API references
17
+ - Additional test coverage
18
+
19
+ ### Changed
20
+
21
+ - Refactored core components for better performance
22
+ - Updated dependencies to latest versions
23
+ - Improved error handling and type safety
24
+
25
+ ### Technical Details
26
+
27
+ - Optimized data structures for radar and rain processing
28
+ - Enhanced coordinate transformation algorithms
29
+ - Improved quality metrics calculation
30
+
31
+ ## [2.6.11] - 2025-03-22
32
+
33
+ ### Added
34
+
12
35
  - Planning new feature implementations
13
36
  - Considering additional testing frameworks
14
37
 
15
38
  ### Changed
39
+
16
40
  - Ongoing documentation improvements
17
41
  - Code structure refinements
18
42
 
19
43
  ### Dependencies
44
+
20
45
  - Planning to update TypeScript dependencies
21
46
  - Considering new quality measurement tools integration
22
47
 
23
48
  ### Technical Details
49
+
24
50
  - Investigating performance optimizations
25
51
  - Exploring new quality metric algorithms
26
52
 
27
53
  ## [2.6.9] - 2025-03-21
54
+
28
55
  ### Added
56
+
29
57
  - MIT license file
30
58
  - TypeDoc configuration for API documentation
31
59
  - Enhanced documentation for core components
32
60
 
33
61
  ### Changed
62
+
34
63
  - Updated CI workflow configuration
35
64
  - Improved core components:
36
- - Enhanced RainNode computation capabilities
37
- - Updated GaugeNode station management
38
- - Refined organization structure (RaainNode, TeamNode)
65
+ - Enhanced RainNode computation capabilities
66
+ - Updated GaugeNode station management
67
+ - Refined organization structure (RaainNode, TeamNode)
39
68
 
40
69
  ### Dependencies
70
+
41
71
  - Updated dependencies to latest versions
42
72
  - Upgraded TypeScript to ^5.0.4
43
73
  - Updated testing frameworks
44
74
 
45
75
  ### Technical Details
76
+
46
77
  - Improved polar measurement value filtering
47
78
  - Enhanced speed matrix container comparison calculations
48
79
  - Refined quality control mechanisms
49
80
 
50
81
  ## [2.6.8] - 2025-03-16
82
+
51
83
  ### Fixed
84
+
52
85
  - PolarMeasureValue getFiltered functionality
53
86
 
54
87
  ### Technical Details
88
+
55
89
  - Optimized filtering algorithms
56
90
  - Improved error handling in measurement processing
57
91
 
58
92
  ## [2.6.7] - 2025-02-24
93
+
59
94
  ### Fixed
95
+
60
96
  - SpeedMatrixContainer BuildCompares calculations
61
97
  - Quality point calculations and metrics
62
98
  - CartesianRainHistory tracking improvements
63
99
  - QualityTools refinements
64
100
 
65
101
  ### Dependencies
102
+
66
103
  - Updated dependencies to patch security vulnerabilities
67
104
 
68
105
  ### Technical Details
106
+
69
107
  - Improved matrix comparison algorithms
70
108
  - Enhanced quality metric calculations
71
109
  - Optimized history tracking mechanisms
72
110
 
73
111
  ## [2.6.0] - 2024
112
+
74
113
  ### Added
114
+
75
115
  - Unified Cartesian map tools
76
116
  - Improved map manipulation utilities
77
117
 
78
118
  ## [2.5.0] - 2024
119
+
79
120
  ### Added
121
+
80
122
  - Polar and Cartesian limits (count + offsets)
81
123
  - PolarMap for index manipulation
82
124
 
83
125
  ## [2.4.0] - 2024
126
+
84
127
  ### Changed
128
+
85
129
  - Moved role to roles in PeopleNode
86
130
  - Improved role management system
87
131
 
88
132
  ## [2.3.0] - 2024
133
+
89
134
  ### Changed
135
+
90
136
  - Refactored Angle/Axis system
91
137
  - Improved angular calculations
92
138
 
93
139
  ## [2.2.0] - 2024
140
+
94
141
  ### Changed
142
+
95
143
  - Refactored BuildCompares functionality
96
144
  - Enhanced comparison algorithms
97
145
 
98
146
  ## [2.1.0] - 2023
147
+
99
148
  ### Added
149
+
100
150
  - Extended RainComputationQuality with rainComputation's link
101
151
  - Added getQualityPointsByHistoricalPosition method
102
152
 
103
153
  ## [2.0.0] - 2023
154
+
104
155
  ### Changed
156
+
105
157
  - More flexible configuration system for rain, radar, and gauge
106
158
  - Restructured Rain zone to use LatLng rects
107
159
  - Removed period usage in favor of date
108
160
 
109
161
  ## [1.11.0] - 2023
162
+
110
163
  ### Changed
164
+
111
165
  - Modified SpeedMatrixContainer's QualityPoints relation (1:N)
112
166
  - Added SpeedMatrix name property
113
167
 
114
168
  ## [1.10.0] - 2023
169
+
115
170
  ### Added
171
+
116
172
  - Object constructor based on JSON only
117
173
  - Added specifications
118
174
 
119
175
  ## [1.9.0] - 2023
176
+
120
177
  ### Added
178
+
121
179
  - Cartesian improvements
122
180
  - Enhanced coordinate system
123
181
 
124
182
  ## [0.4.0] - 2022
183
+
125
184
  ### Changed
185
+
126
186
  - Implemented Cartesian values
127
187
  - Reorganized folders
128
188
  - Renamed Polar objects (XX-MeasureValue to XX-PolarMeasureValue)
129
189
 
130
190
  ## [0.3.0] - 2022
191
+
131
192
  ### Added
193
+
132
194
  - Added IVersion interface
133
195
  - Implemented CI/CD pipeline
134
196
 
135
197
  ### Changed
198
+
136
199
  - Reformatted Links structure
137
200
 
138
201
  ## [0.2.0] - 2022
202
+
139
203
  ### Added
204
+
140
205
  - Customer teams functionality
141
206
  - Radar implementation
142
207
 
143
208
  ## [0.0.1] - 2022
209
+
144
210
  ### Added
211
+
145
212
  - Initial release
146
213
  - First extracts from RAAIN services
147
214
 
148
- [Unreleased]: https://github.com/raainio/raain-model/compare/v2.6.10...HEAD
149
- [2.6.10]: https://github.com/raainio/raain-model/compare/v2.6.9...v2.6.10
215
+ [Unreleased]: https://github.com/raainio/raain-model/compare/v3.0.1...HEAD
216
+
217
+ [3.0.1]: https://github.com/raainio/raain-model/compare/v2.6.11...v3.0.1
218
+
219
+ [2.6.11]: https://github.com/raainio/raain-model/compare/v2.6.9...v2.6.11
220
+
150
221
  [2.6.9]: https://github.com/raainio/raain-model/compare/v2.6.8...v2.6.9
222
+
151
223
  [2.6.8]: https://github.com/raainio/raain-model/compare/v2.6.7...v2.6.8
224
+
152
225
  [2.6.7]: https://github.com/raainio/raain-model/compare/v2.6.6...v2.6.7
226
+
153
227
  [2.6.0]: https://github.com/raainio/raain-model/compare/v2.5.0...v2.6.0
228
+
154
229
  [2.5.0]: https://github.com/raainio/raain-model/compare/v2.4.0...v2.5.0
230
+
155
231
  [2.4.0]: https://github.com/raainio/raain-model/compare/v2.3.0...v2.4.0
232
+
156
233
  [2.3.0]: https://github.com/raainio/raain-model/compare/v2.2.0...v2.3.0
234
+
157
235
  [2.2.0]: https://github.com/raainio/raain-model/compare/v2.1.0...v2.2.0
236
+
158
237
  [2.1.0]: https://github.com/raainio/raain-model/compare/v2.0.0...v2.1.0
238
+
159
239
  [2.0.0]: https://github.com/raainio/raain-model/compare/v1.11.0...v2.0.0
240
+
160
241
  [1.11.0]: https://github.com/raainio/raain-model/compare/v1.10.0...v1.11.0
242
+
161
243
  [1.10.0]: https://github.com/raainio/raain-model/compare/v1.9.0...v1.10.0
244
+
162
245
  [1.9.0]: https://github.com/raainio/raain-model/compare/v0.4.0...v1.9.0
246
+
163
247
  [0.4.0]: https://github.com/raainio/raain-model/compare/v0.3.0...v0.4.0
248
+
164
249
  [0.3.0]: https://github.com/raainio/raain-model/compare/v0.2.0...v0.3.0
250
+
165
251
  [0.2.0]: https://github.com/raainio/raain-model/compare/v0.0.1...v0.2.0
166
- [0.0.1]: https://github.com/raainio/raain-model/releases/tag/v0.0.1
252
+
253
+ [0.0.1]: https://github.com/raainio/raain-model/releases/tag/v0.0.1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/raain-model.svg)](https://badge.fury.io/js/raain-model)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-4.9.5-blue.svg)](https://www.typescriptlang.org/)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0.4-blue.svg)](https://www.typescriptlang.org/)
6
6
  [![Build Status](https://github.com/raainio/raain-model/actions/workflows/ci.yml/badge.svg)](https://github.com/raainio/raain-model/actions)
7
7
 
8
8
  > A TypeScript library for radar-based rain measurement and analysis, used in [radartorain.com](https://radartorain.com)
@@ -61,6 +61,17 @@ const computation = new RainComputationMap({
61
61
  Visit [documentation](https://raainio.github.io/raain-model)
62
62
  and [swagger](https://api.sandbox.radartorain.com/v2/docs).
63
63
 
64
+ ### Memory Bank
65
+
66
+ This project uses a Memory Bank for comprehensive documentation and context retention. The Memory Bank is located in the `.memory-bank` directory and contains the following files:
67
+
68
+ - `projectbrief.md`: Overview of the project, core requirements, and goals
69
+ - `productContext.md`: Why the project exists, problems it solves, and how it works
70
+ - `systemPatterns.md`: System architecture, key technical decisions, and design patterns
71
+ - `techContext.md`: Technologies used, development setup, and technical constraints
72
+ - `activeContext.md`: Current work focus, recent changes, and next steps
73
+ - `progress.md`: What works, what's left to build, and known issues
74
+
64
75
  ### Key Components
65
76
 
66
77
  - `RainNode`: Core class for rain measurement nodes
@@ -79,20 +90,10 @@ npm test
79
90
  npm run test:coverage
80
91
  ```
81
92
 
82
- ## 🤝 Contributing
83
-
84
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
85
-
86
93
  ## 📝 License
87
94
 
88
95
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
89
96
 
90
- ## 📅 Release Notes
91
-
92
- See [Release notes](./RELEASE.md) for version history and changes.
93
-
94
- ## 🔗 Links
97
+ ## 📅 Changelog
95
98
 
96
- - [Website](https://radartorain.com)
97
- - [API Documentation](https://api.sandbox.radartorain.com/docs)
98
- - [GitHub Issues](https://github.com/raainio/raain-model/issues)
99
+ See [Changelog](./CHANGELOG.md) for version history and changes.
@@ -1,5 +1,13 @@
1
1
  # Release Process Documentation
2
2
 
3
+ ⚠️ IMPORTANT: DO NOT PUSH ANY CHANGES OR TAGS UNTIL EXPLICITLY ASKED TO "RELEASE"
4
+ This includes:
5
+ - No git push
6
+ - No git push --tags
7
+ - No npm publish
8
+ - No manual releases
9
+ Wait for the explicit "release" command before pushing anything.
10
+
3
11
  ## Patch Version Release Steps
4
12
 
5
13
  ### Prerequisites
@@ -27,6 +35,20 @@
27
35
  - specs/*.md files
28
36
  - CHANGELOG.md
29
37
 
38
+ 3. **Update Version Number**
39
+ ```bash
40
+ npm run build-version
41
+ ```
42
+ This command automatically increments the patch version in package.json.
43
+
44
+ 4. **Update CHANGELOG.md**
45
+ - Move items from [Unreleased] section to a new version section
46
+ - Run the update-changelog script to automatically add the current system date in ISO format (YYYY-MM-DD):
47
+ ```bash
48
+ npm run update-changelog
49
+ ```
50
+ - Update the version comparison links at the bottom of the file
51
+
30
52
  5. **Version Control**
31
53
  ```bash
32
54
  git add .
@@ -35,9 +57,43 @@
35
57
  git push
36
58
  git push --tags
37
59
  ```
38
- Replace X.Y.Z with the actual version number and provide a clear explanation of changes.
60
+ Replace X.Y.Z with the actual version number from package.json and provide a clear explanation of changes.
61
+
62
+ ## Minor and Major Version Release Steps
63
+
64
+ For minor (feature) and major (breaking change) version releases, follow the same steps as for patch releases, with these differences:
65
+
66
+ ### Minor Version (Features)
67
+
68
+ 1. Use the following command instead of `npm run build-version`:
69
+ ```bash
70
+ npm version minor --no-git-tag-version
71
+ ```
72
+
73
+ 2. In the commit message, use:
74
+ ```bash
75
+ git commit -m "release: minor version X.Y.0 with [explanation of new features]"
76
+ ```
39
77
 
40
- ## For all Version Release Steps (Patch or Release)
78
+ 3. Ensure all new features are properly documented in the CHANGELOG.md
79
+
80
+ ### Major Version (Breaking Changes)
81
+
82
+ 1. Use the following command instead of `npm run build-version`:
83
+ ```bash
84
+ npm version major --no-git-tag-version
85
+ ```
86
+
87
+ 2. In the commit message, use:
88
+ ```bash
89
+ git commit -m "release: major version X.0.0 with [explanation of breaking changes]"
90
+ ```
91
+
92
+ 3. Ensure all breaking changes are clearly documented in the CHANGELOG.md
93
+ 4. Update the README.md to reflect any changes in usage patterns
94
+ 5. Consider creating a migration guide for users upgrading from the previous major version
95
+
96
+ ## For all Version Release Steps (Patch, Minor, or Major)
41
97
 
42
98
  ### Important Notes
43
99
 
@@ -48,6 +104,18 @@
48
104
  ### Post-Release Verification
49
105
 
50
106
  - Verify the release is properly tagged
107
+ - Test the build process:
108
+ ```bash
109
+ npm run build
110
+ ```
111
+ - Verify the built package can be installed:
112
+ ```bash
113
+ cd dist
114
+ npm pack
115
+ # This creates a .tgz file that can be installed locally
116
+ # Install in a test project to verify it works:
117
+ # npm install /path/to/raain-model-X.Y.Z.tgz
118
+ ```
51
119
 
52
120
  ### Version Management Best Practices
53
121
 
@@ -73,8 +141,11 @@
73
141
 
74
142
  ### Common Pitfalls to Avoid
75
143
 
144
+ - Don't push any changes before receiving explicit "release" command
76
145
  - Don't create tags with placeholder version numbers (X.Y.Z)
77
- - Don't forget to push both commits and tags
146
+ - Don't forget to push both commits and tags (only after "release" command)
147
+ - Don't manually publish to npm
148
+ - Don't bypass CI process
78
149
 
79
150
  ### Recovery Procedures
80
151
 
@@ -102,10 +173,26 @@ If merge conflicts occur:
102
173
  - Return to the root directory for git operations
103
174
  - Use absolute paths when necessary to avoid confusion
104
175
 
176
+ ### CI/CD Integration
177
+
178
+ This project uses GitHub Actions for continuous integration and deployment. The CI workflow is defined in `.github/workflows/ci.yml` and is triggered on pushes to the master branch. The workflow includes:
179
+
180
+ - Running tests
181
+ - Building the project
182
+ - Generating documentation and deploying to GitHub Pages
183
+ - Publishing the package to npm
184
+
185
+ To ensure successful CI/CD:
186
+ - Always verify that tests pass locally before pushing to master
187
+ - Check the GitHub Actions tab after pushing to monitor the workflow
188
+ - Address any CI failures immediately
189
+ - Ensure you have the necessary secrets configured (NPM_TOKEN) for npm publishing
190
+
105
191
  ### Future Improvements
106
192
 
107
193
  - Consider automating version consistency checks
108
194
  - Add pre-commit hooks for version validation
109
195
  - Implement automated changelog updates
110
196
  - Add automated testing of the release process
111
- - Consider implementing a release automation script
197
+ - Consider implementing a release automation script
198
+ - Enhance the CI/CD pipeline with additional checks and deployments
@@ -0,0 +1,46 @@
1
+ import { ICartesianMeasureValue } from './ICartesianMeasureValue';
2
+ import { CartesianValue } from './CartesianValue';
3
+ import { LatLng } from './LatLng';
4
+ export declare class CartesianMeasureValue implements ICartesianMeasureValue {
5
+ protected cartesianValues: CartesianValue[];
6
+ protected limitPoints: [LatLng, LatLng];
7
+ constructor(json: {
8
+ cartesianValues: string | CartesianValue[];
9
+ limitPoints?: [LatLng, LatLng];
10
+ });
11
+ static From(obj: ICartesianMeasureValue | any): CartesianMeasureValue;
12
+ getCartesianValuesStringified(): string;
13
+ getCartesianValues(): CartesianValue[];
14
+ setCartesianValues(cartesianValues: CartesianValue[]): void;
15
+ setCartesianValuesAsString(s: string): void;
16
+ toJSON(options?: {
17
+ stringify: boolean;
18
+ }): {
19
+ cartesianValues: string | CartesianValue[];
20
+ limitPoints: [LatLng, LatLng];
21
+ };
22
+ toJSONWithCartesianValuesStringified(): {
23
+ cartesianValues: string | CartesianValue[];
24
+ limitPoints: [LatLng, LatLng];
25
+ };
26
+ getCartesianValue(json: {
27
+ lat: number;
28
+ lng: number;
29
+ }): CartesianValue;
30
+ getCartesianValueRounded(json: {
31
+ lat: number;
32
+ lng: number;
33
+ scale: LatLng;
34
+ }): CartesianValue;
35
+ setCartesianValue(json: {
36
+ lat: number;
37
+ lng: number;
38
+ value: number;
39
+ }): void;
40
+ getLimitPoints(options?: {
41
+ forceCompute: boolean;
42
+ }): [LatLng, LatLng];
43
+ setLimitPoints(point1: LatLng, point2: LatLng): void;
44
+ protected setCartesianValuesAsAny(cartesianValues: any): void;
45
+ protected computeLimits(): void;
46
+ }
@@ -1,88 +1,66 @@
1
- import {ICartesianMeasureValue} from './ICartesianMeasureValue';
2
- import {CartesianValue} from './CartesianValue';
3
- import {LatLng} from './LatLng';
4
-
5
- export class CartesianMeasureValue implements ICartesianMeasureValue {
6
-
7
- protected cartesianValues: CartesianValue[];
8
- protected limitPoints: [LatLng, LatLng];
9
-
10
- constructor(json: {
11
- cartesianValues: string | CartesianValue[],
12
- limitPoints?: [LatLng, LatLng]
13
- }
14
- ) {
15
-
16
- if (!json?.cartesianValues) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CartesianMeasureValue = void 0;
4
+ const CartesianValue_1 = require("./CartesianValue");
5
+ const LatLng_1 = require("./LatLng");
6
+ class CartesianMeasureValue {
7
+ constructor(json) {
8
+ var _a;
9
+ if (!(json === null || json === void 0 ? void 0 : json.cartesianValues)) {
17
10
  throw new Error('CartesianMeasureValue needs cartesianValues');
18
11
  }
19
-
20
12
  this.setCartesianValuesAsAny(json.cartesianValues);
21
- if (json.limitPoints?.length === 2) {
13
+ if (((_a = json.limitPoints) === null || _a === void 0 ? void 0 : _a.length) === 2) {
22
14
  this.setLimitPoints(json.limitPoints[0], json.limitPoints[1]);
23
15
  }
24
16
  }
25
-
26
- static From(obj: ICartesianMeasureValue | any): CartesianMeasureValue {
17
+ static From(obj) {
27
18
  const created = new CartesianMeasureValue({
28
19
  cartesianValues: [],
29
20
  });
30
-
31
21
  if (typeof obj.cartesianValues !== 'undefined') {
32
22
  created.setCartesianValuesAsAny(obj.cartesianValues);
33
23
  }
34
-
35
24
  if (Array.isArray(obj.limitPoints) && obj.limitPoints.length === 2) {
36
25
  created.setLimitPoints(obj.limitPoints[0], obj.limitPoints[1]);
37
26
  }
38
-
39
27
  return created;
40
28
  }
41
-
42
- getCartesianValuesStringified(): string {
43
- return JSON.stringify({cartesianValues: this.cartesianValues});
29
+ getCartesianValuesStringified() {
30
+ return JSON.stringify({ cartesianValues: this.cartesianValues });
44
31
  }
45
-
46
- getCartesianValues(): CartesianValue[] {
32
+ getCartesianValues() {
47
33
  return this.cartesianValues;
48
34
  }
49
-
50
- setCartesianValues(cartesianValues: CartesianValue[]): void {
35
+ setCartesianValues(cartesianValues) {
51
36
  this.cartesianValues = cartesianValues;
52
37
  }
53
-
54
- setCartesianValuesAsString(s: string): void {
38
+ setCartesianValuesAsString(s) {
55
39
  let values = JSON.parse(s);
56
40
  if (values.cartesianValues) {
57
41
  values = values.cartesianValues;
58
42
  }
59
-
60
43
  if (Array.isArray(values)) {
61
44
  this.cartesianValues = [];
62
45
  values.forEach(v => {
63
- this.cartesianValues.push(new CartesianValue(v));
46
+ this.cartesianValues.push(new CartesianValue_1.CartesianValue(v));
64
47
  });
65
48
  }
66
49
  }
67
-
68
- toJSON(options = {stringify: false}): any {
69
-
70
- let cartesianValues: any = this.cartesianValues;
50
+ toJSON(options = { stringify: false }) {
51
+ let cartesianValues = this.cartesianValues;
71
52
  if (options.stringify) {
72
- cartesianValues = JSON.stringify(this.cartesianValues)
53
+ cartesianValues = JSON.stringify(this.cartesianValues);
73
54
  }
74
-
75
55
  return {
76
56
  cartesianValues,
77
57
  limitPoints: this.getLimitPoints(),
78
58
  };
79
59
  }
80
-
81
- toJSONWithCartesianValuesStringified(): any {
82
- return this.toJSON({stringify: true});
60
+ toJSONWithCartesianValuesStringified() {
61
+ return this.toJSON({ stringify: true });
83
62
  }
84
-
85
- getCartesianValue(json: { lat: number, lng: number }): CartesianValue {
63
+ getCartesianValue(json) {
86
64
  for (const value of this.cartesianValues) {
87
65
  if (value.lat === json.lat && value.lng === json.lng) {
88
66
  return value;
@@ -90,12 +68,7 @@ export class CartesianMeasureValue implements ICartesianMeasureValue {
90
68
  }
91
69
  return null;
92
70
  }
93
-
94
- getCartesianValueRounded(json: {
95
- lat: number,
96
- lng: number,
97
- scale: LatLng
98
- }): CartesianValue {
71
+ getCartesianValueRounded(json) {
99
72
  for (const value of this.cartesianValues) {
100
73
  const latRounded1 = Math.round(json.lat / json.scale.lat) * json.scale.lat;
101
74
  const lngRounded1 = Math.round(json.lng / json.scale.lng) * json.scale.lng;
@@ -107,40 +80,35 @@ export class CartesianMeasureValue implements ICartesianMeasureValue {
107
80
  }
108
81
  return null;
109
82
  }
110
-
111
- setCartesianValue(json: { lat: number, lng: number, value: number }): void {
112
- this.cartesianValues.push(new CartesianValue(json));
83
+ setCartesianValue(json) {
84
+ this.cartesianValues.push(new CartesianValue_1.CartesianValue(json));
113
85
  }
114
-
115
- getLimitPoints(options = {forceCompute: false}): [LatLng, LatLng] {
86
+ getLimitPoints(options = { forceCompute: false }) {
116
87
  if (options.forceCompute || !this.limitPoints || this.limitPoints.length !== 2) {
117
88
  this.computeLimits();
118
89
  }
119
90
  return this.limitPoints;
120
91
  }
121
-
122
- setLimitPoints(point1: LatLng, point2: LatLng) {
92
+ setLimitPoints(point1, point2) {
123
93
  this.limitPoints = [
124
- new LatLng({lat: point1.lat, lng: point1.lng}),
125
- new LatLng({lat: point2.lat, lng: point2.lng})
94
+ new LatLng_1.LatLng({ lat: point1.lat, lng: point1.lng }),
95
+ new LatLng_1.LatLng({ lat: point2.lat, lng: point2.lng })
126
96
  ];
127
97
  }
128
-
129
- protected setCartesianValuesAsAny(cartesianValues: any) {
98
+ setCartesianValuesAsAny(cartesianValues) {
130
99
  if (typeof cartesianValues === 'string') {
131
100
  this.setCartesianValuesAsString(cartesianValues);
132
- } else {
101
+ }
102
+ else {
133
103
  this.setCartesianValues(cartesianValues);
134
104
  }
135
105
  }
136
-
137
- protected computeLimits() {
106
+ computeLimits() {
138
107
  this.limitPoints = undefined;
139
- let p1Lat: number;
140
- let p1Lng: number;
141
- let p2Lat: number;
142
- let p2Lng: number;
143
-
108
+ let p1Lat;
109
+ let p1Lng;
110
+ let p2Lat;
111
+ let p2Lng;
144
112
  for (const cartesianValue of this.cartesianValues) {
145
113
  if (typeof p1Lat === 'undefined' || cartesianValue.lat < p1Lat) {
146
114
  p1Lat = cartesianValue.lat;
@@ -155,11 +123,11 @@ export class CartesianMeasureValue implements ICartesianMeasureValue {
155
123
  p2Lng = cartesianValue.lng;
156
124
  }
157
125
  }
158
-
159
126
  if (typeof p1Lat !== 'undefined' && typeof p1Lng !== 'undefined' &&
160
127
  typeof p2Lat !== 'undefined' && typeof p2Lng !== 'undefined') {
161
- this.setLimitPoints(new LatLng({lat: p1Lat, lng: p1Lng}),
162
- new LatLng({lat: p2Lat, lng: p2Lng}));
128
+ this.setLimitPoints(new LatLng_1.LatLng({ lat: p1Lat, lng: p1Lng }), new LatLng_1.LatLng({ lat: p2Lat, lng: p2Lng }));
163
129
  }
164
130
  }
165
131
  }
132
+ exports.CartesianMeasureValue = CartesianMeasureValue;
133
+ //# sourceMappingURL=CartesianMeasureValue.js.map