plurimath 0.11.0 → 0.11.3
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rubocop_todo.yml +311 -58
- data/Gemfile +3 -2
- data/README.adoc +331 -15
- data/lib/plurimath/asciimath/parse.rb +6 -1
- data/lib/plurimath/asciimath/transform.rb +2 -0
- data/lib/plurimath/base_number_prefix.rb +43 -0
- data/lib/plurimath/configuration.rb +9 -1
- data/lib/plurimath/deprecation.rb +2 -1
- data/lib/plurimath/errors/configuration_error.rb +5 -1
- data/lib/plurimath/errors/deprecation_error.rb +2 -1
- data/lib/plurimath/errors/evaluation/division_by_zero_error.rb +13 -0
- data/lib/plurimath/errors/evaluation/error.rb +9 -0
- data/lib/plurimath/errors/evaluation/invalid_binding_error.rb +14 -0
- data/lib/plurimath/errors/evaluation/invalid_binding_key_error.rb +14 -0
- data/lib/plurimath/errors/evaluation/math_domain_error.rb +9 -0
- data/lib/plurimath/errors/evaluation/missing_variable_error.rb +13 -0
- data/lib/plurimath/errors/evaluation/non_finite_result_error.rb +13 -0
- data/lib/plurimath/errors/evaluation/unsupported_expression_error.rb +13 -0
- data/lib/plurimath/errors/evaluation.rb +18 -0
- data/lib/plurimath/errors/invalid_number.rb +17 -0
- data/lib/plurimath/errors/unsupported_base.rb +18 -0
- data/lib/plurimath/errors/{formatter/unsupported_locale.rb → unsupported_locale.rb} +1 -1
- data/lib/plurimath/errors.rb +9 -0
- data/lib/plurimath/formatter/numbers/base_notation.rb +55 -27
- data/lib/plurimath/formatter/numbers/format_options.rb +123 -17
- data/lib/plurimath/formatter/numbers/formatted_notation.rb +62 -0
- data/lib/plurimath/formatter/numbers/formatted_number.rb +87 -0
- data/lib/plurimath/formatter/numbers/fraction.rb +8 -17
- data/lib/plurimath/formatter/numbers/integer.rb +3 -0
- data/lib/plurimath/formatter/numbers/mathml_renderer.rb +56 -0
- data/lib/plurimath/formatter/numbers/notation_renderer.rb +58 -28
- data/lib/plurimath/formatter/numbers/number_renderer.rb +26 -13
- data/lib/plurimath/formatter/numbers/omml_renderer.rb +74 -0
- data/lib/plurimath/formatter/numbers/precision_resolver.rb +16 -3
- data/lib/plurimath/formatter/numbers/sign_renderer.rb +2 -1
- data/lib/plurimath/formatter/numbers/significant.rb +4 -2
- data/lib/plurimath/formatter/numbers/source.rb +46 -6
- data/lib/plurimath/formatter/numbers/text_renderer.rb +52 -0
- data/lib/plurimath/formatter/numbers.rb +6 -2
- data/lib/plurimath/formatter/standard.rb +6 -0
- data/lib/plurimath/formatter/supported_locales.rb +1 -1
- data/lib/plurimath/formatter.rb +0 -2
- data/lib/plurimath/html/parse.rb +5 -0
- data/lib/plurimath/html/transform.rb +26 -12
- data/lib/plurimath/latex/parse.rb +5 -0
- data/lib/plurimath/latex/transform.rb +2 -0
- data/lib/plurimath/math/core.rb +69 -14
- data/lib/plurimath/math/evaluation/evaluator.rb +147 -0
- data/lib/plurimath/math/evaluation/expression_parser.rb +215 -0
- data/lib/plurimath/math/evaluation/iteration.rb +63 -0
- data/lib/plurimath/math/evaluation.rb +13 -0
- data/lib/plurimath/math/formula.rb +9 -0
- data/lib/plurimath/math/function/abs.rb +4 -0
- data/lib/plurimath/math/function/arccos.rb +4 -0
- data/lib/plurimath/math/function/arcsin.rb +4 -0
- data/lib/plurimath/math/function/arctan.rb +4 -0
- data/lib/plurimath/math/function/ceil.rb +4 -0
- data/lib/plurimath/math/function/cos.rb +4 -0
- data/lib/plurimath/math/function/cosh.rb +4 -0
- data/lib/plurimath/math/function/cot.rb +4 -0
- data/lib/plurimath/math/function/coth.rb +4 -0
- data/lib/plurimath/math/function/csc.rb +4 -0
- data/lib/plurimath/math/function/csch.rb +4 -0
- data/lib/plurimath/math/function/exp.rb +4 -0
- data/lib/plurimath/math/function/fenced.rb +4 -0
- data/lib/plurimath/math/function/floor.rb +4 -0
- data/lib/plurimath/math/function/frac.rb +7 -0
- data/lib/plurimath/math/function/gcd.rb +9 -0
- data/lib/plurimath/math/function/lcm.rb +9 -0
- data/lib/plurimath/math/function/lg.rb +4 -0
- data/lib/plurimath/math/function/ln.rb +4 -0
- data/lib/plurimath/math/function/log.rb +19 -0
- data/lib/plurimath/math/function/max.rb +4 -0
- data/lib/plurimath/math/function/min.rb +4 -0
- data/lib/plurimath/math/function/mod.rb +15 -0
- data/lib/plurimath/math/function/overleftrightarrow.rb +2 -2
- data/lib/plurimath/math/function/power.rb +10 -0
- data/lib/plurimath/math/function/prod.rb +10 -0
- data/lib/plurimath/math/function/root.rb +7 -0
- data/lib/plurimath/math/function/sec.rb +4 -0
- data/lib/plurimath/math/function/sech.rb +4 -0
- data/lib/plurimath/math/function/sin.rb +4 -0
- data/lib/plurimath/math/function/sinh.rb +4 -0
- data/lib/plurimath/math/function/sqrt.rb +4 -0
- data/lib/plurimath/math/function/sum.rb +10 -0
- data/lib/plurimath/math/function/tan.rb +4 -0
- data/lib/plurimath/math/function/tanh.rb +4 -0
- data/lib/plurimath/math/function/text.rb +17 -0
- data/lib/plurimath/math/number.rb +44 -23
- data/lib/plurimath/math/symbols/cdot.rb +4 -0
- data/lib/plurimath/math/symbols/div.rb +4 -0
- data/lib/plurimath/math/symbols/hat.rb +4 -0
- data/lib/plurimath/math/symbols/minus.rb +4 -0
- data/lib/plurimath/math/symbols/pi.rb +5 -1
- data/lib/plurimath/math/symbols/plus.rb +4 -0
- data/lib/plurimath/math/symbols/slash.rb +4 -0
- data/lib/plurimath/math/symbols/symbol.rb +45 -0
- data/lib/plurimath/math/symbols/times.rb +4 -0
- data/lib/plurimath/math.rb +5 -1
- data/lib/plurimath/mathml/constants.rb +18 -0
- data/lib/plurimath/number_formatter.rb +63 -3
- data/lib/plurimath/omml/formula_transformation.rb +2 -1
- data/lib/plurimath/omml/translator.rb +4 -1
- data/lib/plurimath/setup/opal.rb.erb +13 -0
- data/lib/plurimath/unicode_math/parse.rb +98 -54
- data/lib/plurimath/unicode_math/parser.rb +7 -4
- data/lib/plurimath/unicode_math/parsing_rules/absence_rules.rb +33 -21
- data/lib/plurimath/unicode_math/parsing_rules/common_rules.rb +28 -16
- data/lib/plurimath/unicode_math/parsing_rules/constants_rules.rb +18 -7
- data/lib/plurimath/unicode_math/parsing_rules/masked.rb +35 -15
- data/lib/plurimath/unicode_math/parsing_rules/sub_sup.rb +98 -72
- data/lib/plurimath/unicode_math/transform.rb +1 -0
- data/lib/plurimath/utility.rb +1 -1
- data/lib/plurimath/version.rb +1 -1
- data/lib/plurimath.rb +2 -0
- metadata +24 -5
- data/lib/plurimath/errors/formatter/unsupported_base.rb +0 -21
- data/lib/plurimath/formatter/numbers/parts_renderer.rb +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11ba1229615b89a47433de461270293407f476eb418c25601d69d04bcacc6f2a
|
|
4
|
+
data.tar.gz: 9c8fa073f7edd18ba85a779fd5688c2bb6a8486a7bf668a34458efe543b59041
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cabc87c386e4fd384ea4d29984c5dd7df09cd94a9204ae8a4fde4c4e9f8944361e5f04e96740b4d86e77ff9c30fd6fb66fd9ca49a1ea2b05b4a5aac6cab1c53e
|
|
7
|
+
data.tar.gz: 2911f337795f3bf3420721e9760c3cacd9b773b645b08e139b361e5dc9e84b05e6eac91fba820c418e69b1aad83ec72cc38acae3cf94db264da3f9af87943711
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,76 +1,104 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-
|
|
3
|
+
# on 2026-06-24 16:29:48 UTC using RuboCop version 1.86.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
+
# Offense count: 8
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
|
|
12
|
+
Bundler/OrderedGems:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'Gemfile'
|
|
15
|
+
|
|
9
16
|
# Offense count: 1
|
|
10
17
|
Gemspec/RequiredRubyVersion:
|
|
11
18
|
Exclude:
|
|
12
19
|
- 'plurimath.gemspec'
|
|
13
20
|
|
|
14
|
-
# Offense count:
|
|
21
|
+
# Offense count: 261
|
|
15
22
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
23
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
24
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
25
|
Layout/ArgumentAlignment:
|
|
26
|
+
Enabled: false
|
|
27
|
+
|
|
28
|
+
# Offense count: 26
|
|
29
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
30
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
31
|
+
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
32
|
+
Layout/ArrayAlignment:
|
|
19
33
|
Exclude:
|
|
20
|
-
- 'lib/plurimath/
|
|
34
|
+
- 'lib/plurimath/formatter/numbers/notation_renderer.rb'
|
|
35
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
36
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
21
37
|
|
|
22
|
-
# Offense count:
|
|
38
|
+
# Offense count: 10
|
|
39
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
40
|
+
# Configuration parameters: IndentationWidth.
|
|
41
|
+
Layout/AssignmentIndentation:
|
|
42
|
+
Exclude:
|
|
43
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
44
|
+
|
|
45
|
+
# Offense count: 15
|
|
23
46
|
# This cop supports safe autocorrection (--autocorrect).
|
|
24
47
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
25
48
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
26
49
|
Layout/BlockAlignment:
|
|
27
50
|
Exclude:
|
|
28
|
-
- 'lib/plurimath/math/
|
|
51
|
+
- 'lib/plurimath/math/evaluation/evaluator.rb'
|
|
29
52
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
53
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
30
54
|
|
|
31
|
-
# Offense count:
|
|
55
|
+
# Offense count: 12
|
|
32
56
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
|
-
Layout/
|
|
57
|
+
Layout/BlockEndNewline:
|
|
34
58
|
Exclude:
|
|
35
|
-
- 'lib/plurimath/math/
|
|
59
|
+
- 'lib/plurimath/math/evaluation/evaluator.rb'
|
|
60
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
61
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
36
62
|
|
|
37
|
-
# Offense count:
|
|
63
|
+
# Offense count: 35
|
|
38
64
|
# This cop supports safe autocorrection (--autocorrect).
|
|
39
|
-
Layout/
|
|
65
|
+
Layout/ClosingParenthesisIndentation:
|
|
40
66
|
Exclude:
|
|
67
|
+
- 'lib/plurimath/formatter/numbers/notation_renderer.rb'
|
|
68
|
+
- 'lib/plurimath/math/number.rb'
|
|
41
69
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
42
|
-
- '
|
|
70
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
43
71
|
|
|
44
|
-
# Offense count:
|
|
72
|
+
# Offense count: 18
|
|
45
73
|
# This cop supports safe autocorrection (--autocorrect).
|
|
46
|
-
Layout/
|
|
74
|
+
Layout/ElseAlignment:
|
|
47
75
|
Exclude:
|
|
48
76
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
49
77
|
|
|
50
78
|
# Offense count: 1
|
|
51
79
|
# This cop supports safe autocorrection (--autocorrect).
|
|
52
|
-
|
|
53
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
|
54
|
-
Layout/EmptyLinesAroundClassBody:
|
|
80
|
+
Layout/EmptyLines:
|
|
55
81
|
Exclude:
|
|
56
82
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
57
83
|
|
|
58
|
-
# Offense count:
|
|
84
|
+
# Offense count: 10
|
|
59
85
|
# This cop supports safe autocorrection (--autocorrect).
|
|
60
|
-
# Configuration parameters:
|
|
61
|
-
|
|
86
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
87
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
88
|
+
Layout/EndAlignment:
|
|
62
89
|
Exclude:
|
|
63
|
-
- 'lib/plurimath/unicode_math/
|
|
64
|
-
- 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
|
|
65
|
-
- 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
|
|
90
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
66
91
|
|
|
67
|
-
# Offense count:
|
|
92
|
+
# Offense count: 35
|
|
68
93
|
# This cop supports safe autocorrection (--autocorrect).
|
|
69
94
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
70
95
|
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
|
71
96
|
Layout/FirstArgumentIndentation:
|
|
72
97
|
Exclude:
|
|
98
|
+
- 'lib/plurimath/formatter/numbers/notation_renderer.rb'
|
|
99
|
+
- 'lib/plurimath/math/number.rb'
|
|
73
100
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
101
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
74
102
|
|
|
75
103
|
# Offense count: 14
|
|
76
104
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -80,43 +108,74 @@ Layout/FirstArrayElementIndentation:
|
|
|
80
108
|
Exclude:
|
|
81
109
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
82
110
|
|
|
83
|
-
# Offense count:
|
|
111
|
+
# Offense count: 22
|
|
112
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
113
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
114
|
+
# SupportedHashRocketStyles: key, separator, table
|
|
115
|
+
# SupportedColonStyles: key, separator, table
|
|
116
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
117
|
+
Layout/HashAlignment:
|
|
118
|
+
Exclude:
|
|
119
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
120
|
+
- 'spec/plurimath/formatter/numbers/base_notation_spec.rb'
|
|
121
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
122
|
+
- 'spec/plurimath/math/number_spec.rb'
|
|
123
|
+
|
|
124
|
+
# Offense count: 4
|
|
125
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
126
|
+
# Configuration parameters: EnforcedStyle.
|
|
127
|
+
# SupportedStyles: normal, indented_internal_methods
|
|
128
|
+
Layout/IndentationConsistency:
|
|
129
|
+
Exclude:
|
|
130
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
131
|
+
|
|
132
|
+
# Offense count: 60
|
|
84
133
|
# This cop supports safe autocorrection (--autocorrect).
|
|
85
134
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
86
135
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
87
136
|
Layout/IndentationWidth:
|
|
88
137
|
Exclude:
|
|
89
|
-
- 'lib/plurimath/math/
|
|
138
|
+
- 'lib/plurimath/math/evaluation/evaluator.rb'
|
|
90
139
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
91
|
-
- '
|
|
140
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
92
141
|
|
|
93
|
-
# Offense count:
|
|
142
|
+
# Offense count: 29707
|
|
94
143
|
# This cop supports safe autocorrection (--autocorrect).
|
|
95
144
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
96
145
|
# URISchemes: http, https
|
|
97
146
|
Layout/LineLength:
|
|
98
147
|
Enabled: false
|
|
99
148
|
|
|
100
|
-
# Offense count:
|
|
149
|
+
# Offense count: 14
|
|
150
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
151
|
+
# Configuration parameters: EnforcedStyle.
|
|
152
|
+
# SupportedStyles: symmetrical, new_line, same_line
|
|
153
|
+
Layout/MultilineMethodCallBraceLayout:
|
|
154
|
+
Exclude:
|
|
155
|
+
- 'lib/plurimath/formatter/numbers/notation_renderer.rb'
|
|
156
|
+
- 'lib/plurimath/math/number.rb'
|
|
157
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
158
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
159
|
+
|
|
160
|
+
# Offense count: 2
|
|
101
161
|
# This cop supports safe autocorrection (--autocorrect).
|
|
102
162
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
103
163
|
# SupportedStyles: aligned, indented
|
|
104
164
|
Layout/MultilineOperationIndentation:
|
|
105
165
|
Exclude:
|
|
106
|
-
- 'lib/plurimath/unicode_math/parse.rb'
|
|
107
|
-
- 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
|
|
108
166
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
109
167
|
|
|
110
|
-
# Offense count:
|
|
168
|
+
# Offense count: 266
|
|
111
169
|
# This cop supports safe autocorrection (--autocorrect).
|
|
112
|
-
# Configuration parameters:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
170
|
+
# Configuration parameters: AllowInHeredoc.
|
|
171
|
+
Layout/TrailingWhitespace:
|
|
172
|
+
Enabled: false
|
|
173
|
+
|
|
174
|
+
# Offense count: 1
|
|
175
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
176
|
+
Lint/AmbiguousOperatorPrecedence:
|
|
116
177
|
Exclude:
|
|
117
|
-
- 'lib/plurimath/unicode_math/
|
|
118
|
-
- 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
|
|
119
|
-
- 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
|
|
178
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
120
179
|
|
|
121
180
|
# Offense count: 1
|
|
122
181
|
# Configuration parameters: AllowedMethods.
|
|
@@ -137,10 +196,9 @@ Lint/DuplicateBranch:
|
|
|
137
196
|
- 'lib/plurimath/unicode_math/transform.rb'
|
|
138
197
|
- 'lib/plurimath/xml_engine/oga/dumper.rb'
|
|
139
198
|
|
|
140
|
-
# Offense count:
|
|
199
|
+
# Offense count: 6
|
|
141
200
|
Lint/DuplicateMethods:
|
|
142
201
|
Exclude:
|
|
143
|
-
- 'lib/plurimath/formatter/numeric_formatter.rb'
|
|
144
202
|
- 'lib/plurimath/math/function/td.rb'
|
|
145
203
|
- 'lib/plurimath/math/number.rb'
|
|
146
204
|
- 'lib/plurimath/math/symbols/symbol.rb'
|
|
@@ -165,11 +223,10 @@ Lint/IneffectiveAccessModifier:
|
|
|
165
223
|
Exclude:
|
|
166
224
|
- 'lib/plurimath/math/symbols/symbol.rb'
|
|
167
225
|
|
|
168
|
-
# Offense count:
|
|
226
|
+
# Offense count: 10
|
|
169
227
|
# Configuration parameters: AllowedParentClasses.
|
|
170
228
|
Lint/MissingSuper:
|
|
171
229
|
Exclude:
|
|
172
|
-
- 'lib/plurimath/errors/formatter/unsupported_base.rb'
|
|
173
230
|
- 'lib/plurimath/math/formula.rb'
|
|
174
231
|
- 'lib/plurimath/math/function/binary_function.rb'
|
|
175
232
|
- 'lib/plurimath/math/function/linebreak.rb'
|
|
@@ -181,56 +238,77 @@ Lint/MissingSuper:
|
|
|
181
238
|
- 'lib/plurimath/math/number.rb'
|
|
182
239
|
- 'lib/plurimath/math/symbols/symbol.rb'
|
|
183
240
|
|
|
241
|
+
# Offense count: 1
|
|
242
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
243
|
+
Lint/PercentStringArray:
|
|
244
|
+
Exclude:
|
|
245
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
246
|
+
|
|
247
|
+
# Offense count: 45
|
|
248
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
249
|
+
# Configuration parameters: EnforcedStyle.
|
|
250
|
+
# SupportedStyles: strict, consistent
|
|
251
|
+
Lint/SymbolConversion:
|
|
252
|
+
Exclude:
|
|
253
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
254
|
+
|
|
184
255
|
# Offense count: 4
|
|
185
256
|
Lint/UnmodifiedReduceAccumulator:
|
|
186
257
|
Exclude:
|
|
187
258
|
- 'lib/plurimath/math/formula.rb'
|
|
188
259
|
- 'lib/plurimath/math/function/fenced.rb'
|
|
189
260
|
|
|
190
|
-
# Offense count:
|
|
261
|
+
# Offense count: 6
|
|
191
262
|
# This cop supports safe autocorrection (--autocorrect).
|
|
192
263
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
193
264
|
# NotImplementedExceptions: NotImplementedError
|
|
194
265
|
Lint/UnusedMethodArgument:
|
|
195
266
|
Exclude:
|
|
196
|
-
- 'lib/plurimath/formatter/numeric_formatter.rb'
|
|
197
267
|
- 'lib/plurimath/math/formula.rb'
|
|
198
268
|
- 'lib/plurimath/math/function/left.rb'
|
|
269
|
+
- 'lib/plurimath/number_formatter.rb'
|
|
199
270
|
- 'lib/plurimath/utility.rb'
|
|
271
|
+
- 'spec/plurimath/math/number_spec.rb'
|
|
272
|
+
|
|
273
|
+
# Offense count: 2
|
|
274
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
275
|
+
Lint/UselessAssignment:
|
|
276
|
+
Exclude:
|
|
277
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
200
278
|
|
|
201
|
-
# Offense count:
|
|
279
|
+
# Offense count: 161
|
|
202
280
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
203
281
|
Metrics/AbcSize:
|
|
204
282
|
Enabled: false
|
|
205
283
|
|
|
206
|
-
# Offense count:
|
|
284
|
+
# Offense count: 9
|
|
207
285
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
208
286
|
# AllowedMethods: refine
|
|
209
287
|
Metrics/BlockLength:
|
|
210
288
|
Max: 57
|
|
211
289
|
|
|
212
|
-
# Offense count:
|
|
290
|
+
# Offense count: 2
|
|
213
291
|
# Configuration parameters: CountBlocks, CountModifierForms.
|
|
214
292
|
Metrics/BlockNesting:
|
|
215
293
|
Max: 4
|
|
216
294
|
|
|
217
|
-
# Offense count:
|
|
295
|
+
# Offense count: 106
|
|
218
296
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
219
297
|
Metrics/CyclomaticComplexity:
|
|
220
298
|
Enabled: false
|
|
221
299
|
|
|
222
|
-
# Offense count:
|
|
300
|
+
# Offense count: 167
|
|
223
301
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
224
302
|
Metrics/MethodLength:
|
|
225
303
|
Max: 50
|
|
226
304
|
|
|
227
|
-
# Offense count:
|
|
305
|
+
# Offense count: 16
|
|
228
306
|
# Configuration parameters: CountKeywordArgs.
|
|
229
307
|
Metrics/ParameterLists:
|
|
230
308
|
Max: 6
|
|
231
309
|
MaxOptionalParameters: 5
|
|
232
310
|
|
|
233
|
-
# Offense count:
|
|
311
|
+
# Offense count: 78
|
|
234
312
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
235
313
|
Metrics/PerceivedComplexity:
|
|
236
314
|
Enabled: false
|
|
@@ -243,7 +321,7 @@ Naming/MethodParameterName:
|
|
|
243
321
|
- 'lib/plurimath/math/function/mlabeledtr.rb'
|
|
244
322
|
- 'lib/plurimath/mathml/translator.rb'
|
|
245
323
|
|
|
246
|
-
# Offense count:
|
|
324
|
+
# Offense count: 47
|
|
247
325
|
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
248
326
|
# AllowedMethods: call
|
|
249
327
|
# WaywardPredicates: infinite?, nonzero?
|
|
@@ -280,13 +358,37 @@ Performance/CollectionLiteralInLoop:
|
|
|
280
358
|
- 'lib/plurimath/utility/intent_encoding.rb'
|
|
281
359
|
- 'spec/plurimath/formatter/numbers/fraction_spec.rb'
|
|
282
360
|
|
|
283
|
-
# Offense count:
|
|
361
|
+
# Offense count: 1
|
|
362
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
363
|
+
# Configuration parameters: SafeMultiline.
|
|
364
|
+
Performance/DeleteSuffix:
|
|
365
|
+
Exclude:
|
|
366
|
+
- 'lib/plurimath/formatter/numbers/source.rb'
|
|
367
|
+
|
|
368
|
+
# Offense count: 2
|
|
369
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
370
|
+
RSpec/BeEq:
|
|
371
|
+
Exclude:
|
|
372
|
+
- 'spec/plurimath/math/number_spec.rb'
|
|
373
|
+
|
|
374
|
+
# Offense count: 4650
|
|
284
375
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
285
376
|
# Prefixes: when, with, without
|
|
286
377
|
RSpec/ContextWording:
|
|
287
378
|
Enabled: false
|
|
288
379
|
|
|
289
|
-
# Offense count:
|
|
380
|
+
# Offense count: 1
|
|
381
|
+
# Configuration parameters: IgnoredMetadata.
|
|
382
|
+
RSpec/DescribeClass:
|
|
383
|
+
Exclude:
|
|
384
|
+
- '**/spec/features/**/*'
|
|
385
|
+
- '**/spec/requests/**/*'
|
|
386
|
+
- '**/spec/routing/**/*'
|
|
387
|
+
- '**/spec/system/**/*'
|
|
388
|
+
- '**/spec/views/**/*'
|
|
389
|
+
- 'spec/plurimath/base_prefix_parsing_spec.rb'
|
|
390
|
+
|
|
391
|
+
# Offense count: 1635
|
|
290
392
|
# Configuration parameters: CountAsOne.
|
|
291
393
|
RSpec/ExampleLength:
|
|
292
394
|
Max: 394
|
|
@@ -299,6 +401,18 @@ RSpec/ExampleWording:
|
|
|
299
401
|
Exclude:
|
|
300
402
|
- 'spec/plurimath/xml_engine_spec.rb'
|
|
301
403
|
|
|
404
|
+
# Offense count: 4
|
|
405
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
406
|
+
RSpec/IncludeExamples:
|
|
407
|
+
Exclude:
|
|
408
|
+
- 'spec/plurimath/base_prefix_parsing_spec.rb'
|
|
409
|
+
|
|
410
|
+
# Offense count: 1
|
|
411
|
+
# Configuration parameters: AssignmentOnly.
|
|
412
|
+
RSpec/InstanceVariable:
|
|
413
|
+
Exclude:
|
|
414
|
+
- 'spec/plurimath/base_prefix_parsing_spec.rb'
|
|
415
|
+
|
|
302
416
|
# Offense count: 1
|
|
303
417
|
RSpec/LeakyConstantDeclaration:
|
|
304
418
|
Exclude:
|
|
@@ -315,16 +429,21 @@ RSpec/LeakyLocalVariable:
|
|
|
315
429
|
- 'spec/plurimath/unicode_math/plurimath/unicodemath_tests_spec.rb'
|
|
316
430
|
- 'spec/plurimath/unicode_math/plurimath/unicodemath_transform_spec.rb'
|
|
317
431
|
|
|
318
|
-
# Offense count:
|
|
432
|
+
# Offense count: 1
|
|
433
|
+
RSpec/MultipleDescribes:
|
|
434
|
+
Exclude:
|
|
435
|
+
- 'spec/plurimath/deprecation_spec.rb'
|
|
436
|
+
|
|
437
|
+
# Offense count: 498
|
|
319
438
|
RSpec/MultipleExpectations:
|
|
320
439
|
Max: 12
|
|
321
440
|
|
|
322
|
-
# Offense count:
|
|
441
|
+
# Offense count: 12
|
|
323
442
|
# Configuration parameters: AllowSubject.
|
|
324
443
|
RSpec/MultipleMemoizedHelpers:
|
|
325
444
|
Max: 11
|
|
326
445
|
|
|
327
|
-
# Offense count:
|
|
446
|
+
# Offense count: 93
|
|
328
447
|
# Configuration parameters: AllowedGroups.
|
|
329
448
|
RSpec/NestedGroups:
|
|
330
449
|
Max: 5
|
|
@@ -350,12 +469,68 @@ RSpec/RepeatedExampleGroupBody:
|
|
|
350
469
|
RSpec/RepeatedExampleGroupDescription:
|
|
351
470
|
Enabled: false
|
|
352
471
|
|
|
353
|
-
# Offense count:
|
|
472
|
+
# Offense count: 27
|
|
354
473
|
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
355
474
|
# SupportedInflectors: default, active_support
|
|
356
475
|
RSpec/SpecFilePathFormat:
|
|
357
476
|
Enabled: false
|
|
358
477
|
|
|
478
|
+
# Offense count: 21
|
|
479
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
480
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
481
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
482
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
483
|
+
# FunctionalMethods: let, let!, subject, watch
|
|
484
|
+
# AllowedMethods: lambda, proc, it
|
|
485
|
+
Style/BlockDelimiters:
|
|
486
|
+
Exclude:
|
|
487
|
+
- 'lib/plurimath/math/evaluation/evaluator.rb'
|
|
488
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
489
|
+
- 'spec/plurimath/math/evaluation_spec.rb'
|
|
490
|
+
|
|
491
|
+
# Offense count: 3
|
|
492
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
493
|
+
# Configuration parameters: MinBranchesCount.
|
|
494
|
+
Style/CaseLikeIf:
|
|
495
|
+
Exclude:
|
|
496
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
497
|
+
|
|
498
|
+
# Offense count: 1
|
|
499
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
500
|
+
Style/ConcatArrayLiterals:
|
|
501
|
+
Exclude:
|
|
502
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
503
|
+
|
|
504
|
+
# Offense count: 2
|
|
505
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
506
|
+
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
|
507
|
+
# SupportedStyles: assign_to_condition, assign_inside_condition
|
|
508
|
+
Style/ConditionalAssignment:
|
|
509
|
+
Exclude:
|
|
510
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
511
|
+
|
|
512
|
+
# Offense count: 24
|
|
513
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
514
|
+
# Configuration parameters: AllowIfModifier.
|
|
515
|
+
Style/IfInsideElse:
|
|
516
|
+
Exclude:
|
|
517
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
518
|
+
|
|
519
|
+
# Offense count: 43
|
|
520
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
521
|
+
Style/MultilineIfModifier:
|
|
522
|
+
Exclude:
|
|
523
|
+
- 'lib/plurimath/formatter/numbers/notation_renderer.rb'
|
|
524
|
+
- 'lib/plurimath/math/evaluation/evaluator.rb'
|
|
525
|
+
- 'lib/plurimath/math/function/log.rb'
|
|
526
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
527
|
+
|
|
528
|
+
# Offense count: 30
|
|
529
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
530
|
+
Style/MultilineTernaryOperator:
|
|
531
|
+
Exclude:
|
|
532
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
533
|
+
|
|
359
534
|
# Offense count: 39
|
|
360
535
|
Style/OptionalArguments:
|
|
361
536
|
Exclude:
|
|
@@ -376,6 +551,33 @@ Style/OptionalArguments:
|
|
|
376
551
|
Style/OptionalBooleanParameter:
|
|
377
552
|
Enabled: false
|
|
378
553
|
|
|
554
|
+
# Offense count: 5
|
|
555
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
556
|
+
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
|
557
|
+
Style/ParenthesesAroundCondition:
|
|
558
|
+
Exclude:
|
|
559
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
560
|
+
|
|
561
|
+
# Offense count: 78
|
|
562
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
563
|
+
# Configuration parameters: EnforcedStyle.
|
|
564
|
+
# SupportedStyles: same_as_string_literals, single_quotes, double_quotes
|
|
565
|
+
Style/QuotedSymbols:
|
|
566
|
+
Exclude:
|
|
567
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
568
|
+
|
|
569
|
+
# Offense count: 77
|
|
570
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
571
|
+
Style/RedundantParentheses:
|
|
572
|
+
Exclude:
|
|
573
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
574
|
+
|
|
575
|
+
# Offense count: 1
|
|
576
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
577
|
+
Style/RedundantRegexpEscape:
|
|
578
|
+
Exclude:
|
|
579
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
580
|
+
|
|
379
581
|
# Offense count: 13
|
|
380
582
|
# Configuration parameters: Max.
|
|
381
583
|
Style/SafeNavigationChainLength:
|
|
@@ -387,3 +589,54 @@ Style/SafeNavigationChainLength:
|
|
|
387
589
|
- 'lib/plurimath/math/function/table.rb'
|
|
388
590
|
- 'lib/plurimath/utility.rb'
|
|
389
591
|
- 'lib/plurimath/utility/intent_encoding.rb'
|
|
592
|
+
|
|
593
|
+
# Offense count: 76
|
|
594
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
595
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
596
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
597
|
+
Style/StringLiterals:
|
|
598
|
+
Exclude:
|
|
599
|
+
- 'lib/plurimath/formatter/numbers/source.rb'
|
|
600
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
601
|
+
|
|
602
|
+
# Offense count: 4
|
|
603
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
604
|
+
# Configuration parameters: .
|
|
605
|
+
# SupportedStyles: percent, brackets
|
|
606
|
+
Style/SymbolArray:
|
|
607
|
+
EnforcedStyle: percent
|
|
608
|
+
MinSize: 3
|
|
609
|
+
|
|
610
|
+
# Offense count: 70
|
|
611
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
612
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
613
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
614
|
+
Style/TrailingCommaInArguments:
|
|
615
|
+
Exclude:
|
|
616
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
617
|
+
- 'spec/plurimath/formatter/numbers/formatted_notation_spec.rb'
|
|
618
|
+
- 'spec/plurimath/formatter/numbers/formatted_number_spec.rb'
|
|
619
|
+
|
|
620
|
+
# Offense count: 4
|
|
621
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
622
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
623
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
624
|
+
Style/TrailingCommaInArrayLiteral:
|
|
625
|
+
Exclude:
|
|
626
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
|
627
|
+
|
|
628
|
+
# Offense count: 6
|
|
629
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
630
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
631
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
632
|
+
Style/TrailingCommaInHashLiteral:
|
|
633
|
+
Exclude:
|
|
634
|
+
- 'lib/plurimath/unicode_math/constants.rb'
|
|
635
|
+
|
|
636
|
+
# Offense count: 15
|
|
637
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
638
|
+
# Configuration parameters: EnforcedStyle.
|
|
639
|
+
# SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
|
|
640
|
+
Style/YodaCondition:
|
|
641
|
+
Exclude:
|
|
642
|
+
- 'lib/plurimath/unicode_math/transform.rb'
|
data/Gemfile
CHANGED
|
@@ -4,9 +4,9 @@ source "https://rubygems.org"
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
gem "canon"
|
|
7
|
-
#gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
|
|
7
|
+
# gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
|
|
8
8
|
gem "oga"
|
|
9
|
-
#gem "omml", github: "plurimath/omml", branch: "main"
|
|
9
|
+
# gem "omml", github: "plurimath/omml", branch: "main"
|
|
10
10
|
gem "opal-rspec", "~> 1.1.0a"
|
|
11
11
|
gem "ox"
|
|
12
12
|
gem "rake", "~> 12.0"
|
|
@@ -15,3 +15,4 @@ gem "rubocop-performance"
|
|
|
15
15
|
gem "rubocop-rake"
|
|
16
16
|
gem "rubocop-rspec"
|
|
17
17
|
gem "simplecov", require: false, group: :test
|
|
18
|
+
gem "irb", group: :development
|