<commit_before>#!/usr/bin/env python
import re
import simplejson
import time
import httplib2
import urllib2
import nose
from nose.tools import assert_equals
import os
import collections
from collections import defaultdict

# Permissions: RWX for owner, WX for others.  Set this here so that .pyc are created with these permissions
os.umask(022) 
    
def skip(f):
    f.skip = True
    return f
                
# Conforms to API specified here:  https://github.com/mhahnel/Total-Impact/wiki/Plugin-requirements
# To do automated tests with nosy                
# nosy plugin.py -A \'not skip\'

class TestInput(object):
    # each plugin needs to make sure these are all set up appropriately
    TEST_GOLD_JSON_RESPONSE_STARTS_WITH = '{"artifacts": {}, "about": {"metrics": {"date": "the date of the publication", "doi": "the DOI of the publication, if applicable", "title": "the title of the publication", "url": "the url of the full text of the publication", "journal": "the journal where the paper was published", "pmid": "the PubMed identifier of the publication, if applicable"}, "url": "http://www.crossref.org/", "icon": "http://www.crossref.org/.ico", "desc": "An official Digital Object Identifier (DOI) Registration Agency of the International DOI Foundation."}, "error": "false", "source_name": "CrossRef", "last_update": 130'
    TEST_INPUT = '{"10.1371/journal.pcbi.1000361":{"doi":"10.1371/journal.pcbi.1000361",}}'
    TEST_GOLD_PARSED_INPUT = eval(TEST_INPUT)
    <commit_msg>add libraries for new ways of handling creds<commit_after>#!/usr/bin/env python
import re
import simplejson
import time
import httplib2
import urllib2
import nose
from nose.tools import assert_equals
import os
import hashlib
import memcache
import collections
from collections import defaultdict

# Permissions: RWX for owner, WX for others.  Set this here so that .pyc are created with these permissions
os.umask(022) 
    
def skip(f):
    f.skip = True
    return f
                
# Conforms to API specified here:  https://github.com/mhahnel/Total-Impact/wiki/Plugin-requirements
# To do automated tests with nosy                
# nosy plugin.py -A \'not skip\'

class TestInput(object):
    # each plugin needs to make sure these are all set up appropriately
    TEST_GOLD_JSON_RESPONSE_STARTS_WITH = '{"artifacts": {}, "about": {"metrics": {"date": "the date of the publication", "doi": "the DOI of the publication, if applicable", "title": "the title of the publication", "url": "the url of the full text of the publication", "journal": "the journal where the paper was published", "pmid": "the PubMed identifier of the publication, if applicable"}, "url": "http://www.crossref.org/", "icon": "http://www.crossref.org/.ico", "desc": "An official Digital Object Identifier (DOI) Registration Agency of the International DOI Foundation."}, "error": "false", "source_name": "CrossRef", "last_update": 130'
    TEST_INPUT = '{"10.1371/journal.pcbi.1000361":{"doi":"10.1371/journal.pcbi.1000361",}}'
    TEST_GOLD_PARSED_INPUT = eval(TEST_INPUT)
    
{'fraction_non_alphanumeric': 0.11811023622047244, 'fraction_numerical': 0.02230971128608924, 'mean_word_length': 4.275086505190312, 'pattern_counts': {'":': 34, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '3299758', 'n_tokens_mistral': 955, 'n_tokens_neox': 880, 'n_words': 333}