<commit_before>import os
import json
import pandas as pd
import pytest


@pytest.fixture(scope='session')
def test_path():
    return os.path.abspath(os.path.dirname(__file__))


@pytest.fixture(scope='session')
def cps_path(test_path):
    return os.path.join(test_path, '../cps_data/cps.csv.gz')


@pytest.fixture(scope='session')
def cps(cps_path):
    return pd.read_csv(cps_path)


@pytest.fixture(scope='session')
def puf_path(test_path):
    return os.path.join(test_path, '../puf_data/puf.csv')


@pytest.fixture(scope='session')
def puf(puf_path):
    return pd.read_csv(puf_path)


@pytest.fixture(scope='session')
def metadata(test_path):
    path = os.path.join(test_path, 'records_metadata.json')
    with open(path, 'r') as f:
        return json.load(f)


@pytest.fixture(scope='session')
def benefit_growth_rates_path(test_path):
    return os.path.join(test_path, '../cps_stage3/growth_rates.csv')


@pytest.fixture(scope='session')
def raw_cps_path(test_path):
    return os.path.join(test_path, '../cps_data/cps_raw_rename.csv.gz')


@pytest.fixture(scope='session')
def raw_weights_path(test_path):
    return os.path.join(test_path, '../cps_stage2/cps_weights_raw.csv.gz')<commit_msg>Add test_growfactors.py<commit_after>import os
import json
import pandas as pd
import pytest


@pytest.fixture(scope='session')
def test_path():
    return os.path.abspath(os.path.dirname(__file__))


@pytest.fixture(scope='session')
def cps_path(test_path):
    return os.path.join(test_path, '../cps_data/cps.csv.gz')


@pytest.fixture(scope='session')
def cps(cps_path):
    return pd.read_csv(cps_path)


@pytest.fixture(scope='session')
def puf_path(test_path):
    return os.path.join(test_path, '../puf_data/puf.csv')


@pytest.fixture(scope='session')
def puf(puf_path):
    return pd.read_csv(puf_path)


@pytest.fixture(scope='session')
def metadata(test_path):
    path = os.path.join(test_path, 'records_metadata.json')
    with open(path, 'r') as f:
        return json.load(f)


@pytest.fixture(scope='session')
def benefit_growth_rates_path(test_path):
    return os.path.join(test_path, '../cps_stage3/growth_rates.csv')


@pytest.fixture(scope='session')
def raw_cps_path(test_path):
    return os.path.join(test_path, '../cps_data/cps_raw_rename.csv.gz')


@pytest.fixture(scope='session')
def raw_weights_path(test_path):
    return os.path.join(test_path, '../cps_stage2/cps_weights_raw.csv.gz')


@pytest.fixture(scope='session')
def growfactors_path(test_path):
    return os.path.join(test_path, '../stage1/growfactors.csv')


@pytest.fixture(scope='session')
def growfactors(growfactors_path):
    return pd.read_csv(growfactors_path)
{'fraction_non_alphanumeric': 0.15471273000375516, 'fraction_numerical': 0.001877581674802854, 'mean_word_length': 5.373205741626794, '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': '7084780', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1037, 'n_words': 147}