Documentation
¶
Index ¶
- func EvaluationHeader() (header []string)
- func RecordsFromEvaluationCSVFiles(evaluationCSVFilePaths []string) (records [][]string, err error)
- func SortEvaluationRecords(records [][]string)
- type AssessmentPerModel
- type AssessmentStore
- func (a *AssessmentStore) Add(model model.Model, l language.Language, repositoryPath string, ...)
- func (a *AssessmentStore) AddAssessmentPerTask(model model.Model, l language.Language, repositoryPath string, ...)
- func (a *AssessmentStore) CollapseByModel() AssessmentPerModel
- func (a *AssessmentStore) Walk(...) (err error)
- type EvaluationFile
- type Markdown
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 RecordsFromEvaluationCSVFiles ¶ added in v0.6.0
RecordsFromEvaluationCSVFiles returns all the records from all the given evaluation CSV files.
func SortEvaluationRecords ¶ added in v0.6.0
func SortEvaluationRecords(records [][]string)
SortEvaluationRecords sorts the evaluation records.
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 ¶
WriteToFile renders the Markdown to the given file.