<commit_before>import os
import sys
from importlib import machinery as imp

from stayput import Site


def main():
    cwd = os.path.abspath(os.getcwd())
    site = Site(root_path=cwd)
    site.scan()

    # do terrible things
    try:
        loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py'))<commit_msg>Check for site config file<commit_after>import os
import sys
from importlib import machinery as imp

from stayput import Site


def main():
    cwd = os.path.abspath(os.getcwd())

    # No configuration, no site to build.
    if not os.path.exists(os.path.join(cwd, 'stayput.py')):
        print("Error: stayput.py not found.")
        sys.exit(1)

    # Create site object and scan for items
    site = Site(root_path=cwd)
    site.scan()

    # do terrible things
    try:
        loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py'))
{'fraction_non_alphanumeric': 0.11638418079096045, 'fraction_numerical': 0.0011299435028248588, 'mean_word_length': 3.1792452830188678, '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': '1723466', 'n_tokens_mistral': 302, 'n_tokens_neox': 290, 'n_words': 83}