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

Move functions from protractor to math/ #1394

Merged
merged 6 commits into from
Jul 8, 2024
Merged

Move functions from protractor to math/ #1394

merged 6 commits into from
Jul 8, 2024

Conversation

benchristel
Copy link
Member

These math functions weren't tested, and had some lurking bugs which I've
now fixed.

Issue: LEMS-2135

Test plan:

yarn test

@benchristel benchristel self-assigned this Jul 3, 2024
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Jul 3, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/new-eyes-repeat.md, packages/perseus/src/widgets/interactive-graphs/protractor.tsx, packages/perseus/src/widgets/interactive-graphs/graphs/utils.ts, packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx, packages/perseus/src/widgets/interactive-graphs/math/angles.test.ts, packages/perseus/src/widgets/interactive-graphs/math/angles.ts, packages/perseus/src/widgets/interactive-graphs/math/index.ts, packages/perseus/src/widgets/interactive-graphs/math/interpolation.test.ts, packages/perseus/src/widgets/interactive-graphs/math/interpolation.ts, packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx

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

@khan-actions-bot khan-actions-bot requested a review from a team July 3, 2024 23:42
Copy link
Contributor

github-actions bot commented Jul 3, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1394

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

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

Copy link
Contributor

github-actions bot commented Jul 3, 2024

Size Change: +100 B (+0.01%)

Total Size: 854 kB

Filename Size Change
packages/perseus/dist/es/index.js 415 kB +100 B (+0.02%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.2 kB
packages/kmath/dist/es/index.js 4.26 kB
packages/math-input/dist/es/index.js 80.8 kB
packages/math-input/dist/es/strings.js 1.73 kB
packages/perseus-core/dist/es/index.js 906 B
packages/perseus-editor/dist/es/index.js 272 kB
packages/perseus-error/dist/es/index.js 866 B
packages/perseus-linter/dist/es/index.js 21.8 kB
packages/perseus/dist/es/strings.js 3.21 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.98%. Comparing base (caf7148) to head (f1c75e9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1394      +/-   ##
==========================================
+ Coverage   69.77%   70.98%   +1.20%     
==========================================
  Files         502      507       +5     
  Lines      105123   105221      +98     
  Branches     5323    11333    +6010     
==========================================
+ Hits        73351    74692    +1341     
+ Misses      31656    30529    -1127     
+ Partials      116        0     -116     

Impacted file tree graph

Files Coverage Δ
...ts/interactive-graphs/graphs/components/vector.tsx 100.00% <100.00%> (ø)
...eus/src/widgets/interactive-graphs/graphs/utils.ts 96.29% <ø> (-3.71%) ⬇️
.../interactive-graphs/locked-figures/locked-line.tsx 99.28% <100.00%> (-0.02%) ⬇️
...rseus/src/widgets/interactive-graphs/math/index.ts 100.00% <100.00%> (ø)
...c/widgets/interactive-graphs/math/interpolation.ts 100.00% <100.00%> (ø)
...seus/src/widgets/interactive-graphs/protractor.tsx 31.46% <87.50%> (+0.81%) ⬆️
...seus/src/widgets/interactive-graphs/math/angles.ts 89.18% <81.81%> (-3.12%) ⬇️

... and 117 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update caf7148...f1c75e9. Read the comment docs.

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@benchristel benchristel merged commit 8ae3d18 into main Jul 8, 2024
11 checks passed
@benchristel benchristel deleted the benc/math-3 branch July 8, 2024 20:59
benchristel pushed a commit that referenced this pull request Jul 15, 2024
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @khanacademy/[email protected]

### Major Changes

-   [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package)

### Patch Changes

-   [#1405](#1405) [`a430de4c1`](a430de4) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Fix console errors and warnings printed in tests


-   [#1398](#1398) [`fa19dbc97`](fa19dbc) Thanks [@benchristel](https://github.com/benchristel)! - Internal: move the getLines function to polygon.tsx


-   [#1399](#1399) [`147ab0442`](147ab04) Thanks [@benchristel](https://github.com/benchristel)! - Internal: refactor and test `segmentsIntersect` function


-   [#1394](#1394) [`8ae3d18f1`](8ae3d18) Thanks [@benchristel](https://github.com/benchristel)! - Internal: move angle functions to math/angle.ts


-   [#1391](#1391) [`f5711a331`](f5711a3) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Resolve TODO comments


-   [#1397](#1397) [`3108f933e`](3108f93) Thanks [@benchristel](https://github.com/benchristel)! - Internal: split `MafsGraph` and `StatefulMafsGraph` into separate files.


-   [#1393](#1393) [`e6424d5e7`](e6424d5) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move and rename test files

-   Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a), [`24a72177e`](24a7217)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Major Changes

-   [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package)

### Patch Changes

-   [#1405](#1405) [`a430de4c1`](a430de4) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Fix console errors and warnings printed in tests

-   Updated dependencies \[[`a430de4c1`](a430de4), [`fa19dbc97`](fa19dbc), [`be7f14153`](be7f141), [`147ab0442`](147ab04), [`8ae3d18f1`](8ae3d18), [`b0df85a80`](b0df85a), [`f5711a331`](f5711a3), [`3108f933e`](3108f93), [`e6424d5e7`](e6424d5)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Major Changes

-   [#1406](#1406) [`24a72177e`](24a7217) Thanks [@handeyeco](https://github.com/handeyeco)! - No longer lint for profanity

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files


-   [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package)

-   Updated dependencies \[[`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Minor Changes

-   [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package)

## @khanacademy/[email protected]

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files

-   Updated dependencies \[[`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files

-   Updated dependencies \[[`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files

-   Updated dependencies \[[`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files

-   Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

-   [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files

-   Updated dependencies \[[`b0df85a80`](b0df85a)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

-   Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a), [`24a72177e`](24a7217)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

Author: khan-actions-bot

Reviewers: benchristel

Required Reviewers:

Approved By: benchristel

Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ⏭️  Publish npm snapshot, ✅ Jest Coverage (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

Pull Request URL: #1396
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.

3 participants