<commit_before>#!/usr/bin/env python
"""
A simple script for making latex author lists from the csv file produced by 
the DES Publication Database.
"""
__author__ = "<NAME>"
__email__ = "<EMAIL>"

import csv
import numpy as np
import os
from collections import OrderedDict as odict

journal2class = odict([
    ('apj','aastex'),
    ('aj','aastex'),
    ('prl','revtex'),
    ('prd','revtex'),
    ('aastex','aastex'),
    ('revtex','revtex'),
])
defaults = dict(
    title = "DES Publication Title",
    abstract="This list is preliminary; the status is not yet ``ready to submit''.",
    collaboration="The DES Collaboration"
)

revtex_template = r"""
\documentclass[reprint,superscriptaddress]{revtex4-1}
\pagestyle{empty}
\begin{document}
\title{%(title)s}
 
%(authors)s

\collaboration{The DES Collaboration}

\begin{abstract}
%(abstract)s
\end{abstract}
\maketitle
\end{document}
"""

aastex_template = r"""<commit_msg>Added some usage notes<commit_after>#!/usr/bin/env python
"""
A simple script for making latex author lists from the csv file produced by 
the DES Publication Database.

Some usage notes:
(1) By default, the script does not tier or sort the author list. The '--sort' option does not respect tiers.
(2) An exact match is required to group affiliations. This should not be a problem for affiliations provided by the PubDB; however, be careful if you are editing affiliations by hand.
(3) The script parses in quoted CSV format. Latex umlauts cause a problem (i.e., the Munich affiliation) and must be removed from the CSV file.
(4) There are some authors in the database with blank affiliations. These need to be corrected by hand in the CSV file.
"""
__author__ = "<NAME>"
__email__ = "<EMAIL>"

import csv
import numpy as np
import os
from collections import OrderedDict as odict

journal2class = odict([
    ('aastex','aastex'),
    ('revtex','revtex'),
    ('apj','aastex'),
    ('aj','aastex'),
    ('prl','revtex'),
    ('prd','revtex'),
])
defaults = dict(
    title = "DES Publication Title",
    abstract="This list is preliminary; the status is not yet ``ready to submit''.",
    collaboration="The DES Collaboration"
)

revtex_template = r"""
\documentclass[reprint,superscriptaddress]{revtex4-1}
\pagestyle{empty}
\begin{document}
\title{%(title)s}
 
%(authors)s

\collaboration{The DES Collaboration}

\begin{abstract}
%(abstract)s
\end{abstract}
\maketitle
\end{document}
"""

aastex_template = r"""
{'fraction_non_alphanumeric': 0.1325944170771757, 'fraction_numerical': 0.004105090311986864, 'mean_word_length': 4.69392523364486, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4182317', 'n_tokens_mistral': 795, 'n_tokens_neox': 749, 'n_words': 271}