Wiki

Clone wiki

WADQC / Developing Analysis Modules

Developing Analysis Modules

New Factory Modules

To release a new factory module, create a new repository in the MedPhysQC repository containing all the required files (look at some existing modules to get inspiration). Make sure to use a meaningful name for the new repository, as this will be used as the Module name. Commonly used Module names are X_Y with X the modality and Y the name of the test or the phantom, e.g. DX_Normi13.

Hints

The WAD-QC software runs on Linux. Developing modules on Windows is fine, but keep in mind some changes might be required.

Line-endings

If you make a python module "QC.py", the first line of QC.py must be

#!/usr/bin/env python

QC.py will be executed as a shell script, and that line says the file should be interpreted as a python script. As QC.py is treated as a shell script, the line-endings of the file should be unix-style, while by default Windows creates text files with line-endings windows-style. So, be sure to use unix-style line-endings before uploading your module.

Testing Factory Modules before Release

To test (the building of) Factory Modules before releasing them, can be done by making a pre-release, or by building a factory module locally and then import it manually.

Locally build Factory Modules

When importing a factory module from the repository the following takes place:

  1. First the source directory of the factory module is downloaded in a temporary folder
  2. A script is executed, that reads the manifest.json in the downloaded source folder and builds factory module in zip format
  3. The factory module in zip format is imported, and the temporary folder is deleted

If the source of the factory module is located on the development machine, and wad_qc.<version>.whl is also installed on the development machine, then the build script can also be executed manually to build the importable analysis module module. The script to use is located in the Tools folder make_factory_module.py.

make_factory_module.py -m zip -i /source/folder/manifest.json -d /destination/folder/

Updated