[Experiment] AbsoluteValue with Claude implementation#3304
[Experiment] AbsoluteValue with Claude implementation#3304
Conversation
🗄️ Schema Change: Changes Detected
|
🛠️ Item Splitting: Changes Detected
|
|
Size Change: +1.31 kB (+0.27%) Total Size: 487 kB
ℹ️ View Unchanged
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (4809cd5) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3304If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3304If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3304 |
| ): PerseusGraphTypeAbsoluteValue { | ||
| return { | ||
| type: "absolute_value", | ||
| coords: [ |
There was a problem hiding this comment.
TODO: double check this, it doesn't seem to match the others.
|
|
||
| type AbsoluteValueGraphCorrect = { | ||
| type: "absolute_value"; | ||
| coords: [Coord, Coord]; |
There was a problem hiding this comment.
TODO: the other types use CollinearTuple.
| const {getSinusoidCoefficients, getQuadraticCoefficients} = coefficients; | ||
|
|
||
| // Returns {m, h, k} for f(x) = m * |x - h| + k, or undefined if coords share the same x. | ||
| function getAbsoluteValueCoefficients( |
There was a problem hiding this comment.
TODO: it defined this twice
| const correctCoeffs = getAbsoluteValueCoefficients( | ||
| rubric.correct.coords, | ||
| ); | ||
| if (approximateDeepEqual(guessCoeffs, correctCoeffs)) { |
There was a problem hiding this comment.
Should it be approximate? Seems like it should be exact?
| const {getClockwiseAngle} = angles; | ||
| const {getSinusoidCoefficients, getQuadraticCoefficients} = coefficients; | ||
|
|
||
| // Returns {m, h, k} for f(x) = m * |x - h| + k, or undefined if coords share the same x. |
There was a problem hiding this comment.
TODO: needs a better, more human readable explanation.
## Summary: - Originally I was playing with Claude and got it to implement the chart: #3304 - Later we added a guide to adding new graph types: #3320 - This ticket is ignoring Perseus#3304 and uses the guide in Perseus#3320 to create a planning document for AbsoluteValue Issue: LEMS-3936 Author: handeyeco Reviewers: claude[bot], ivyolamit, SonicScrewdriver Required Reviewers: Approved By: ivyolamit Checks: ⚪️ 1 check is neutral, ⏭️ 1 check has been skipped, ✅ 10 checks were successful Pull Request URL: #3334
Summary:
Issue: LEMS-3936
Test plan: