csspin_python.radon

The radon plugin provides a way to run the Radon tool to measure various code metrics of Python code.

How to setup the radon plugin?

For using the radon plugin, a project’s spinfile.yaml must at least contain the following configuration.

Minimal configuration of spinfile.yaml to leverage radon
plugin_packages:
    - csspin-python
plugins:
    - csspin_python.radon
python:
    version: "3.11.9"

The provisioning of the required virtual environment as well as the plugins dependencies can be done via the well-known spin provision-task.

The plugin is now ready to use: spin radon --help.

How to execute the radon task?

After provision, the radon task can be executed as follows:

Executing radon
spin radon

radon schema reference

radon: 'object'

Configuration of the radon plugin for spin

radon.exe: 'path'

Path to the executable radon file.

radon.mi_threshold: 'str'

The maintainability threshold can be either A, B or C, where A is the best and C the worst. Radon will fail if any file’s maintainability score is below the defined threshold.

radon.schema: 'object'
radon.opts: 'list'
radon.requires: 'object'
radon.requires.spin: 'list'
radon.requires.python: 'list'
radon._requires: 'list'