cursus.validation.builders.reporting.scoring

Streamlined Scoring System for Universal Step Builder Tests.

Simplified scoring that leverages the alignment system’s test categorization and priority system to eliminate redundancy while preserving quality metrics.

class StreamlinedStepBuilderScorer(validation_results)[source]

Bases: object

Streamlined scorer that leverages alignment system infrastructure.

Eliminates redundancy by using alignment system’s proven test categorization and priority system while preserving essential quality metrics.

calculate_component_score(component_name)[source]

Calculate score for a validation component.

Parameters:

component_name (str) – Name of the component (alignment_validation, integration_testing, etc.)

Returns:

Tuple containing (score, details)

Return type:

Tuple[float, Dict[str, Any]]

calculate_overall_score()[source]

Calculate overall score using simplified weighted approach.

Returns:

Overall score (0-100)

Return type:

float

get_rating(score)[source]

Get rating based on score.

Parameters:

score (float) – Score to rate (0-100)

Returns:

Rating string

Return type:

str

generate_report()[source]

Generate a streamlined score report.

Returns:

Dictionary containing the score report

Return type:

Dict[str, Any]

save_report(step_name, output_dir='test_reports')[source]

Save the score report to a JSON file.

Parameters:
  • step_name (str) – Name of the step

  • output_dir (str) – Directory to save the report in

Returns:

Path to the saved report

Return type:

str

print_report()[source]

Print a formatted score report to the console.

score_builder_validation_results(validation_results, step_name='Unknown', save_report=True, output_dir='test_reports')[source]

Score validation results from the unified validation approach.

Parameters:
  • validation_results (Dict[str, Any]) – Results from UniversalStepBuilderTest.run_validation_for_step()

  • step_name (str) – Name of the step

  • save_report (bool) – Whether to save the report to a file

  • output_dir (str) – Directory to save the report in

Returns:

Score report dictionary

Return type:

Dict[str, Any]

score_builder_results(results, builder_name='Unknown', save_report=True, output_dir='test_reports', generate_chart=False)[source]

Legacy compatibility function for scoring builder results.

This function provides backward compatibility but internally uses the streamlined scoring approach.

StepBuilderScorer

alias of StreamlinedStepBuilderScorer