<commit_before>import requests
from onevizion.util import *
from onevizion.curl import curl
from onevizion.httpbearer import HTTPBearerAuth
from onevizion.EMail import EMail

class OVImport(object):
	"""Wrapper for calling OneVizion Imports.  We have the
	following properties:

	Attributes:
		URL: A string representing the website's main URL for instance "trackor.onevizion.com".
		userName: the username used to login to the system
		password: the password used to gain access to the system
		impSpecId: the numeric identifier for the Import this file is to be applied to
		action: "INSERT_UPDATE", "INSERT", or "UPDATE"
		comments: Comments to add tot the Import
		incemental: Optional value to pass to incremental import parameter
		file: the path and file name of the file to be imported

		errors: array of any errors encounterd
		request: the requests object of call to the web api
		data: the json data converted to python array
		processId: the system processId returned from the API call
	"""

	def __init__(self, URL=None, userName=None, password=<PASSWORD>, impSpecId=None, file=None, action='INSERT_UPDATE', comments=None, incremental=None, paramToken=None, isTokenAuth=False):
		self.URL = URL
		self.userName = userName
		self.password = password
		self.impSpecId = impSpecId
		self.file = file
		self.action = action
		self.comments = comments
		self.incremental = incremental
		self.errors = []
		self.request = {}
		self.jsonData = {}
		self.processId = None
		self.isTokenAuth = isTokenAuth

		if paramToken is not None:
			if self.URL is None:
				self.URL = Config["ParameterData"][paramToken]['url']
			if self.userName is None:
				self.userName = Config["ParameterData"][paramToken]['UserName']
			if self.password is None:
				self.password = Config["ParameterData"][paramToken]['Password']

		# If all info is filled out, go ahead and run the query.
		if self.URL != None and self.userName != None and self.password != None and self.impSpecId != None and self.file != None:
			self.makeCall()

	def makeCall(self):
<commit_msg>API-217935 - patch to missing imports for ovimport.py<commit_after>import requests
import json
from datetime import datetime
from onevizion.util import *
from onevizion.curl import curl
from onevizion.httpbearer import HTTPBearerAuth
from onevizion.EMail import EMail
import onevizion

class OVImport(object):
	"""Wrapper for calling OneVizion Imports.  We have the
	following properties:

	Attributes:
		URL: A string representing the website's main URL for instance "trackor.onevizion.com".
		userName: the username used to login to the system
		password: <PASSWORD>
		impSpecId: the numeric identifier for the Import this file is to be applied to
		action: "INSERT_UPDATE", "INSERT", or "UPDATE"
		comments: Comments to add tot the Import
		incemental: Optional value to pass to incremental import parameter
		file: the path and file name of the file to be imported

		errors: array of any errors encounterd
		request: the requests object of call to the web api
		data: the json data converted to python array
		processId: the system processId returned from the API call
	"""

	def __init__(self, URL=None, userName=None, password=<PASSWORD>, impSpecId=None, file=None, action='INSERT_UPDATE', comments=None, incremental=None, paramToken=None, isTokenAuth=False):
		self.URL = URL
		self.userName = userName
		self.password = password
		self.impSpecId = impSpecId
		self.file = file
		self.action = action
		self.comments = comments
		self.incremental = incremental
		self.errors = []
		self.request = {}
		self.jsonData = {}
		self.processId = None
		self.isTokenAuth = isTokenAuth

		if paramToken is not None:
			if self.URL is None:
				self.URL = onevizion.Config["ParameterData"][paramToken]['url']
			if self.userName is None:
				self.userName = onevizion.Config["ParameterData"][paramToken]['UserName']
			if self.password is None:
				self.password = onevizion.Config["ParameterData"][paramToken]['Password']

		# If all info is filled out, go ahead and run the query.
		if self.URL != None and self.userName != None and self.password != None and self.impSpecId != None and self.file != None:
			self.makeCall()

	def makeCall(self):

{'fraction_non_alphanumeric': 0.08426565103546775, 'fraction_numerical': 0.0014282313734825041, 'mean_word_length': 4.387179487179488, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '7182018', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1212, 'n_words': 462}