<commit_before>package main

import (
	"fmt"
	"os"

	"github.com/Sirupsen/logrus"
	"github.com/muka/redzilla/model"
	"github.com/muka/redzilla/service"
	"github.com/spf13/viper"
)

func main() {

	viper.SetDefault("Network", "redzilla")
	viper.SetDefault("APIPort", ":3000")
	viper.SetDefault("Domain", "redzilla.localhost")
	viper.SetDefault("ImageName", "nodered/node-red-docker")
	viper.SetDefault("StorePath", "./data/store")
	viper.SetDefault("InstanceDataPath", "./data/instances")
	viper.SetDefault("LogLevel", "info")

	viper.SetEnvPrefix("redzilla")
	viper.AutomaticEnv()

	if os.Getenv("CONFIG") != "" {
		viper.AddConfigPath(os.Getenv("CONFIG"))
	} else {
		viper.SetConfigName("config")
		viper.AddConfigPath(".")
	}

	err := viper.ReadInConfig()
	if err != nil {
		panic(fmt.Errorf("Failed to read from config file: %s", err))
	}

	cfg := &model.Config{
		Network:          viper.GetString("Network"),
		APIPort:          viper.GetString("APIPort"),
		Domain:           viper.GetString("Domain"),
		ImageName:        viper.GetString("ImageName"),
		StorePath:        viper.GetString("StorePath"),
		InstanceDataPath: viper.GetString("InstanceDataPath"),
		LogLevel:         viper.GetString("LogLevel"),
	}

	lvl, err := logrus.ParseLevel(cfg.LogLevel)
	if err != nil {<commit_msg>check for config<commit_after>package main

import (
	"fmt"
	"os"

	"github.com/Sirupsen/logrus"
	"github.com/muka/redzilla/model"
	"github.com/muka/redzilla/service"
	"github.com/spf13/viper"
)

func main() {

	viper.SetDefault("Network", "redzilla")
	viper.SetDefault("APIPort", ":3000")
	viper.SetDefault("Domain", "redzilla.localhost")
	viper.SetDefault("ImageName", "nodered/node-red-docker")
	viper.SetDefault("StorePath", "./data/store")
	viper.SetDefault("InstanceDataPath", "./data/instances")
	viper.SetDefault("LogLevel", "info")

	viper.SetEnvPrefix("redzilla")
	viper.AutomaticEnv()

	if os.Getenv("CONFIG") != "" {
		viper.AddConfigPath(os.Getenv("CONFIG"))
	} else {
		if _, err := os.Stat("./config.yml"); !os.IsNotExist(err) {
			viper.SetConfigName("config")
			viper.AddConfigPath(".")
		}
	}

	err := viper.ReadInConfig()
	if err != nil {
		panic(fmt.Errorf("Failed to read from config file: %s", err))
	}

	cfg := &model.Config{
		Network:          viper.GetString("Network"),
		APIPort:          viper.GetString("APIPort"),
		Domain:           viper.GetString("Domain"),
		ImageName:        viper.GetString("ImageName"),
		StorePath:        viper.GetString("StorePath"),
		InstanceDataPath: viper.GetString("InstanceDataPath"),
		LogLevel:         viper.GetString("LogLevel"),
	}

	lvl, err := logrus.ParseLevel(cfg.LogLevel)
	if err != nil {
{'fraction_non_alphanumeric': 0.17613850207000376, 'fraction_numerical': 0.004516371847948814, 'mean_word_length': 4.252964426877471, 'pattern_counts': {'":': 2, '<': 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': '7256792', 'n_tokens_mistral': 1009, 'n_tokens_neox': 961, 'n_words': 142}