If you are looking for a way to improve the behaviour of Koala, this is the place to be. The sections below describe various ways to contribute to this great project.
A bug found is a bug solved. If you find any issues with Koala, please report them in the issue section on Github.
According to the latest documentation, there are 476 Excel functions (all functions are listed in doc/functions.xlsx
). As of this moment, not all of the functions are completed yet (only 62 are so far). We depend on people like you to help us to define them all. If you encounter one of these unmapped functions, the process below will clarify how to add them.
All the Excel functions are mapped in koala/excellib.py
. If a function doesn't work, it means that it isn't defined in this file. To add a new function, follow the following steps:
- Add the name in the list
IND_FUN
(order alphabetically) inkoala/excellib.py
. - Define a new function in the remainder of the file (also order alphabetically). The function name must be equal to the excel function name but lowercase. The arguments also have to be the same as the argument names in Excel. Exceptions are when the function takes many unnamed arguments (e.g.
SUM
). An example for the functionEOMONTH
can be found here. - Write the code in the function body and return the value that the function should return. Useful helper functions can be found and/or added in
koala/utils.py
. Please also pay attention to handling the inputs. Return the rightExcelError
in case of faulty inputs. - Document the behaviour of this function with doctstrings.
- Add the function name to
koala/functions.json
. - Add tests to
tests/excel/test_functions.py
(again in alphabetic order). If multiple arguments are defined, each of them should be tested appropriately. An example forEOMONTH
can be found here. - If new imports are used, add them to
requirements.txt
andsetup.py
.
A full pull request than can be used as an example can be found here.
If you have completed all these steps, commit the changes to your fork and open a pull request on Github. Good luck!