UNCLASSIFIED - NO CUI

Add radon to the pipeline's pipeline

Background

We need to add radon to the pipeline's pipeline. To do this, we'll need to add a job to the linting stage and follow the recommendations from #815 (closed). To start, we should probably soft fail if anything reports a cyclomatic complexity with a rating of D or lower.

The command we'll probably want to run to generate the cyclomatic complexity is:

python3 -m radon cc ironbank/ stages/

with this config added to our pyproject.toml

[tool.radon]
exclude = "test_*.py"
cc_min = "D"
show_complexity = "True"

We should also review code for any functions that report a D or lower and attempt to:

  • split out code where it makes sense
  • ignore the file if splitting out doesn't add any benefit

If this will take a considerable amount of time, we can mark the job as allow failure and split that effort into a separate ticket

Acceptance Criteria

  • Radon (cc) is added to the pipeline's pipeline
  • An initial attempt is made to resolve all cc issues

Definition of Done

  • The radon job passes in the pipeline
  • All cc issues are resolved or a ticket has been created to resolve them
  • The MR for this effort has been reviewed and merged
Edited by Harmanjit Bhullar