Project Structure#
The Ibutsu project is divided into 3 main components:
API client
pytest plugin
Server
API Client#
The API client is an autogenerated codebase, which uses the OpenAPI Generator to generate the client from the API.
To regenerate the client, run the regeneration script in the root of the repository:
./regenerate-client.sh --commit --push --delete path/to/openapi.yaml
To understand what the options do, just use the --help
option:
./regenerate-client.sh --help
Usage: regenerate-client.sh [-h|--help] [-c|--commit] [-p|--push] [-d|--delete] OPENAPI_FILE
optional arguments:
-h, --help show this help message
-c, --commit create a new branch and commit all the changes
-p, --push push the branch up to origin after commit
-d, --delete delete the branch after pushing
pytest Plugin#
The pytest plugin simply uses the API client to send test results from a pytest run to an Ibutsu server. The plugin can be installed from PyPI via pip:
pip install pytest-ibutsu
Of course if you want to develop this, you’re not going to want to install it from PyPI, so let’s rather do an editable installation:
pip install -e .
Server#
The server is further divided into two separate apps:
Frontend
Backend
Frontend#
The frontend for the server is written in ES6 and React, and uses Yarn to manage dependencies.
Backend#
The backend of the server is made up of 5 parts: