mentat-collective / emmy

The Emmy Computer Algebra System.
https://emmy.mentat.org
GNU General Public License v3.0
405 stars 24 forks source link

Retire value protocol in favor of multimethods #149

Closed littleredcomputer closed 1 year ago

littleredcomputer commented 1 year ago

Value is now renamed IKind since kind is now the only method that inhabits the protocol.

The other methods have been made into Emmy generics with defmulti.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 93 lines in your changes are missing coverage. Please review.

Comparison is base (e16b569) 86.05% compared to head (49a92a3) 87.34%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #149 +/- ## ========================================== + Coverage 86.05% 87.34% +1.29% ========================================== Files 98 98 Lines 15335 15383 +48 Branches 834 845 +11 ========================================== + Hits 13197 13437 +240 + Misses 1304 1101 -203 - Partials 834 845 +11 ``` | [Files](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective) | Coverage Δ | | |---|---|---| | [src/emmy/abstract/function.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvYWJzdHJhY3QvZnVuY3Rpb24uY2xqYw==) | `84.72% <100.00%> (+0.80%)` | :arrow_up: | | [src/emmy/calculus/covariant.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvY2FsY3VsdXMvY292YXJpYW50LmNsamM=) | `88.29% <100.00%> (+2.83%)` | :arrow_up: | | [src/emmy/calculus/form\_field.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvY2FsY3VsdXMvZm9ybV9maWVsZC5jbGpj) | `89.83% <100.00%> (ø)` | | | [src/emmy/calculus/map.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvY2FsY3VsdXMvbWFwLmNsamM=) | `92.39% <100.00%> (ø)` | | | [src/emmy/calculus/vector\_field.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvY2FsY3VsdXMvdmVjdG9yX2ZpZWxkLmNsamM=) | `98.09% <100.00%> (ø)` | | | [src/emmy/differential.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvZGlmZmVyZW50aWFsLmNsamM=) | `93.52% <100.00%> (+0.33%)` | :arrow_up: | | [src/emmy/env.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvZW52LmNsamM=) | `94.80% <ø> (ø)` | | | [src/emmy/expression.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvZXhwcmVzc2lvbi5jbGpj) | `74.81% <100.00%> (+1.73%)` | :arrow_up: | | [src/emmy/expression/analyze.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvZXhwcmVzc2lvbi9hbmFseXplLmNsamM=) | `94.16% <100.00%> (ø)` | | | [src/emmy/expression/compile.cljc](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective#diff-c3JjL2VtbXkvZXhwcmVzc2lvbi9jb21waWxlLmNsamM=) | `85.12% <100.00%> (ø)` | | | ... and [37 more](https://app.codecov.io/gh/mentat-collective/emmy/pull/149?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mentat-collective) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sritchie commented 1 year ago

@littleredcomputer looking good pending the few comments that I left... thank you for doing this!!

littleredcomputer commented 1 year ago

@littleredcomputer looking good pending the few comments that I left... thank you for doing this!!

I'm really happy to do this

littleredcomputer commented 1 year ago

Finally have enough coverage. Now on to fixing the fraction.js thing and we're done.