Skip to content

Custom functions guide improvements - #1137

Merged
sequba merged 21 commits into
developfrom
feature/issue-1123
Mar 1, 2023
Merged

sequba merged 21 commits into
developfrom
feature/issue-1123

Conversation

@sequba

@sequba sequba commented Jan 10, 2023 •

Copy link
Copy Markdown
Contributor

Context

  • describe the possible function argument types
  • refactor the runFunction method completely
  • describe what the runFunction method does
  • describe SimpleRangeValue class in the API reference and link it to the custom-functions guide

How did you test your changes?

  • unit tests passed
  • local docs build
  • Grammarly spellcheck

Types of changes

  • Breaking change (a fix or a feature because of which an existing functionality doesn't work as expected anymore)
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues:

Fixes #1123

Checklist:

  • My change is compliant with the OpenDocument standard.
  • My change is compatible with Microsoft Excel.
  • My change is compatible with Google Sheets.
  • My code follows the code style of this project.
  • I described my changes in the CHANGELOG.md file.
  • My changes require a documentation update.
  • My changes require a migration guide.

@sequba sequba linked an issue Jan 10, 2023 that may be closed by this pull request
1 of 5 tasks
@github-actions

github-actions Bot commented Jan 10, 2023 •

Copy link
Copy Markdown

Performance comparison of head (80107c0) vs base (5b45643)

                                     testName |  base |  head |  change
-----------------------------------------------------------------------
                                      Sheet A | 499.6 | 498.2 |  -0.28%
                                      Sheet B | 215.5 | 211.6 |  -1.81%
                                      Sheet T | 267.8 | 266.1 |  -0.63%
                                Column ranges | 565.7 | 553.5 |  -2.16%
Sheet A:  change value, add/remove row/column |    36 |    31 | -13.89%
 Sheet B: change value, add/remove row/column |   315 |   295 |  -6.35%
                   Column ranges - add column |   245 |   220 | -10.20%
                Column ranges - without batch |   605 |   572 |  -5.45%
                        Column ranges - batch |   150 |   153 |  +2.00%

Comment thread docs/guide/built-in-functions.md Outdated
| HLOOKUP | Searches horizontally with reference to adjacent cells to the bottom. | HLOOKUP(Search_Criterion, Array, Index, Sort_Order) |
| INDEX | Returns the contents of a cell specified by row and column number. The column number is optional and defaults to 1. | INDEX(Range, Row [, Column]) |
| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, Lookuparray, Type) |
| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, Lookuparray, MatchType) |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is unrelated to this task. See: #1148 (comment)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it could be helpful to add more information about which values are accepted as MatchType and what each of them means. If MatchType is optional I think it should be mentioned as well, to keep is consistent with other functions. WDYT?

@sequba sequba Mar 1, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This description follows the general assumption that the functions work the same as in Microsoft Excel. I don't like this assumption, but currently, we do not have space for a more thorough documentation of the built-in functions.

So:

Comment thread src/interpreter/plugin/BooleanPlugin.ts Resolved
Comment thread src/interpreter/plugin/BooleanPlugin.ts Resolved
Comment thread src/interpreter/plugin/BooleanPlugin.ts Resolved
@sequba
sequba marked this pull request as ready for review February 8, 2023 11:44
@sequba sequba self-assigned this Feb 16, 2023

@adamu-handsontable adamu-handsontable left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I've checked it and left feedback

Comment thread docs/guide/built-in-functions.md Outdated
| HLOOKUP | Searches horizontally with reference to adjacent cells to the bottom. | HLOOKUP(Search_Criterion, Array, Index, Sort_Order) |
| INDEX | Returns the contents of a cell specified by row and column number. The column number is optional and defaults to 1. | INDEX(Range, Row [, Column]) |
| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, Lookuparray, Type) |
| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, Lookuparray, MatchType) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it could be helpful to add more information about which values are accepted as MatchType and what each of them means. If MatchType is optional I think it should be mentioned as well, to keep is consistent with other functions. WDYT?

Comment thread src/interpreter/plugin/BooleanPlugin.ts Resolved

@adamu-handsontable adamu-handsontable left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Everything looks good, thank you

@codecov

codecov Bot commented Mar 1, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1137 (80107c0) into develop (5b45643) will increase coverage by 0.00%.
The diff coverage is 98.85%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1137   +/-   ##
========================================
  Coverage    95.84%   95.84%           
========================================
  Files          165      165           
  Lines        14135    14156   +21     
  Branches      3004     3005    +1     
========================================
+ Hits         13547    13568   +21     
  Misses         588      588           
Impacted Files Coverage Δ
src/parser/FormulaParser.ts 97.74% <ø> (ø)
src/parser/LexerConfig.ts 100.00% <ø> (ø)
src/interpreter/plugin/FunctionPlugin.ts 99.02% <98.70%> (+0.11%) ⬆️
src/SimpleRangeValue.ts 97.56% <100.00%> (-0.03%) ⬇️
src/interpreter/plugin/BooleanPlugin.ts 100.00% <100.00%> (ø)

@sequba
sequba merged commit c13162b into develop Mar 1, 2023
@sequba
sequba deleted the feature/issue-1123 branch March 1, 2023 11:38
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.

Custom functions guide improvements

2 participants