Thanks for considering to contribute to kiutils
. Please create an issue first if you want to add
new functionality and propose what you are going to do beforehand. This may not be neccessary for
simple bug fixes or enhancements.
Whenever you are contributing a new feature to kiutils
, be sure to provide unittests that
explicitly test the functionality you implemented. Check out the tests
folder in the repository
root for some examples. The following folders are of interest:
tests/testdata/
: Put files your test case may need to parse heretests/test_XXXX.py
: Test cases can be found in their respective Python filetests/testfunctions.py
: Functions to aid in testing and report generation
An example of how to run the unittests is described here.
Create a fork of kiutils
and clone it to your computer using:
git clone https://github.com/<your_name>/kiutils
cd kiutils
You may want to create a new Python virtual environment when developing kiutils
. This can be
done with Python's built-in virtual environment module:
python3 -m venv env
To enter the newly created virtual enviroment, run:
source env/bin/activate
kiutils
requires some dependencies for running tests. Install them using pip
in your virtual
environment using:
pip install -r requirements_dev.txt
In the kiutils
root directory, running the tests is done using:
python test.py
A test report is automatically generated that shows the passing/failing tests. If a test is failing, the report will show you what went wrong.
When done, leaving the virtual environment is done using:
deactivate
Create a pull request of your forked changes to discuss and merge your implementation into kiutils
.