<commit_before>import argparse

from xlwt import Workbook
from xlrd import open_workbook


SHEETS = ['Leaves', 'Flowers', 'Immature Plants', 'Edibles', 'Concentrates',
          'Extracts', 'SkinHair Products', 'Other']
FIELDS = ['Date of Sale', 'Amount Sold', 'Exempt Amount Sold', 'Total Sales',
          'Tax-Exempt Sales', 'Taxable Sales']

QUARTER_STRINGS = ['1st', '2nd', '3rd', '4th']


def main():
    """
    A program written to take the files expoted by greenbits and reassemble
    them for import into the oregon online revenue system.
    """
    files = set_args()
    data = process_data(files)
    output_file(data)


def process_data(files):
    """
    For each file name in the list, open and read the file. Create a dictionary
    object of lists for each sheet name in SHEETS. For each file opened, append
    each row's data to the appropriate sheet.
    """
    # Initialize data preset
    data = {x: [] for x in SHEETS}<commit_msg>Add month to quarter map<commit_after>import argparse

from xlwt import Workbook
from xlrd import open_workbook


SHEETS = ['Leaves', 'Flowers', 'Immature Plants', 'Edibles', 'Concentrates',
          'Extracts', 'SkinHair Products', 'Other']
FIELDS = ['Date of Sale', 'Amount Sold', 'Exempt Amount Sold', 'Total Sales',
          'Tax-Exempt Sales', 'Taxable Sales']

QUARTERS = {1: 1, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 3, 8: 3, 9: 3, 10: 4, 11: 4,
            12: 4}
QUARTER_STRINGS = ['1st', '2nd', '3rd', '4th']


def main():
    """
    A program written to take the files expoted by greenbits and reassemble
    them for import into the oregon online revenue system.
    """
    files = set_args()
    data = process_data(files)
    output_file(data)


def process_data(files):
    """
    For each file name in the list, open and read the file. Create a dictionary
    object of lists for each sheet name in SHEETS. For each file opened, append
    each row's data to the appropriate sheet.
    """
    # Initialize data preset
    data = {x: [] for x in SHEETS}
{'fraction_non_alphanumeric': 0.11549851924975321, 'fraction_numerical': 0.017275419545903257, 'mean_word_length': 3.2673684210526317, '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': '5351234', 'n_tokens_mistral': 692, 'n_tokens_neox': 644, 'n_words': 260}