<commit_before>import uuid
import json
import decimal
import importlib
from datetime import datetime
from flexidate import FlexiDate
from mimetypes import MimeTypes
from arches.app.datatypes.base import BaseDataType
from arches.app.models import models
from arches.app.models.system_settings import settings
from arches.app.utils.betterJSONSerializer import JSONDeserializer
from arches.app.utils.betterJSONSerializer import JSONSerializer
from arches.app.search.elasticsearch_dsl_builder import Bool, Match, Range, Term, Exists
from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.geos import GeometryCollection
from django.contrib.gis.geos import fromstr
from django.contrib.gis.geos import Polygon
from django.core.exceptions import ValidationError
from django.db import connection, transaction
from shapely.geometry import asShape

EARTHCIRCUM = 40075016.6856
PIXELSPERTILE = 256

class DataTypeFactory(object):
    def __init__(self):
        self.datatypes = {datatype.datatype:datatype for datatype in models.DDataType.objects.all()}
        self.datatype_instances = {}

    def get_instance(self, datatype):
        d_datatype = self.datatypes[datatype]
        try:
            datatype_instance = self.datatype_instances[d_datatype.classname]
        except:<commit_msg>1499 business data import validation (#2072)<commit_after>import uuid
import json
import decimal
import importlib
import distutils
from datetime import datetime
from flexidate import FlexiDate
from mimetypes import MimeTypes
from arches.app.datatypes.base import BaseDataType
from arches.app.models import models
from arches.app.models.system_settings import settings
from arches.app.utils.betterJSONSerializer import JSONDeserializer
from arches.app.utils.betterJSONSerializer import JSONSerializer
from arches.app.search.elasticsearch_dsl_builder import Bool, Match, Range, Term, Exists
from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.geos import GeometryCollection
from django.contrib.gis.geos import fromstr
from django.contrib.gis.geos import Polygon
from django.core.exceptions import ValidationError
from django.db import connection, transaction
from shapely.geometry import asShape

EARTHCIRCUM = 40075016.6856
PIXELSPERTILE = 256

class DataTypeFactory(object):
    def __init__(self):
        self.datatypes = {datatype.datatype:datatype for datatype in models.DDataType.objects.all()}
        self.datatype_instances = {}

    def get_instance(self, datatype):
        d_datatype = self.datatypes[datatype]
        try:
            datatype_instance = self.datatype_instances[d_datatype.classname]
        except:
{'fraction_non_alphanumeric': 0.06150943396226415, 'fraction_numerical': 0.014339622641509434, 'mean_word_length': 5.108294930875576, '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': '2248957', 'n_tokens_mistral': 795, 'n_tokens_neox': 754, 'n_words': 208}