<commit_before>package gwp_core

import (
	"errors"
	"exp/inotify"
	"os"
	"strings"
	"github.com/scyth/go-webproject/gwp/libs/goconf"
        "github.com/scyth/go-webproject/gwp/libs/inotify"
	"github.com/scyth/go-webproject/gwp/gwp_context"
)

// ----------------------------------------
// Runtime config operations API
// ----------------------------------------

const (
	dflt_conf_addr    = "127.0.0.1:8000"
	dflt_conf_mux     = true
	dflt_conf_tmpdir  = "/tmp/"
	dflt_conf_livetpl = false
)

// ParseConfig parses the configuration file and does meaningful checks on defined parameters.
// If optional parameters are not met, it sets default values.
// It parses only [default] and [project] sections.
func ParseConfig(configPath string) (*gwp_context.AppConfig, error) {
	ac := gwp_context.NewAppConfig()

	// config file must parse successfully
	c, err := goconf.ReadConfigFile(configPath)
	if err != nil {
		return nil, err<commit_msg>cleanup<commit_after>package gwp_core

import (
	"errors"
	"os"
	"strings"
	"github.com/scyth/go-webproject/gwp/libs/goconf"
        "github.com/scyth/go-webproject/gwp/libs/inotify"
	"github.com/scyth/go-webproject/gwp/gwp_context"
)

// ----------------------------------------
// Runtime config operations API
// ----------------------------------------

const (
	dflt_conf_addr    = "127.0.0.1:8000"
	dflt_conf_mux     = true
	dflt_conf_tmpdir  = "/tmp/"
	dflt_conf_livetpl = false
)

// ParseConfig parses the configuration file and does meaningful checks on defined parameters.
// If optional parameters are not met, it sets default values.
// It parses only [default] and [project] sections.
func ParseConfig(configPath string) (*gwp_context.AppConfig, error) {
	ac := gwp_context.NewAppConfig()

	// config file must parse successfully
	c, err := goconf.ReadConfigFile(configPath)
	if err != nil {
		return nil, err
{'fraction_non_alphanumeric': 0.19228709159078736, 'fraction_numerical': 0.010712372790573112, 'mean_word_length': 2.6484375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5596289', 'n_tokens_mistral': 644, 'n_tokens_neox': 625, 'n_words': 144}