cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: add `scoreTarget ` as CIL feature for audits

Open BioPhoton opened this issue 1 year ago • 0 comments

User story

Followup of #713 just for audits.

Acceptance criteria

  • [ ] https://github.com/code-pushup/cli/issues/713
  • [ ] the icons should be rendered correctly on all displays
    • [ ] terminal - The "✅" and "❌" characters cause layout issues in the terminal. I suggest "✓" and "✗" instead with chalk styling. e.g. chalk.bold(chalk.green('✓')) and chalk.bold(chalk.red('✗'))
    • [ ] readme - the "✅" and "❌" characters are used
    • [ ] JSON - n/a
    • ~portal - custom icons are used and they are already fine~
graph TD

    #713 --> CLI_Preparation
    CLI_Preparation --> CLI_Client_Update
    Portal_Model_Adoption --> Portal_UI_Update
    Portal_Model_Adoption --> CLI_Client_Update
    CLI_Client_Update --> CLI_Plugin_Update

PR1 - CLI preparation

  • [ ] extend auditSchema with targetScore
  • [ ] rename applyMaxScoreAboveThreshold to scoreAuditWithScoreTarget and move it form plugin-coverage into utils
  • [ ] adjust executePlugin to apply the new scoring logic after the normalization
  • [ ] adopt categoryToGQL functions to convert the name back and the floating number back to boolean and mark it with a comment

PR2 - Portal model adoption

  • [ ] accept a number from 0-1 for new property targetScore
  • [ ] release portal-client

PR3 - CLI portal-client update

  • [ ] adopt categoryToGQL functions for new type upload
  • [ ] add targetScore styling to all places
    • [ ] for audits, scoreTarget means score is changed to perfect score, because it affects the category/group score calculation

PR4 - CLI plugin updates

  • [ ] refactor plugin-coverage for the new targetScore shape

PR5 - Portal UI updates

  • [ ] adopt score card for new targetScore logic

Implementation details

No response

Related issues:

#592, #713

BioPhoton avatar Jun 23 '24 19:06 BioPhoton