report

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluationHeader added in v0.6.0

func EvaluationHeader() (header []string)

evaluationHeader returns the CSV header for the evaluation CSV.

func MetaInformationRecords added in v0.6.1

func MetaInformationRecords(modelsMetaInformation []*model.MetaInformation) (records [][]string)

MetaInformationRecords converts the models meta information into sorted CSV records.

func RecordsFromEvaluationCSVFiles added in v0.6.0

func RecordsFromEvaluationCSVFiles(evaluationCSVFilePaths []string) (records [][]string, err error)

RecordsFromEvaluationCSVFiles returns all the records from all the given evaluation CSV files.

func SortRecords added in v0.6.1

func SortRecords(records [][]string)

SortRecords sorts CSV records.

func WriteCSV added in v0.6.1

func WriteCSV(writer io.Writer, header []string, records [][]string) (err error)

WriteCSV writes a header and records to a CSV file.

func WriteMetaInformationRecords added in v0.6.1

func WriteMetaInformationRecords(writer io.Writer, records [][]string) (err error)

WriteMetaInformationRecords writes the meta information records into a CSV file.

Types

type AssessmentPerModel

type AssessmentPerModel map[string]metrics.Assessments

AssessmentPerModel holds a collection of assessments per model id.

func RecordsToAssessmentsPerModel added in v0.6.0

func RecordsToAssessmentsPerModel(records [][]string) (assessmentsPerModel AssessmentPerModel, err error)

RecordsToAssessmentsPerModel converts evaluation records into assessments per model.

func (AssessmentPerModel) WalkByScore

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

WalkByScore walks the given assessment metrics by their score.

type AssessmentStore added in v0.6.0

type AssessmentStore struct {
	// contains filtered or unexported fields
}

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

func NewAssessmentStore added in v0.6.0

func NewAssessmentStore() (assessments *AssessmentStore)

NewAssessmentStore returns a new store for collecting assessments.

func (*AssessmentStore) Add added in v0.6.0

func (a *AssessmentStore) Add(model model.Model, l language.Language, repositoryPath string, taskIdentifier task.Identifier, assessment metrics.Assessments)

Add adds a new assessment.

func (*AssessmentStore) AddAssessmentPerTask added in v0.6.0

func (a *AssessmentStore) AddAssessmentPerTask(model model.Model, l language.Language, repositoryPath string, taskAssessment map[task.Identifier]metrics.Assessments)

AddAssessmentPerTask adds new assessments per task.

func (*AssessmentStore) CollapseByModel added in v0.6.0

func (a *AssessmentStore) CollapseByModel() AssessmentPerModel

CollapseByModel returns all assessments aggregated per model ID.

func (*AssessmentStore) Walk added in v0.6.0

func (a *AssessmentStore) Walk(function func(m model.Model, l language.Language, r string, t task.Identifier, a metrics.Assessments) error) (err error)

Walk walks over all entries.

type EvaluationFile added in v0.6.0

type EvaluationFile struct {
	// Holds the writer where the evaluation CSV is written to.
	io.Writer
}

EvaluationFile holds the evaluation CSV file writer.

func NewEvaluationFile added in v0.6.0

func NewEvaluationFile(writer io.Writer) (evaluationFile *EvaluationFile, err error)

NewEvaluationFile initializes an evaluation file and writes the corresponding CSV header.

func (*EvaluationFile) WriteEvaluationRecord added in v0.6.0

func (e *EvaluationFile) WriteEvaluationRecord(model model.Model, language language.Language, repositoryName string, assessmentsPerTask map[task.Identifier]metrics.Assessments) (err error)

WriteEvaluationRecord writes the assessments of a task into the evaluation CSV.

func (*EvaluationFile) WriteLines added in v0.6.0

func (e *EvaluationFile) WriteLines(records [][]string) (err error)

WriteLines takes a slice of raw records and writes them into the evaluation file.

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
	// Revision holds the Git revision of the evaluation tool.
	Revision string

	// CSVPath holds the path of detailed CSV results.
	CSVPath string
	// LogPaths holds the path of detailed logs.
	LogPaths []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