report

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCSV

func GenerateCSV(formatter CSVFormatter) (csvData string, err error)

GenerateCSV returns the whole CSV as string.

Types

type AssessmentPerLanguagePerModel

type AssessmentPerLanguagePerModel map[language.Language]AssessmentPerModel

AssessmentPerLanguagePerModel holds a collection of assessments per language and model.

type AssessmentPerModel

type AssessmentPerModel map[model.Model]metrics.Assessments

AssessmentPerModel holds a collection of assessments per model.

func (AssessmentPerModel) Header

func (a AssessmentPerModel) Header() (header []string)

Header returns the header description as a CSV row.

func (AssessmentPerModel) Rows

func (a AssessmentPerModel) Rows() (rows [][]string)

Rows returns all data as CSV rows.

func (AssessmentPerModel) WalkByScore

func (a AssessmentPerModel) WalkByScore(function func(model model.Model, assessment metrics.Assessments, score uint64) error) (err error)

WalkByScore walks the given assessment metrics by their score.

type AssessmentPerModelPerLanguagePerRepository

type AssessmentPerModelPerLanguagePerRepository map[model.Model]map[language.Language]map[string]metrics.Assessments

AssessmentPerModelPerLanguagePerRepository holds a collection of assessments per model per language and per repository.

func NewAssessmentPerModelPerLanguagePerRepository

func NewAssessmentPerModelPerLanguagePerRepository(models []model.Model, languages []language.Language, repositories []string) (assessments AssessmentPerModelPerLanguagePerRepository)

NewAssessmentPerModelPerLanguagePerRepository returns a new AssessmentPerModelPerLanguagePerRepository initialized with an empty assessment for each combination.

func (AssessmentPerModelPerLanguagePerRepository) CollapseByLanguage

CollapseByLanguage returns all assessments aggregated per language and model.

func (AssessmentPerModelPerLanguagePerRepository) CollapseByModel

CollapseByModel returns all assessments aggregated per model ID.

func (AssessmentPerModelPerLanguagePerRepository) Header

func (a AssessmentPerModelPerLanguagePerRepository) Header() (header []string)

Header returns the header description as a CSV row.

func (AssessmentPerModelPerLanguagePerRepository) Rows

Rows returns all data as CSV rows.

func (AssessmentPerModelPerLanguagePerRepository) Walk

Walk walks over all entries.

type CSVFormatter

type CSVFormatter interface {
	// Header returns the header description as a CSV row.
	Header() (header []string)
	// Rows returns all data as CSV rows.
	Rows() (rows [][]string)
}

CSVFormatter defines a formatter for CSV data.

type Markdown

type Markdown struct {
	// DateTime holds the timestamp of the evaluation.
	DateTime time.Time
	// Version holds the version of the evaluation tool.
	Version string

	// CSVPath holds the path of detailed CSV results.
	CSVPath string
	// LogPath holds the path of detailed logs.
	LogPath string
	// ModelLogsPath holds the path of the model logs.
	ModelLogsPath string
	// SVGPath holds the path of the charted results.
	SVGPath string

	// AssessmentPerModel holds a collection of assessments per model.
	AssessmentPerModel AssessmentPerModel
	// TotalScore holds the total reachable score per task.
	TotalScore uint64
}

Markdown holds the values for exporting a Markdown report.

func (Markdown) WriteToFile

func (m Markdown) WriteToFile(path string) (err error)

WriteToFile renders the Markdown to the given file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL