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

This is a feature-branch pull-request from release/server-side-scoring to main #1926

Merged
merged 9 commits into from
Nov 27, 2024

Conversation

jeremywiebe
Copy link
Collaborator

@jeremywiebe jeremywiebe commented Nov 27, 2024

Summary:

This PR includes the following commits:

Issue:

Test plan:

jeremywiebe and others added 9 commits November 21, 2024 15:18
## Summary:

This PR extracts validation from the `numeric-input`'s scorer function. In reality, it's an empty function, but it follows our conventions for having the scorer call a validator first. I've created the standard tests to ensure that scorer calls the validator.

Issue: LEMS-2607

## Test plan:

`yarn test`
`yarn typecheck`

Author: jeremywiebe

Reviewers: handeyeco, jeremywiebe, Myranae

Required Reviewers:

Approved By: handeyeco

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1882
## Summary:
To complete server-side scoring, we are separating out validation logic from scoring logic. This separates that logic and updates associated tests.

Issue: LEMS-2603

## Test plan:
- Confirm all checks pass
- Confirm widget still works as expected

Author: Myranae

Reviewers: jeremywiebe, handeyeco, Myranae

Required Reviewers:

Approved By: jeremywiebe, handeyeco

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1869
## Summary:
To complete server-side scoring, we are separating out validation logic from scoring logic. This separates that logic for the sorter widget and updates associated tests.

Issue: LEMS-2605

## Test plan:
- Confirm all checks pass
- Confirm widget still works as expected via Storybook

Author: Myranae

Reviewers: jeremywiebe, handeyeco, Myranae

Required Reviewers:

Approved By: jeremywiebe, handeyeco

Checks: ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ❌ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1876
## Summary:
To complete server-side scoring, we are separating out validation logic from scoring logic. This PR separates that logic and updates associated tests.

Issue: LEMS-2597

## Test plan:
- Confirm all checks pass
- Confirm widget still works as expected

Author: Myranae

Reviewers: Myranae, jeremywiebe, handeyeco

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1898
## Summary:
To complete server-side scoring, we are separating out validation logic from scoring logic. This PR separates that logic and associated tests for the plotter widget.

Issue: LEMS-2604

## Test plan:
- Confirm checks pass
- Confirm widget still works as expected

Author: Myranae

Reviewers: jeremywiebe, Myranae, handeyeco

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1899
## Summary:
To complete server-side scoring, we are separating out validation logic from scoring logic. This PR separates validation logic that does not depend on answer information and also separates associated tests for the radio widget.

Issue: LEMS-2594

## Test plan:
- Confirm checks pass
- Confirm widget still works as expected
- Confirm the validation logic remaining in the scoring function cannot be removed from scoring

Author: Myranae

Reviewers: Myranae, jeremywiebe, handeyeco

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1902
## Summary:
In order to complete scoring server-side, we need to separate out the validation logic from the scoring logic. This work separates those two functions and updates associated tests.

Issue: LEMS-2596

## Test plan:
- Confirm all checks pass
- Confirm the widget still behaves as it should.

Author: Myranae

Reviewers: Myranae, handeyeco, jeremywiebe

Required Reviewers:

Approved By: handeyeco, jeremywiebe

Checks: ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1862
@jeremywiebe jeremywiebe self-assigned this Nov 27, 2024
@khan-actions-bot khan-actions-bot requested a review from a team November 27, 2024 22:01
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/famous-horses-grab.md, .changeset/green-ghosts-burn.md, .changeset/honest-avocados-accept.md, .changeset/nice-fans-swim.md, .changeset/sharp-radios-burn.md, .changeset/spotty-moles-reply.md, .changeset/sweet-trainers-drop.md, packages/perseus/src/validation.types.ts, packages/perseus/src/widgets/categorizer/categorizer.tsx, packages/perseus/src/widgets/categorizer/score-categorizer.test.ts, packages/perseus/src/widgets/categorizer/score-categorizer.ts, packages/perseus/src/widgets/categorizer/validate-categorizer.test.ts, packages/perseus/src/widgets/categorizer/validate-categorizer.ts, packages/perseus/src/widgets/dropdown/score-dropdown.test.ts, packages/perseus/src/widgets/dropdown/score-dropdown.ts, packages/perseus/src/widgets/dropdown/validate-dropdown.test.ts, packages/perseus/src/widgets/dropdown/validate-dropdown.ts, packages/perseus/src/widgets/numeric-input/score-numeric-input.test.ts, packages/perseus/src/widgets/numeric-input/score-numeric-input.ts, packages/perseus/src/widgets/orderer/score-orderer.test.ts, packages/perseus/src/widgets/orderer/score-orderer.ts, packages/perseus/src/widgets/orderer/validate-orderer.test.ts, packages/perseus/src/widgets/orderer/validate-orderer.ts, packages/perseus/src/widgets/plotter/plotter.tsx, packages/perseus/src/widgets/plotter/score-plotter.test.ts, packages/perseus/src/widgets/plotter/score-plotter.ts, packages/perseus/src/widgets/plotter/validate-plotter.test.ts, packages/perseus/src/widgets/plotter/validate-plotter.ts, packages/perseus/src/widgets/radio/score-radio.test.ts, packages/perseus/src/widgets/radio/score-radio.ts, packages/perseus/src/widgets/radio/validate-radio.test.ts, packages/perseus/src/widgets/radio/validate-radio.ts, packages/perseus/src/widgets/sorter/score-sorter.test.ts, packages/perseus/src/widgets/sorter/score-sorter.ts, packages/perseus/src/widgets/sorter/validate-sorter.test.ts, packages/perseus/src/widgets/sorter/validate-sorter.ts

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (53441fe) and published it to npm. You
can install it using the tag PR1926.

Example:

yarn add @khanacademy/perseus@PR1926

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR1926

Copy link
Contributor

Size Change: +724 B (+0.06%)

Total Size: 1.29 MB

Filename Size Change
packages/perseus/dist/es/index.js 422 kB +724 B (+0.17%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 77.9 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 698 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 3.68 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@jeremywiebe jeremywiebe merged commit 8042ac6 into main Nov 27, 2024
14 of 16 checks passed
@jeremywiebe jeremywiebe deleted the release/server-side-scoring branch November 27, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants