Skip to content

Badge generation intial version

Tim van der Horst requested to merge badge-generation into development

Description

image Adds an endpoint and a service to generate badges for a project entity.

This is done using the method described by SIG:

  1. Map metric values to risk scores
  2. Aggregate relative weight of code with each risk score
  3. Map relative weight with certain risk score to overall score for metric
  4. Map scores for each metric to overall system score.

There is a default table, which is used as a fallback for when users have chosen not to add all the tables that are required.

There is currently no way to add new tables. This is because I think it is better to refactor the entire BenchmarkingData object, as I did not know that Validation using Spring was possible when I created this. This is too much work to do before the final demo, as it might be better to do this together with the great-controller-refactoring.

Changes

Added new endpoint to the BenchmarkingController.

Additions

Added a new container class, which contains the data necessary to generate a system score for an assignment.

Added a new repository, which is where the benchmarking data containers will be stored. Each assignment can have an associated benchmarking data container.

Badge template, which change colour depending on the score. This templates generates an SVG using the overall system score.

image

Test and Review

To be filled in by the reviewers

  • All of the methods are commented to expectation

  • The methods are tested to satisfaction

  • There are no unnecessary files present in the MR

  • The continuous integration has no problems with the MR

  • The MR is filled in as requested (including labels, milestones, and reviewers)

  • The documentation is up-to-date

  • All nullable parameters are marked as such

Edited by Tim van der Horst

Merge request reports