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

Thoroughly test prototype rule classifiers #210

Closed
9 of 29 tasks
BenHenning opened this issue Oct 7, 2019 · 7 comments
Closed
9 of 29 tasks

Thoroughly test prototype rule classifiers #210

BenHenning opened this issue Oct 7, 2019 · 7 comments
Labels
good first issue This item is good for new contributors to make their pull request. Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Sponsor Member

BenHenning commented Oct 7, 2019

Since the rule classifiers were copied from Oppia web, they didn't have corresponding tests added to verify correctness. These should be ported over from Oppia web as well to ensure that each classifier has working functionality.

Fraction Input

  • HasDenominatorEqualToRuleClassifier
  • HasFractionalPartExactlyEqualToRuleClassifier
  • HasIntegerPartEqualToRuleClassifier
  • HasNoFractionalPartRuleClassifier
  • HasNumeratorEqualToRuleClassifier
  • IsEquivalentToAndInSimplestFormRuleClassifier
  • IsEquivalentToRuleClassifier
  • IsExactlyEqualToRuleClassifier
  • IsGreaterThanRuleClassifier
  • IsLessThanRuleClassifier

Items Selection Input

  • ContainsAtLeastOneOfRuleClassifier
  • DoesNotContainAtLeastOneOfRuleClassifier
  • EqualsRuleClassifier
  • IsProperSubsetOfRuleClassifier

Multiple Choice Input

Number With Units

  • IsEqualToRuleClassifier
  • IsEquivalentToRuleClassifier

Numeric Input

  • EqualsRuleClassifier (@miaboloix)
  • IsGreaterThanOrEqualToRuleClassifier
  • IsGreaterThanRuleClassifier
  • IsInclusivelyBetweenRuleClassifier
  • IsLessThanOrEqualToRuleClassifier
  • IsLessThanRuleClassifier
  • IsWithinToleranceRuleClassifier

Text Input

  • CaseSensitiveEqualsRuleClassifier
  • ContainsRuleClassifier (@miaboloix)
  • EqualsRuleClassifier (@miaboloix)
  • FuzzyEqualsRuleClassifier
  • StartsWithRuleClassifier
@BenHenning
Copy link
Sponsor Member Author

@micchickenburger are you interested in taking this work item?

@BenHenning
Copy link
Sponsor Member Author

BenHenning commented Nov 16, 2019

I suggest starting with TextInput. See Oppia web for how we test TextInput now, and ExplorationProgressControllerTest for how we write Robolectric tests in Android.

BenHenning added a commit that referenced this issue May 28, 2020
)

* Add first test for testing input classifiers (for multiple choice
input's equals rule type).

* Add EOF newline.
@BenHenning BenHenning added good first issue This item is good for new contributors to make their pull request. Priority: Nice-to-have This work item is nice to have for its milestone. Status: In implementation labels Jun 4, 2020
miaboloix added a commit that referenced this issue Jun 9, 2020
…1244)

* Added test file for TextInputEquals

* Wrote tests; All tests pass

* Fixed ktline errors

* Fixed naming of constants

* Fixed typo in STRING_VALUE_TEXT_SINGLE_SPACES constant

* Removed TODO in TextInputEqualsRuleClassifierProvider.kt
miaboloix added a commit that referenced this issue Jun 11, 2020
…1251)

* Wrote tests, all tests pass, no ktlint errors

* Added tests for spacing differences and no input

* Inlined most constants to add more context within tests

* Added empty string tests

* Deleted TODO in TextInputContainsRuleClassifierProvider.kt

* Inlined STRING_ANSWER constant
miaboloix added a commit that referenced this issue Jun 11, 2020
* Wrote tests, still need debugging

* All tests now pass

* Fixed ktlint errors

* Removed unnecessary line; Changed non negative to positive

* Changed epsilon range comments to be inline; Made epsilon public and referenced it directly

* Removed TODO in NumericInputEqualsRuleClassifierProvider.kt

* Added KDoc comment and changed name of constant
@BenHenning BenHenning added this to the Beta milestone Jun 23, 2020
@aggarwalpulkit596
Copy link
Contributor

@prayutsu this is something you can start with.

@aggarwalpulkit596
Copy link
Contributor

@prayutsu one classifier should only have one PR. You can take a look at existing tests for this

@prayutsu
Copy link
Contributor

@aggarwalpulkit596 I looked into it carefully. Can you please suggest for which classifier test should I go? Perhaps the easiest one

@aggarwalpulkit596
Copy link
Contributor

You can start with anyone you feel like there is no such thing as easiest one

rt4914 pushed a commit that referenced this issue Sep 2, 2020
…ierProvider (#1758)

* check fork

* local develop branch synced with remote branch

* Added tests for NumericInputIsGreaterThanRuleClassifierProvider

* fixed lint error
aggarwalpulkit596 pushed a commit that referenced this issue Sep 3, 2020
…assifierProvider (#1775)

* check fork

* local develop branch synced with remote branch

* Added tests for NumericInputIsLessThanOrEqualToRuleClassifierProvider

* Added more tests for Integers
prayutsu added a commit to prayutsu/oppia-android that referenced this issue Sep 3, 2020
…assifierProvider (oppia#1758)

* check fork

* local develop branch synced with remote branch

* Added tests for NumericInputIsGreaterThanRuleClassifierProvider

* fixed lint error
prayutsu added a commit to prayutsu/oppia-android that referenced this issue Sep 3, 2020
…uleClassifierProvider (oppia#1775)

* check fork

* local develop branch synced with remote branch

* Added tests for NumericInputIsLessThanOrEqualToRuleClassifierProvider

* Added more tests for Integers
rt4914 pushed a commit that referenced this issue Sep 3, 2020
…le (#1750)

* check fork

* local develop branch synced with remote branch

* file added

* added basic tests

* Wrote some tests

* Fixed ktlint errors and Robolectric tests errors

* Fixed all ktlint errors

* Implemented suggested changes and removed TO-DO from the corresponding file

* Added more tests for Integers

* fixed a nit change

* Removed TO-DO as it didn't get remove in the previous commits
aggarwalpulkit596 pushed a commit that referenced this issue Sep 4, 2020
…Provider (#1774)

* check fork

* local develop branch synced with remote branch

* Added tests for NumericInputIsLessThanRuleClassifierProvider

* Added more tests for Integers
rt4914 pushed a commit that referenced this issue Sep 8, 2020
…ClassifierProvider (#1807)

* Add tests for NumericInputIsInclusivelyBetweenRuleClassifierProvider

* fixed lint issues

* fixed suggested changes

* fixed nits
@Sarthak2601
Copy link
Contributor

This issue has been divided into multiple small issues [ #1880, #1881, #1883, #1884, #1885, #1886, #1887, #1888, #1889, #1890, #1891, #1892, #1893, #1894, #1895, #1896, #1897, #1898, #1899, #1900 ]. Hence, closing this issue.

BenHenning pushed a commit that referenced this issue Dec 4, 2020
…IsEquivalentToRuleClassifierProviderTest (#2221)

* Update so test names and numbers match what is tested

* Update so test names and numbers match what is tested

* Rename test to fit line limit

* Add test for equivalent mixed num & fraction, clarify test naming, remove redundant tests

* Shorten test name
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This item is good for new contributors to make their pull request. Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

No branches or pull requests

5 participants