<commit_before>from __future__ import print_function
from multiprocessing import Process, Queue
import sys
import os
from urlparse import urlparse
from couchdbkit import ResourceNotFound, ResourceConflict
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from http_parser.http import ParserError
from restkit import RequestError
from corehq.apps.domain.models import Domain
from corehq.apps.domainsync.management.commands.copy_utils import copy_postgres_data_for_docs
from corehq.util.couchdb_management import CouchConfig
from corehq.util.dates import iso_string_to_date
from dimagi.utils.couch.database import iter_docs
from corehq.apps.domainsync.config import DocumentTransform, save

# doctypes we want to be careful not to copy, which must be explicitly
# specified with --include
from dimagi.utils.parsing import json_format_date

DEFAULT_EXCLUDE_TYPES = [
    'ReportNotification',
    'WeeklyNotification',
    'DailyNotification'
]

NUM_PROCESSES = 8


class Command(BaseCommand):<commit_msg>add comment to copy_domain about how it doesn't work<commit_after>from __future__ import print_function
from multiprocessing import Process, Queue
import sys
import os
from urlparse import urlparse
from couchdbkit import ResourceNotFound, ResourceConflict
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from http_parser.http import ParserError
from restkit import RequestError
from corehq.apps.domain.models import Domain
from corehq.apps.domainsync.management.commands.copy_utils import copy_postgres_data_for_docs
from corehq.util.couchdb_management import CouchConfig
from corehq.util.dates import iso_string_to_date
from dimagi.utils.couch.database import iter_docs
from corehq.apps.domainsync.config import DocumentTransform, save

# doctypes we want to be careful not to copy, which must be explicitly
# specified with --include
from dimagi.utils.parsing import json_format_date

DEFAULT_EXCLUDE_TYPES = [
    'ReportNotification',
    'WeeklyNotification',
    'DailyNotification'
]

NUM_PROCESSES = 8


class Command(BaseCommand):
    """
    DEPRECATED/NEEDS WORK - `copy_domain` is basically broken because of
      - attachments in blobdb
      - SQL data.

    Scale trello card to update this: https://trello.com/c/OGGrmoGI/16-copydomain

    """
{'fraction_non_alphanumeric': 0.05376799322607959, 'fraction_numerical': 0.001693480101608806, 'mean_word_length': 5.600558659217877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '6436959', 'n_tokens_mistral': 687, 'n_tokens_neox': 659, 'n_words': 211}