<commit_before>package diff

import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"errors"
	"fmt"
	"io"
	"os"
	"path"
	"strings"

	"gopkg.in/yaml.v1"

	"github.com/kr/pretty"
	"github.com/xchapter7x/enaml"
	"github.com/xchapter7x/enaml/pull"
)

func NewDiff(cacheDir string) *Diff {
	return &Diff{CacheDir: cacheDir}
}

type Diff struct {
	CacheDir string
}

func (s *Diff) ReleaseDiff(releaseURLA, releaseURLB string) (diffset []string, err error) {
	release := pull.NewRelease(s.CacheDir)
	filenameA := release.Pull(releaseURLA)
	filenameB := release.Pull(releaseURLB)
	GetReleaseManifest(filenameA)
	GetReleaseManifest(filenameB)
	return
}

func (s *Diff) JobDiffBetweenReleases(jobname, releaseURLA, releaseURLB string) (diffset []string, err error) {
	var (
		jobA      *tar.Reader
		jobB      *tar.Reader
		filenameA string
		filenameB string<commit_msg>Fix compilation since pull function now returns err<commit_after>package diff

import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"errors"
	"fmt"
	"io"
	"os"
	"path"
	"strings"

	"gopkg.in/yaml.v1"

	"github.com/kr/pretty"
	"github.com/xchapter7x/enaml"
	"github.com/xchapter7x/enaml/pull"
)

func NewDiff(cacheDir string) *Diff {
	return &Diff{CacheDir: cacheDir}
}

type Diff struct {
	CacheDir string
}

func (s *Diff) ReleaseDiff(releaseURLA, releaseURLB string) (diffset []string, err error) {
	release := pull.NewRelease(s.CacheDir)
	filenameA, _ := release.Pull(releaseURLA)
	filenameB, _ := release.Pull(releaseURLB)
	GetReleaseManifest(filenameA)
	GetReleaseManifest(filenameB)
	return
}

func (s *Diff) JobDiffBetweenReleases(jobname, releaseURLA, releaseURLB string) (diffset []string, err error) {
	var (
		jobA      *tar.Reader
		jobB      *tar.Reader
		filenameA string
		filenameB string
{'fraction_non_alphanumeric': 0.12386363636363637, 'fraction_numerical': 0.003409090909090909, 'mean_word_length': 4.792763157894737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6489294', 'n_tokens_mistral': 684, 'n_tokens_neox': 663, 'n_words': 140}