Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #4044: Add AlgebraicExpressionInput classifiers #4058

Merged
Show file tree
Hide file tree
Changes from 173 commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
917c909
Add support for expression->polynomial conversion.
BenHenning Dec 15, 2021
961b3d0
Add NumericExpressionInput classifiers.
BenHenning Dec 15, 2021
535ae2a
Introduce ClassificationContext.
BenHenning Dec 16, 2021
fef2d97
Add classifiers for AlgebraicExpressionInput.
BenHenning Dec 16, 2021
783396f
Add missing annotation for new interaction.
BenHenning Dec 16, 2021
fe12f5b
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Dec 16, 2021
69eaf25
Add missing annotation for new interaction.
BenHenning Dec 16, 2021
86256d9
Lint fixes.
BenHenning Dec 16, 2021
42684b9
Fix provider name.
BenHenning Dec 16, 2021
59bf648
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Dec 16, 2021
aff5bc6
Fix provider name.
BenHenning Dec 16, 2021
d5dd596
Fix broken test post-refactor.
BenHenning Dec 16, 2021
ff813ad
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Dec 16, 2021
a77499c
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Dec 16, 2021
31022f0
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Dec 16, 2021
028e821
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Dec 16, 2021
c2ac696
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Dec 16, 2021
b75627c
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Dec 16, 2021
aceddf8
Add reasonable import for abs().
BenHenning Dec 16, 2021
2ad0b46
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Dec 16, 2021
3cd013b
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Dec 16, 2021
9f2bc2c
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Dec 16, 2021
fe9419f
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Dec 16, 2021
312708c
Fix equals errors for equations.
BenHenning Jan 8, 2022
d08260b
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Jan 8, 2022
9826b11
Fix rational^rational powers.
BenHenning Jan 8, 2022
25a63bb
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Jan 8, 2022
94536c1
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Jan 8, 2022
58206b3
Ensure rational terms reduce to ints.
BenHenning Jan 8, 2022
f060640
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Jan 8, 2022
e355d4a
Add partial equivalence checking for new rules.
BenHenning Jan 8, 2022
ceca976
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Jan 8, 2022
b073b44
Add partial constant checking for new rules.
BenHenning Jan 8, 2022
a1d481d
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Jan 13, 2022
7740c81
Post-merge fix.
BenHenning Jan 13, 2022
929de4f
Add regex check, docs, and resolve TODOs.
BenHenning Jan 14, 2022
e50a50f
Lint fix.
BenHenning Jan 14, 2022
c2726ac
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Jan 14, 2022
ec575b7
Fix failing static checks.
BenHenning Jan 14, 2022
5fe790a
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Jan 14, 2022
1268fc5
Fix broken CI checks.
BenHenning Jan 14, 2022
977eb9e
Lint fixes.
BenHenning Jan 14, 2022
a7ab1a5
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Jan 14, 2022
eed21d5
Add docs & exempted tests.
BenHenning Jan 14, 2022
b1102a3
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Jan 14, 2022
080e7dd
Remove blank line.
BenHenning Jan 14, 2022
904aad8
Add docs + tests.
BenHenning Jan 19, 2022
61fbfe5
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Jan 19, 2022
fca0cd9
Add parameterized test runner.
BenHenning Jan 21, 2022
83e800c
Add & update tests.
BenHenning Jan 21, 2022
3fa8dad
Lint fixes.
BenHenning Jan 21, 2022
87a41db
Remove internals that broke things.
BenHenning Jan 21, 2022
c0172ce
Add regex exemptions.
BenHenning Jan 21, 2022
8723ee8
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Jan 21, 2022
ff41eeb
Post-merge fix.
BenHenning Jan 21, 2022
f5b6571
Add error tests.
BenHenning Jan 22, 2022
b7ac054
Finish algebraic equation tests.
BenHenning Jan 22, 2022
a122515
Reimplement numeric expression tests.
BenHenning Jan 22, 2022
984e740
Finish algebraic expression tests.
BenHenning Jan 22, 2022
042a1ad
Add missing tests for better coverage.
BenHenning Jan 24, 2022
8ead9bf
Add KDocs & test exemptions.
BenHenning Jan 25, 2022
aeec35c
Lint fixes.
BenHenning Jan 25, 2022
57e6f5b
Remove temporary TODOs.
BenHenning Jan 25, 2022
10eac78
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Jan 25, 2022
07be596
Add tests.
BenHenning Jan 26, 2022
19a6425
Split StringToFractionParser.
BenHenning Jan 26, 2022
444d3d0
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Jan 26, 2022
cb5c5d1
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Jan 27, 2022
7a364c3
Address reviewer comments + other stuff.
BenHenning Jan 27, 2022
2c0b9cd
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Jan 27, 2022
4364d7f
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Jan 27, 2022
cfe6cab
Move StringExtensions & fraction parsing.
BenHenning Jan 27, 2022
5e83a33
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Jan 27, 2022
c6cf5f5
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Jan 27, 2022
73dccd8
Address reviewer comments.
BenHenning Jan 27, 2022
b7535fa
Alphabetize test exemptions.
BenHenning Jan 27, 2022
f4cd6cd
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Jan 27, 2022
574ebb8
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Jan 27, 2022
a00164c
Fix typo & add regex check.
BenHenning Jan 27, 2022
0287f19
Add missing KDocs.
BenHenning Jan 27, 2022
75103d5
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Jan 27, 2022
52d2605
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Jan 27, 2022
37dbc85
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Jan 27, 2022
385d2d3
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Jan 27, 2022
4bacc8a
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Jan 27, 2022
1e5279d
Post-merge cleanups.
BenHenning Jan 27, 2022
bbf7e2d
Add new test for negation with math symbol.
BenHenning Jan 27, 2022
cf72c8d
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Jan 27, 2022
ba4128c
Post-merge fixes.
BenHenning Jan 27, 2022
fd09758
Add KDocs.
BenHenning Jan 27, 2022
01c2326
Refactor & simplify real ext impl.
BenHenning Jan 27, 2022
98d6939
Lint fixes.
BenHenning Jan 28, 2022
928aa6f
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Jan 28, 2022
ca412f7
Simplify operation list converter a lot.
BenHenning Jan 28, 2022
f172bcf
Prepare for new tests.
BenHenning Jan 28, 2022
65a9fe1
Remove the ComparableOperationList wrapper.
BenHenning Jan 28, 2022
fa4de34
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Jan 28, 2022
e2d226f
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Jan 28, 2022
fbd935c
Change parameterized method delimiter.
BenHenning Jan 28, 2022
5b6d1f2
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Jan 28, 2022
fd11a79
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Jan 28, 2022
8420c56
Use utility directly in test.
BenHenning Jan 28, 2022
047645c
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Jan 28, 2022
b8a3e2e
Post-merge fixes.
BenHenning Jan 28, 2022
28811b3
Add first round of tests.
BenHenning Jan 28, 2022
b400176
Finish initial test suite.
BenHenning Jan 29, 2022
e6c09d8
Simplify operation sorting comparators.
BenHenning Jan 29, 2022
bebc100
Remove old tests.
BenHenning Jan 29, 2022
3cecc6c
Add remaining missing tests.
BenHenning Jan 29, 2022
573fee9
KDocs & test exemption.
BenHenning Jan 29, 2022
1970f34
Renames & lint fixes.
BenHenning Jan 29, 2022
f5abb4d
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Jan 29, 2022
45b6099
Post-merge fixes.
BenHenning Jan 29, 2022
76a7887
Add tests.
BenHenning Feb 2, 2022
06ba279
KDocs + exemptions.
BenHenning Feb 2, 2022
ad3091d
Lint fixes.
BenHenning Feb 2, 2022
576d7dc
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Feb 2, 2022
b8ce188
Post-merge fixes.
BenHenning Feb 2, 2022
468b565
Add extension tests.
BenHenning Feb 4, 2022
4030aa3
Add classifier tests.
BenHenning Feb 4, 2022
d20256c
Use more intentional epsilons for float comparing.
BenHenning Feb 4, 2022
cdaf778
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 4, 2022
7e97d0b
Treat en-dash as a subtraction symbol.
BenHenning Feb 4, 2022
a9c68b1
Add explicit platform selection for paramerized.
BenHenning Feb 5, 2022
a273ee6
Exemption fixes.
BenHenning Feb 5, 2022
924214d
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Feb 5, 2022
686c4b6
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Feb 5, 2022
1a3cba5
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Feb 5, 2022
bff824e
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Feb 5, 2022
90b05bf
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Feb 5, 2022
09e2aad
Remove failing test.
BenHenning Feb 5, 2022
c7c2e4b
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 5, 2022
8bdf183
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Feb 5, 2022
b48d06a
Fix unary expression precedence.
BenHenning Feb 5, 2022
8ac22cb
Fixes & add more test cases.
BenHenning Feb 5, 2022
cdee008
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Feb 5, 2022
476e604
Post-merge fixes & test changes.
BenHenning Feb 5, 2022
5ed0013
Use utility directly in LaTeX tests.
BenHenning Feb 5, 2022
370dcf6
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Feb 5, 2022
c16db64
Post-merge fixes.
BenHenning Feb 5, 2022
df4221f
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Feb 5, 2022
dab330e
Post-merge fixes.
BenHenning Feb 5, 2022
7567232
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Feb 5, 2022
9c70c31
Post-merge fixes.
BenHenning Feb 5, 2022
3248e84
Lint & other check fixes.
BenHenning Feb 5, 2022
43cc4e0
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Feb 5, 2022
3960220
Replace deprecated term.
BenHenning Feb 5, 2022
528e9f7
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Feb 5, 2022
f7ec751
Post-merge fixes.
BenHenning Feb 5, 2022
782e058
Add full test suites for alg exp classifiers.
BenHenning Feb 5, 2022
0a7cb69
Lint & static check fixes.
BenHenning Feb 5, 2022
fd0c0cc
Fix test on Gradle.
BenHenning Feb 5, 2022
2839e7b
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Feb 5, 2022
812b66e
Fix test for Gradle.
BenHenning Feb 5, 2022
ecc836e
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Feb 18, 2022
b183d67
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Feb 18, 2022
005d9a0
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Feb 18, 2022
ba198fd
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Feb 18, 2022
1f2b90d
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Feb 18, 2022
86e90f7
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 18, 2022
a6dc7d4
Address reviewer comment.
BenHenning Feb 18, 2022
a6d1111
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Feb 18, 2022
64a1b55
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Feb 18, 2022
151e0bf
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Feb 18, 2022
fd9ec1f
Fix broken build.
BenHenning Feb 18, 2022
960287d
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Feb 18, 2022
b85567e
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Feb 18, 2022
2ed67c5
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Feb 18, 2022
3744cf2
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Feb 18, 2022
c57e792
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 18, 2022
056f547
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Feb 18, 2022
5431e27
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Feb 18, 2022
829bb16
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Feb 18, 2022
23254ca
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Feb 18, 2022
0fc8a1b
Fix broken build post-merge.
BenHenning Feb 18, 2022
e4b92e5
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Feb 18, 2022
9eb1c2d
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Feb 18, 2022
1f3fb48
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Feb 18, 2022
24ac61c
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 18, 2022
c74aee0
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Feb 18, 2022
e814df8
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Feb 18, 2022
6df7a21
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Feb 18, 2022
446d263
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Feb 18, 2022
3cd065f
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Feb 18, 2022
c59598c
Fix broken post-merge classifier.
BenHenning Feb 18, 2022
41be40e
Address reviewer comment.
BenHenning Feb 18, 2022
8070cb6
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Feb 18, 2022
1ea2241
Post-merge build fixes.
BenHenning Feb 18, 2022
c01f939
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Feb 24, 2022
14f7057
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Feb 24, 2022
b98e1ec
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Feb 24, 2022
b50c40f
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Feb 24, 2022
6d0cc9e
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Feb 24, 2022
2217f7d
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Feb 24, 2022
a9adda1
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Feb 24, 2022
ac63847
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Feb 24, 2022
3f236cb
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Feb 24, 2022
7a76b98
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Feb 24, 2022
af86921
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Feb 24, 2022
ebac9b3
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Feb 24, 2022
1d74aed
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Mar 7, 2022
2ae10ec
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Mar 7, 2022
60670a5
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Mar 7, 2022
473b562
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Mar 7, 2022
73a052f
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Mar 7, 2022
e35b13f
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Mar 7, 2022
9aa8315
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Mar 7, 2022
e8b8f9f
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Mar 7, 2022
a28d87f
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Mar 7, 2022
9c7a1cb
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Mar 7, 2022
3a69df4
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Mar 7, 2022
a632215
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Mar 7, 2022
8945c3a
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Mar 17, 2022
391cf22
Post-merge fix.
BenHenning Mar 17, 2022
7918001
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Mar 17, 2022
c29a47c
More post-merge fixes.
BenHenning Mar 17, 2022
19b3800
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Mar 17, 2022
aa4fd38
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Mar 17, 2022
eb2bcc3
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Mar 17, 2022
8bd314f
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Mar 17, 2022
429ee02
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Mar 17, 2022
445664a
Fix TODO comment.
BenHenning Mar 17, 2022
b82b158
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Mar 17, 2022
4dd551b
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Mar 17, 2022
4b9b9ac
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Mar 17, 2022
af405aa
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Mar 17, 2022
5d797b0
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Mar 17, 2022
52862d6
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Mar 25, 2022
cd31247
Merge branch 'develop' into add-support-for-math-expressions-pt1-fix-…
BenHenning Mar 25, 2022
4dbd838
Merge branch 'add-support-for-math-expressions-pt1-fix-proto-imports'…
BenHenning Mar 25, 2022
deabf3a
Merge branch 'develop' into add-support-for-math-expressions-pt2-math…
BenHenning Mar 26, 2022
8bd89e6
Merge branch 'add-support-for-math-expressions-pt2-math-utility-refac…
BenHenning Mar 26, 2022
06f9cfd
Merge branch 'develop' into add-support-for-math-expressions-pt3-math…
BenHenning Mar 26, 2022
a1284a1
Merge branch 'add-support-for-math-expressions-pt3-math-expression-pr…
BenHenning Mar 26, 2022
2c2328b
Merge branch 'develop' into add-support-for-math-expressions-pt4-comm…
BenHenning Mar 26, 2022
feb901b
Merge branch 'add-support-for-math-expressions-pt4-commutative-compar…
BenHenning Mar 26, 2022
783aaf0
Merge branch 'develop' into add-support-for-math-expressions-pt5-poly…
BenHenning Mar 26, 2022
7306faa
Merge branch 'add-support-for-math-expressions-pt5-polynomial-protos'…
BenHenning Mar 26, 2022
d59437c
Merge branch 'develop' into add-support-for-math-expressions-pt6-toke…
BenHenning Mar 26, 2022
be04055
Merge branch 'add-support-for-math-expressions-pt6-tokenizer' into ad…
BenHenning Mar 26, 2022
88ecf9e
Merge branch 'develop' into add-support-for-math-expressions-pt7-math…
BenHenning Mar 26, 2022
7cb991a
Merge branch 'add-support-for-math-expressions-pt7-math-expression-pa…
BenHenning Mar 26, 2022
b94f94f
Merge branch 'develop' into add-support-for-math-expressions-pt8-late…
BenHenning Mar 26, 2022
3229bae
Merge branch 'add-support-for-math-expressions-pt8-latex-conversion-a…
BenHenning Mar 26, 2022
d31a403
Merge branch 'develop' into add-support-for-math-expressions-pt9-comm…
BenHenning Mar 26, 2022
67c53ec
Merge branch 'add-support-for-math-expressions-pt9-commutative-compar…
BenHenning Mar 26, 2022
ff2df48
Merge branch 'develop' into add-support-for-math-expressions-pt10-pol…
BenHenning Mar 26, 2022
c41bda8
Merge branch 'add-support-for-math-expressions-pt10-polynomials' into…
BenHenning Mar 26, 2022
e34c52a
Merge branch 'develop' into add-support-for-math-expressions-pt11-num…
BenHenning Mar 26, 2022
78935c3
Merge branch 'add-support-for-math-expressions-pt11-numeric-expressio…
BenHenning Mar 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ VIEW_MODELS_WITH_RESOURCE_IMPORTS = [
"src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt",
"src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicItemViewModel.kt",
"src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt",
"src/main/java/org/oppia/android/app/parser/StringToFractionParser.kt",
"src/main/java/org/oppia/android/app/parser/FractionParsingUiError.kt",
"src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt",
"src/main/java/org/oppia/android/app/parser/StringToRatioParser.kt",
"src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragDropInteractionContentViewModel.kt",
Expand Down Expand Up @@ -546,8 +546,8 @@ android_library(
":views",
"//app/src/main/java/org/oppia/android/app/translation:app_language_activity_injector_provider",
"//app/src/main/java/org/oppia/android/app/translation:app_language_resource_handler",
"//model:interaction_object_java_proto_lite",
"//model:thumbnail_java_proto_lite",
"//model/src/main/proto:interaction_object_java_proto_lite",
"//model/src/main/proto:thumbnail_java_proto_lite",
"//third_party:androidx_annotation_annotation",
"//third_party:androidx_constraintlayout_constraintlayout",
"//third_party:androidx_core_core",
Expand Down Expand Up @@ -578,8 +578,8 @@ kt_android_library(
deps = [
":dagger",
"//domain/src/main/java/org/oppia/android/domain/audio:cellular_audio_dialog_controller",
"//model:question_java_proto_lite",
"//model:topic_java_proto_lite",
"//model/src/main/proto:question_java_proto_lite",
"//model/src/main/proto:topic_java_proto_lite",
"//third_party:androidx_recyclerview_recyclerview",
],
)
Expand Down Expand Up @@ -658,6 +658,7 @@ kt_android_library(
"//utility/src/main/java/org/oppia/android/util/extensions:context_extensions",
"//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_event_logger",
"//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module",
"//utility/src/main/java/org/oppia/android/util/math:fraction_parser",
# TODO(#59): Remove 'debug_util_module' once we completely migrate to Bazel from Gradle as
# we can then directly exclude debug files from the build and thus won't be requiring this module.
"//utility/src/main/java/org/oppia/android/util/networking:debug_util_module",
Expand Down Expand Up @@ -686,7 +687,7 @@ android_library(
":view_models",
"//app/src/main/java/org/oppia/android/app/translation:app_language_activity_injector_provider",
"//app/src/main/java/org/oppia/android/app/translation:app_language_resource_handler",
"//model:thumbnail_java_proto_lite",
"//model/src/main/proto:thumbnail_java_proto_lite",
"//third_party:androidx_annotation_annotation",
"//third_party:androidx_constraintlayout_constraintlayout",
"//third_party:androidx_lifecycle_lifecycle-livedata-core",
Expand Down Expand Up @@ -738,8 +739,8 @@ kt_android_library(
"//domain/src/main/java/org/oppia/android/domain/oppialogger:startup_listener",
"//domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions:logger_module",
"//domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader:worker_module",
"//model/src/main/proto:arguments_java_proto_lite",
"//domain/src/main/java/org/oppia/android/domain/profile:profile_management_controller",
"//model:arguments_java_proto_lite",
"//app/src/main/java/org/oppia/android/app/testing/activity:test_activity",
"//third_party:androidx_databinding_databinding-adapters",
"//third_party:androidx_databinding_databinding-common",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ kt_android_library(
"//app:app_visibility",
],
deps = [
"//model:profile_java_proto_lite",
"//model/src/main/proto:profile_java_proto_lite",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard
// background="@drawable/edit_text_background"
// maxLength="200".

// TODO(#4135): Add a dedicated test suite for this class.

/** The custom EditText class for fraction input interaction view. */
class FractionInputInteractionView @JvmOverloads constructor(
context: Context,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.oppia.android.app.parser

import androidx.annotation.StringRes
import org.oppia.android.R
import org.oppia.android.app.translation.AppLanguageResourceHandler
import org.oppia.android.util.math.FractionParser.FractionParsingError

/** Enum to store the errors of [FractionInputInteractionView]. */
enum class FractionParsingUiError(@StringRes private var error: Int?) {
/** Corresponds to [FractionParsingError.VALID]. */
VALID(error = null),

/** Corresponds to [FractionParsingError.INVALID_CHARS]. */
INVALID_CHARS(error = R.string.fraction_error_invalid_chars),

/** Corresponds to [FractionParsingError.INVALID_FORMAT]. */
INVALID_FORMAT(error = R.string.fraction_error_invalid_format),

/** Corresponds to [FractionParsingError.DIVISION_BY_ZERO]. */
DIVISION_BY_ZERO(error = R.string.fraction_error_divide_by_zero),

/** Corresponds to [FractionParsingError.NUMBER_TOO_LONG]. */
NUMBER_TOO_LONG(error = R.string.fraction_error_larger_than_seven_digits);

/**
* Returns the string corresponding to this error's string resources, or null if there is none.
*/
fun getErrorMessageFromStringRes(resourceHandler: AppLanguageResourceHandler): String? =
error?.let(resourceHandler::getStringInLocale)

companion object {
/**
* Returns the [FractionParsingUiError] corresponding to the specified [FractionParsingError].
*/
fun createFromParsingError(parsingError: FractionParsingError): FractionParsingUiError {
return when (parsingError) {
FractionParsingError.VALID -> VALID
FractionParsingError.INVALID_CHARS -> INVALID_CHARS
FractionParsingError.INVALID_FORMAT -> INVALID_FORMAT
FractionParsingError.DIVISION_BY_ZERO -> DIVISION_BY_ZERO
FractionParsingError.NUMBER_TOO_LONG -> NUMBER_TOO_LONG
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.oppia.android.app.parser
import androidx.annotation.StringRes
import org.oppia.android.R
import org.oppia.android.app.translation.AppLanguageResourceHandler
import org.oppia.android.domain.util.normalizeWhitespace
import org.oppia.android.util.extensions.normalizeWhitespace

/**
* This class contains methods that help to parse string to number, check realtime and submit time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import androidx.annotation.StringRes
import org.oppia.android.R
import org.oppia.android.app.model.RatioExpression
import org.oppia.android.app.translation.AppLanguageResourceHandler
import org.oppia.android.domain.util.normalizeWhitespace
import org.oppia.android.domain.util.removeWhitespace
import org.oppia.android.util.extensions.normalizeWhitespace
import org.oppia.android.util.extensions.removeWhitespace

/**
* Utility for parsing [RatioExpression]s from strings and validating strings can be parsed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import org.oppia.android.app.model.Interaction
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.UserAnswer
import org.oppia.android.app.model.WrittenTranslationContext
import org.oppia.android.app.parser.StringToFractionParser
import org.oppia.android.app.parser.FractionParsingUiError
import org.oppia.android.app.player.state.answerhandling.AnswerErrorCategory
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerErrorOrAvailabilityCheckReceiver
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerHandler
import org.oppia.android.app.translation.AppLanguageResourceHandler
import org.oppia.android.domain.translation.TranslationController
import org.oppia.android.util.math.FractionParser

/** [StateItemViewModel] for the fraction input interaction. */
class FractionInteractionViewModel(
Expand All @@ -32,7 +33,7 @@ class FractionInteractionViewModel(
var errorMessage = ObservableField<String>("")

val hintText: CharSequence = deriveHintText(interaction)
private val stringToFractionParser: StringToFractionParser = StringToFractionParser()
private val fractionParser = FractionParser()

init {
val callback: Observable.OnPropertyChangedCallback =
Expand All @@ -52,7 +53,7 @@ class FractionInteractionViewModel(
if (answerText.isNotEmpty()) {
val answerTextString = answerText.toString()
answer = InteractionObject.newBuilder().apply {
fraction = stringToFractionParser.parseFractionFromString(answerTextString)
fraction = fractionParser.parseFractionFromString(answerTextString)
}.build()
plainAnswer = answerTextString
this.writtenTranslationContext = [email protected]
Expand All @@ -63,14 +64,18 @@ class FractionInteractionViewModel(
override fun checkPendingAnswerError(category: AnswerErrorCategory): String? {
if (answerText.isNotEmpty()) {
when (category) {
AnswerErrorCategory.REAL_TIME ->
AnswerErrorCategory.REAL_TIME -> {
pendingAnswerError =
stringToFractionParser.getRealTimeAnswerError(answerText.toString())
.getErrorMessageFromStringRes(resourceHandler)
AnswerErrorCategory.SUBMIT_TIME ->
FractionParsingUiError.createFromParsingError(
fractionParser.getRealTimeAnswerError(answerText.toString())
).getErrorMessageFromStringRes(resourceHandler)
}
AnswerErrorCategory.SUBMIT_TIME -> {
pendingAnswerError =
stringToFractionParser.getSubmitTimeError(answerText.toString())
.getErrorMessageFromStringRes(resourceHandler)
FractionParsingUiError.createFromParsingError(
fractionParser.getSubmitTimeError(answerText.toString())
).getErrorMessageFromStringRes(resourceHandler)
}
}
errorMessage.set(pendingAnswerError)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.oppia.android.app.player.state.answerhandling.InteractionAnswerHandle
import org.oppia.android.app.translation.AppLanguageResourceHandler
import org.oppia.android.app.utility.toAccessibleAnswerString
import org.oppia.android.domain.translation.TranslationController
import org.oppia.android.domain.util.toAnswerString
import org.oppia.android.util.math.toAnswerString

/** [StateItemViewModel] for the ratio expression input interaction. */
class RatioExpressionInputInteractionViewModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ class InputInteractionViewTestActivityTest {
ApplicationProvider.getApplicationContext<TestApplication>().inject(this)
}

// TODO(#4135): Move fraction input tests to a dedicated test suite.

@Test
fun testFractionInput_withNoInput_hasCorrectPendingAnswerType() {
val activityScenario = ActivityScenario.launch(
Expand Down
Loading