Skip to content

Commit

Permalink
Print the revision within the markdown reports
Browse files Browse the repository at this point in the history
Part of #207
  • Loading branch information
Munsio committed Jul 10, 2024
1 parent bca2286 commit bc02431
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/eval-dev-quality/cmd/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ func (command *Evaluate) evaluateLocal(evaluationContext *evaluate.Context) (err
if err := (report.Markdown{
DateTime: command.timestamp,
Version: evaluate.Version,
Revision: evaluate.Revision,

CSVPath: "./evaluation.csv",
LogPath: "./evaluation.log",
Expand Down
4 changes: 3 additions & 1 deletion evaluate/report/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type Markdown struct {
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
Expand Down Expand Up @@ -71,7 +73,7 @@ var markdownTemplate = template.Must(template.New("template-report").Parse(bytes
![Bar chart that categorizes all evaluated models.]({{.SVGPath}})
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version {{.Version}}` + "`" + `.
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version {{.Version}}` + "`" + ` - ` + "`" + `revision {{.Revision}}` + "`" + `.
## Results
Expand Down
6 changes: 4 additions & 2 deletions evaluate/report/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestMarkdownWriteToFile(t *testing.T) {
Markdown: Markdown{
DateTime: testTime,
Version: "1234",
Revision: "abcd",

CSVPath: "./file.csv",
LogPath: "./file.log",
Expand All @@ -74,7 +75,7 @@ func TestMarkdownWriteToFile(t *testing.T) {
![Bar chart that categorizes all evaluated models.](./file.svg)
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version 1234` + "`" + `.
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version 1234` + "`" + ` - ` + "`" + `revision abcd` + "`" + `.
## Results
Expand All @@ -101,6 +102,7 @@ func TestMarkdownWriteToFile(t *testing.T) {
Markdown: Markdown{
DateTime: testTime,
Version: "1234",
Revision: "abcd",

CSVPath: "./file.csv",
LogPath: "./file.log",
Expand All @@ -121,7 +123,7 @@ func TestMarkdownWriteToFile(t *testing.T) {
![Bar chart that categorizes all evaluated models.](./file.svg)
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version 1234` + "`" + `.
This report was generated by [DevQualityEval benchmark](https://github.com/symflower/eval-dev-quality) in ` + "`" + `version 1234` + "`" + ` - ` + "`" + `revision abcd` + "`" + `.
## Results
Expand Down

0 comments on commit bc02431

Please sign in to comment.