unitsml 0.4.7 → 0.5.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/docs/README.adoc +104 -2
  3. data/lib/unitsml/dimension.rb +1 -1
  4. data/lib/unitsml/fenced.rb +77 -0
  5. data/lib/unitsml/formula.rb +21 -8
  6. data/lib/unitsml/intermediate_exp_rules.rb +35 -0
  7. data/lib/unitsml/parse.rb +16 -25
  8. data/lib/unitsml/parser.rb +19 -4
  9. data/lib/unitsml/prefix.rb +10 -10
  10. data/lib/unitsml/transform.rb +31 -0
  11. data/lib/unitsml/unit.rb +29 -7
  12. data/lib/unitsml/unitsdb/dimension.rb +12 -18
  13. data/lib/unitsml/unitsdb/dimension_quantity.rb +2 -6
  14. data/lib/unitsml/unitsdb/dimensions.rb +4 -8
  15. data/lib/unitsml/unitsdb/prefix_reference.rb +23 -0
  16. data/lib/unitsml/unitsdb/prefixes.rb +19 -5
  17. data/lib/unitsml/unitsdb/quantities.rb +6 -4
  18. data/lib/unitsml/unitsdb/unit.rb +21 -0
  19. data/lib/unitsml/unitsdb/units.rb +20 -17
  20. data/lib/unitsml/unitsdb.rb +8 -4
  21. data/lib/unitsml/utility.rb +36 -44
  22. data/lib/unitsml/version.rb +1 -1
  23. data/lib/unitsml.rb +34 -16
  24. data/unitsdb/LICENSE.md +53 -0
  25. data/unitsdb/README.adoc +1071 -0
  26. data/unitsdb/RELEASE-NOTES.adoc +269 -0
  27. data/unitsdb/dimensions.yaml +1255 -602
  28. data/unitsdb/prefixes.yaml +742 -301
  29. data/unitsdb/quantities.yaml +3104 -2458
  30. data/unitsdb/scales.yaml +97 -0
  31. data/unitsdb/schemas/README.md +159 -0
  32. data/unitsdb/schemas/dimensions-schema.yaml +157 -0
  33. data/unitsdb/schemas/prefixes-schema.yaml +159 -0
  34. data/unitsdb/schemas/quantities-schema.yaml +120 -0
  35. data/unitsdb/schemas/scales-schema.yaml +109 -0
  36. data/unitsdb/schemas/unit_systems-schema.yaml +120 -0
  37. data/unitsdb/schemas/units-schema.yaml +219 -0
  38. data/unitsdb/spec/units_spec.rb +11 -10
  39. data/unitsdb/unit_systems.yaml +73 -15
  40. data/unitsdb/units.yaml +12566 -9974
  41. data/unitsdb/validate_schemas.rb +208 -0
  42. data/unitsml.gemspec +2 -1
  43. metadata +34 -6
  44. data/unitsdb/docs/README.adoc +0 -12
  45. data/unitsdb/docs/navigation.adoc +0 -7
@@ -0,0 +1,269 @@
1
+ = UnitsDB release notes
2
+
3
+ == v2.0.0
4
+
5
+ === Introduction
6
+
7
+ This document describes the changes introduced in UnitsDB version 2.0.0 compared
8
+ to version 1.0.0. UnitsDB 2.0.0 represents a major architectural and content
9
+ update with significant structural changes and content enhancements.
10
+
11
+ === Benefits
12
+
13
+ * Better multilingual support enables localized applications
14
+ * More comprehensive symbol formats simplify integration with various display technologies
15
+ * Standardized references to external resources provide better interoperability
16
+ * Enhanced structure allows for more consistent data validation
17
+ * Additional quantities and dimensions support a wider range of scientific applications
18
+
19
+ === Major structural changes
20
+
21
+ These changes represent the significant architectural updates in UnitsDB 2.0.0.
22
+
23
+ ==== Schema structure
24
+
25
+ * Added `schema_version: "2.0.0"` field to all YAML files for consistent versioning
26
+ * Reorganized YAML structure with more consistent hierarchical organization
27
+ * Changed from flat object structure to list-based structure with common fields pattern
28
+
29
+ Relevant issues/pull requests:
30
+
31
+ * link:https://github.com/unitsml/unitsdb/pull/101[#101]
32
+ * link:https://github.com/unitsml/unitsdb/issues/100[#100]
33
+
34
+ ==== Identifiers and references
35
+
36
+ * Introduced formalized `identifiers` section for all entities:
37
+ +
38
+ [source,yaml]
39
+ ----
40
+ identifiers:
41
+ - id: NISTd1
42
+ type: nist
43
+ ----
44
+
45
+ * Added organization-neutral 'unitsml' type identifiers to all entities:
46
+ +
47
+ [source,yaml]
48
+ ----
49
+ identifiers:
50
+ - id: u:meter
51
+ type: unitsml
52
+ - id: NISTu1
53
+ type: nist
54
+ ----
55
+
56
+ * Added standard `references` field to entities linking to external resources:
57
+ +
58
+ [source,yaml]
59
+ ----
60
+ references:
61
+ - uri: http://si-digital-framework.org/quantities/LENG
62
+ type: normative
63
+ authority: si-digital-framework
64
+ ----
65
+
66
+ Relevant issues/pull requests:
67
+
68
+ * link:https://github.com/unitsml/unitsdb/pull/85[#85]
69
+ * link:https://github.com/unitsml/unitsdb/issues/86[#86]
70
+ * link:https://github.com/unitsml/unitsdb/issues/63[#63]
71
+
72
+ ==== Multilingual support
73
+
74
+ * Restructured `names` field to support multiple languages:
75
+ +
76
+ [source,yaml]
77
+ ----
78
+ names:
79
+ - value: length
80
+ lang: en
81
+ - value: longueur
82
+ lang: fr
83
+ ----
84
+
85
+ * Added French names for units and quantities, sourced from BIPM
86
+
87
+ Relevant issues/pull requests:
88
+
89
+ * link:https://github.com/unitsml/unitsdb/pull/112[#112]
90
+
91
+ ==== Symbols representation
92
+
93
+ * Enhanced `symbols` structure with multiple representation formats:
94
+ +
95
+ [source,yaml]
96
+ ----
97
+ symbols:
98
+ - ascii: L
99
+ html: "𝖫"
100
+ id: dim_L
101
+ latex: "\\ensuremath{\\mathsf{L}}"
102
+ mathml: "<mi mathvariant='sans-serif'>L</mi>"
103
+ unicode: "\U0001D5AB"
104
+ ----
105
+
106
+ * Changed `dim_symbols` to `symbols` in dimensions.yaml
107
+ * Provided more comprehensive symbol representations across all formats
108
+
109
+ Relevant issues/pull requests:
110
+
111
+ * link:https://github.com/unitsml/unitsdb/pull/101[#101]
112
+
113
+ ==== Property naming
114
+
115
+ * Renamed `powerNumerator` to `power` for clarity and consistency
116
+ * Made field naming more consistent across files
117
+ * Standardized property types and formats
118
+
119
+ Relevant issues/pull requests:
120
+
121
+ * link:https://github.com/unitsml/unitsdb/pull/101[#101]
122
+
123
+ === File-specific changes
124
+
125
+ ==== dimensions.yaml
126
+
127
+ * Added `names` array with language-specific dimension names
128
+ * Added the following new dimensions:
129
+ ** NISTd96: fluence (L^-2)
130
+ ** NISTd97: fluence_rate (L^-2 T^-1)
131
+ ** NISTd98: phase (plane_angle)
132
+ ** NISTd99: fuel_efficiency (L^-2)
133
+ ** NISTd100: traffic_intensity (dimensionless)
134
+ ** NISTd101: symbol_rate (T^-1)
135
+ ** NISTd102: information_content (dimensionless)
136
+ * Improved dimensionless quantity representation
137
+ * Enhanced symbols representation with mathml and other formats
138
+
139
+ Relevant issues/pull requests:
140
+
141
+ * link:https://github.com/unitsml/unitsdb/pull/109[#109]
142
+ * link:https://github.com/unitsml/unitsdb/issues/102[#102]
143
+
144
+ ==== prefixes.yaml
145
+
146
+ * Added short name property to all prefixes
147
+ * Added SI Digital Framework references to SI prefixes
148
+ * Changed the representation of `NISTp10_0` (unity) to use '1' as the symbol instead of empty string
149
+ * Added mathml representations for all prefix symbols
150
+ * Reorganized structure to make prefixes consistently represented
151
+
152
+ Relevant issues/pull requests:
153
+
154
+ * link:https://github.com/unitsml/unitsdb/issues/100[#100]
155
+
156
+ ==== quantities.yaml
157
+
158
+ * Added 15+ new quantities including:
159
+ ** NISTq189: emission_rate
160
+ ** NISTq190: fluence
161
+ ** NISTq191: fluence_rate
162
+ ** NISTq192: ITS-90_temperature_celsius
163
+ ** NISTq193: ITS-90_temperature_kelvin
164
+ ** NISTq194: kerma_rate
165
+ ** NISTq195: phase
166
+ ** NISTq196: PLTS-2000_temperature
167
+ ** NISTq197: exposure
168
+ ** NISTq198: fuel_efficiency
169
+ ** NISTq199: relative_humidity
170
+ ** NISTq200: logarithmic_frequency_range
171
+ ** NISTq201: traffic_intensity
172
+ ** NISTq202: symbol_rate
173
+ ** NISTq203: information_content
174
+ * Changed from `unit_reference` array to `unit_references` for consistency
175
+ * Replaced URLs with formal dimension references:
176
+ +
177
+ [source,yaml]
178
+ ----
179
+ dimension_reference:
180
+ id: NISTd1
181
+ type: nist
182
+ ----
183
+
184
+ * Added French translations for quantity names
185
+ * Added SI Digital Framework URI references
186
+
187
+ Relevant issues/pull requests:
188
+
189
+ * link:https://github.com/unitsml/unitsdb/pull/99[#99]
190
+ * link:https://github.com/unitsml/unitsdb/issues/98[#98]
191
+ * link:https://github.com/unitsml/unitsdb/pull/109[#109]
192
+ * link:https://github.com/unitsml/unitsdb/pull/108[#108]
193
+ * link:https://github.com/unitsml/unitsdb/pull/106[#106]
194
+
195
+ ==== unit_systems.yaml
196
+
197
+ * Added more comprehensive system descriptions
198
+ * Improved classification of units within systems
199
+ * Added clearer acceptable/unacceptable designations
200
+
201
+ Relevant issues/pull requests:
202
+
203
+ * link:https://github.com/unitsml/unitsdb/pull/85[#85]
204
+
205
+ ==== scales.yaml
206
+
207
+ * Added formal structure for scale definitions
208
+ * Defined properties for different scale types:
209
+ ** continuous_ratio
210
+ ** continuous_interval
211
+ ** logarithmic_ratio
212
+ ** logarithmic_field
213
+ ** discrete
214
+
215
+ Relevant issues/pull requests:
216
+
217
+ * link:https://github.com/unitsml/unitsdb/pull/110[#110]
218
+ * link:https://github.com/unitsml/unitsdb/issues/43[#43]
219
+
220
+ === Impact on applications
221
+
222
+ Applications using UnitsDB will need to adapt to these changes when upgrading from v1.0.0 to v2.0.0:
223
+
224
+ Relevant issues/pull requests:
225
+
226
+ * link:https://github.com/unitsml/unitsdb/issues/90[#90]
227
+ * link:https://github.com/unitsml/unitsdb/issues/92[#92]
228
+
229
+ ==== Required updates
230
+
231
+ * Update parsers to handle the new schema structure with `schema_version` field
232
+ * Modify code that accesses dimension power values (`power` vs `powerNumerator`)
233
+ * Update name access code to handle language-specific name objects
234
+ * Revise symbol handling to work with the expanded symbol representation formats
235
+ * Update code that accesses unit references to use the new reference structure
236
+
237
+ Relevant issues/pull requests:
238
+
239
+ * link:https://github.com/unitsml/unitsdb/issues/93[#93]
240
+ * link:https://github.com/unitsml/unitsdb/pull/97[#97]
241
+ * link:https://github.com/unitsml/unitsdb/pull/101[#101]
242
+ * link:https://github.com/unitsml/unitsdb/pull/112[#112]
243
+ * link:https://github.com/unitsml/unitsdb/pull/85[#85]
244
+ * link:https://github.com/unitsml/unitsdb/pull/99[#99]
245
+
246
+ === Documentation updates
247
+
248
+ For more information on the UnitsDB structure and how to use it effectively, refer to the README.adoc file in the repository, which has been significantly expanded to include detailed information about the database structure and content.
249
+
250
+ Relevant issues/pull requests:
251
+
252
+ * link:https://github.com/unitsml/unitsdb/pull/114[#114]
253
+
254
+ === Additional content
255
+
256
+ French translations are sourced from the BIPM SI Digital Framework.
257
+
258
+ This release includes contributions to fix errors and inconsistencies as well as adding new units and quantities to align with ISO and IEC standards.
259
+
260
+ Relevant issues/pull requests:
261
+
262
+ * link:https://github.com/unitsml/unitsdb/pull/112[#112]
263
+ * link:https://github.com/unitsml/unitsdb/pull/107[#107]
264
+ * link:https://github.com/unitsml/unitsdb/pull/95[#95]
265
+ * link:https://github.com/unitsml/unitsdb/pull/89[#89]
266
+ * link:https://github.com/unitsml/unitsdb/pull/109[#109]
267
+ * link:https://github.com/unitsml/unitsdb/issues/37[#37]
268
+ * link:https://github.com/unitsml/unitsdb/issues/40[#40]
269
+ * link:https://github.com/unitsml/unitsdb/issues/48[#48]