ironcalc / IronCalc

Main engine of the IronCalc ecosystem
Apache License 2.0
60 stars 2 forks source link

UPDATE: Adds 'user model' API #27

Closed nhatcher closed 6 months ago

nhatcher commented 6 months ago

Hey @fosdickio,

This is finally an example PR. There is a lot of ground covered in the PR.

This adds a wrapper around Model that will be used by spreadsheet applications (as opposed to engines).

The other API is the raw API.

Setting a value in the 'User' API also evaluates the model and gives you an interface to undo the change if needed. In this way the model is never in a bad state. If you set a value with the raw API and forget to call model.evaluate() some values might be wrong.

We can talk about the PR on a call.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 99.57356% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 91.25%. Comparing base (e9fc415) to head (2efb7bb).

Files Patch % Lines
base/src/user_model.rs 99.15% 6 Missing :warning:
base/src/worksheet.rs 87.50% 3 Missing :warning:
base/src/model.rs 98.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #27 +/- ## ========================================== + Coverage 90.33% 91.25% +0.92% ========================================== Files 155 165 +10 Lines 27162 29320 +2158 ========================================== + Hits 24536 26757 +2221 + Misses 2626 2563 -63 ```

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

nhatcher commented 6 months ago

Fixes #7