<commit_before># -*- coding: utf-8 -*-
from nose.tools import *  # flake8: noqa (PEP8 asserts)
import mock
import urlparse

from framework.celery_tasks import handlers
from addons.osfstorage.models import OsfStorageFile
from website.preprints.tasks import format_preprint
from website.preprints.tasks import on_preprint_updated
from website.util import permissions

from framework.auth import Auth
from framework.exceptions import PermissionsError

from website import settings
from website.identifiers.utils import get_doi_and_metadata_for_object
from osf.models import NodeLog, Subject

from tests.base import OsfTestCase
from osf_tests.factories import (
    AuthUserFactory,
    ProjectFactory,
    PreprintFactory,
    PreprintProviderFactory,
    SubjectFactory,
)
from osf_tests.utils import MockShareResponse
from tests.utils import assert_logs
from api_tests import utils as api_test_utils
from website.project.views.contributor import find_preprint_provider<commit_msg>Fix overly aggressive import removal<commit_after># -*- coding: utf-8 -*-
from nose.tools import *  # flake8: noqa (PEP8 asserts)
import mock
import urlparse

from framework.celery_tasks import handlers
from addons.osfstorage.models import OsfStorageFile
from website.preprints.tasks import format_preprint
from website.preprints.tasks import on_preprint_updated
from website.util import permissions

from framework.auth import Auth
from framework.exceptions import PermissionsError

from website import settings
from website.identifiers.utils import get_doi_and_metadata_for_object
from website.preprints.tasks import update_preprint_share
from osf.models import NodeLog, Subject

from tests.base import OsfTestCase
from osf_tests.factories import (
    AuthUserFactory,
    ProjectFactory,
    PreprintFactory,
    PreprintProviderFactory,
    SubjectFactory,
)
from osf_tests.utils import MockShareResponse
from tests.utils import assert_logs
from api_tests import utils as api_test_utils
from website.project.views.contributor import find_preprint_provider
{'fraction_non_alphanumeric': 0.0461010299166258, 'fraction_numerical': 0.0029426189308484553, 'mean_word_length': 5.962457337883959, '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': '4405222', 'n_tokens_mistral': 555, 'n_tokens_neox': 547, 'n_words': 177}