Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 2.56 KB

contribute.md

File metadata and controls

24 lines (16 loc) · 2.56 KB

Contribute

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.

Test and report bugs

A bug found is a bug solved. If you find any issues with Koala, please report them in the issue section on Github.

Add new Excel functions

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:

  1. Add the name in the list IND_FUN (order alphabetically) in koala/excellib.py.
  2. 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 function EOMONTH can be found here.
  3. 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 right ExcelError in case of faulty inputs.
  4. Document the behaviour of this function with doctstrings.
  5. Add the function name to koala/functions.json.
  6. 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 for EOMONTH can be found here.
  7. If new imports are used, add them to requirements.txt and setup.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!