Challenge Overview
CHALLENGE OBJECTIVES
PROJECT BACKGROUND
SPECIFICATION
The OpenFormula Specification is defined at Oasis and can be found here:
http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part2.html
CHALLENGE SCOPE
While the OpenFormula Specification coverage is extensive, we need to start with a core subset of types, functions and operators. In this challenge, we are going to cover the items below, anything not listed below are NOT in scope:
SUBMISSION REQUIREMENTS
You have to provide the following in your submission:
REFERENCE
There are multiple open source options that support a subset of these features. FormulaJS (https://github.com/sutoiku/formula.js) is one but does not have complete coverage.
These may be looked at for reference or reuse depending on licensing models, but must be under permissive licenses that allow for distribution (e.g. Apache 2.0, MIT).
TECHNOLOGY STACK
SCORECARD REVIEW
Your submission will be reviewed on these requirements:
A single zip file containing all necessary files to cover the submission requirements above.
- Build the fundamental piece of a library that converts OpenFormula functions to Javascript functions
- Tests for all features implemented in this challenge
- Developers will be able to leverage this library as an npm module
PROJECT BACKGROUND
- Our customer needs a library that supports a core subset of the OpenFormula Specification that enables the conversion of OpenFormula functions to Javascript functions that accepts the defined parameters and returns the result.
- Developers should be able to leverage the library within a React application to take an OpenFormula function, accept the defined fields as input and generate the supporting function in Javascript.
- Developers should be able to leverage the library as an npm module within a framework like lookback to execute functions and return the result.
SPECIFICATION
The OpenFormula Specification is defined at Oasis and can be found here:
http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part2.html
CHALLENGE SCOPE
While the OpenFormula Specification coverage is extensive, we need to start with a core subset of types, functions and operators. In this challenge, we are going to cover the items below, anything not listed below are NOT in scope:
- 4 Types
- 4.1 General
- 4.2 Text (String)
- 4.3 Number
- 4.3.1 General
- 4.3.2 Time
- 4.3.3 Date
- 4.3.4 DateTime
- 4.3.5 Percentage
- 4.3.6 Currency
- 4.3.7 Logical (Number)
- 4.4 Complex Number
- 4.5 Logical (Boolean)
- 5 Expression Syntax
- 5.1 General
- 5.2 Basic Expressions
- 5.3 Constant Numbers
- 5.4 Constant Strings
- 5.5 Operators
- 6 Standard Operators and Functions
- 6.1 General
- 6.2 Common Template for Functions and Operators
- 6.15 Logical Functions
- 6.15.1 General
- 6.15.2 AND
- 6.15.3 FALSE
- 6.15.4 IF
- 6.15.5 IFERROR
- 6.15.6 IFNA
- 6.15.7 NOT
- 6.15.8 OR
- 6.15.9 TRUE
- 6.15.10 XOR
- 6.20 Text Functions
- 6.20.1 General
- 6.20.6 CONCATENATE
- 6.20.14 LOWER
- 6.20.27 UPPER
SUBMISSION REQUIREMENTS
You have to provide the following in your submission:
- Javascript code usable as npm module that covers all the listed types, functions and operators above.
- Test for each supported type, operation and function. Please note the Oasis specification does NOT provide a test suite, but does have some examples, there are also other test suites created within frameworks like FormulaJS, and you can take these as starting point and provide complete tests for this challenge.
- A simple demo app that allows users to provide an OpenFormula function and shows the converted Javascript function, this can just be a command line app as long as it demonstrates the usage of the formula functions.
- The demo app would demonstrate consuming OpenFormula and modifying data. For example, an OpenFormula may be persistent as a filter for n fields in a form, when the app is used, the formula can be applied when building the response. Example: parse('EVEN(SUM(1, 6, 7*6))').result);
REFERENCE
There are multiple open source options that support a subset of these features. FormulaJS (https://github.com/sutoiku/formula.js) is one but does not have complete coverage.
These may be looked at for reference or reuse depending on licensing models, but must be under permissive licenses that allow for distribution (e.g. Apache 2.0, MIT).
TECHNOLOGY STACK
- Javascript
- Node.js
SCORECARD REVIEW
Your submission will be reviewed on these requirements:
- Challenge Spec Requirements
- Requirements Coverage
- Coding Standards
- Best Practices
- Code Quality
- Code Documentation
- Development Requirements
- Functionality
- Modularization
- Testing
- Documentation
- Code Configuration / Setup / Verification Guide (markdown format)
- Library Usage Guide (markdown format)
Final Submission Guidelines
FINAL DELIVERABLESA single zip file containing all necessary files to cover the submission requirements above.