Skip to content

Commit

Permalink
version number update
Browse files Browse the repository at this point in the history
version number has been updated
  • Loading branch information
abhiataero committed Dec 30, 2020
1 parent 2b777c4 commit 1a046e2
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 64 deletions.
6 changes: 3 additions & 3 deletions Tools/PublishImageService.pyt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ------------------------------------------------------------------------------
# Name: PublishImageService.pyt
# Description: GP Tool for publish, update, delete imagery services
# Version: 20190128
# Version: 20201230
# Requirements:
# Author: Esri Imagery Workflows Team
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -324,7 +324,7 @@ class PublishImageService(object):
return '3'
else:
return '1'

def get_service_param_right_format(self, service_param):
if type(service_param) == str:
return ','.join(service_param.split(';'))
Expand Down Expand Up @@ -388,7 +388,7 @@ class PublishImageService(object):
params['service_name'].valueAsText)
else:
service_url = '{}/rest/services/{}/ImageServer'.format(config_json.get('imageserver').get('url'),
params['service_name'].valueAsText)
params['service_name'].valueAsText)
item = {
"type": "Image Service",
"title": params['service_name'].valueAsText,
Expand Down
2 changes: 1 addition & 1 deletion scripts/AddFields/AddFields.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: AddFields.py
# Description: Creates custom fields in mosaic datasets.
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/AddRasters/AddRasters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: AddRasters.py
# Description: Add rasters/data to existing mosaic datasets.
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/Base/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: Base.py
# Description: Base class used by MDCS/All Raster Solutions components.
# Version: 20201207
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions scripts/CheckForUpdate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"UpdateLocation": "https://github.com/Esri/mdcs-py",
"OnNewVersion": "Warn",
"CheckFile": "https://imageryworkflowsversion.geocloud.com/imv/MDCS.json",
"VersionMessage": "Added runtime source version check support.",
"LastChecked": "2019-11-19",
"CheckForUpdate": "Daily",
"CurrentVersion": "20191119"
"UpdateLocation": "https://github.com/Esri/mdcs-py",
"OnNewVersion": "Warn",
"CheckFile": "https://imageryworkflowsversion.geocloud.com/imv/MDCS.json",
"VersionMessage": "Added runtime source version check support.",
"LastChecked": "2020-12-30",
"CheckForUpdate": "Daily",
"CurrentVersion": "20201230"
}
2 changes: 1 addition & 1 deletion scripts/CreateMD/CreateMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: CreateMD.py
# Description: Creates source mosaic datasets.
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/CreateRefMD/CreateRefMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: CreateRefMD.py
# Description: Creates referenced mosaic datasets.
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/MDCS.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ------------------------------------------------------------------------------
# Name: MDCS.py
# Description: This is the main program entry point to MDCS.
# Version: 20191031
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Required Arguments: -i:<config_file>
# Usage: python.exe MDCS.py -c:<Optional:command(s)> -i:<config_file>
Expand Down
4 changes: 2 additions & 2 deletions scripts/MDCS_UC.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ------------------------------------------------------------------------------
# Name: MDCS_UC.py
# Description: A class to implement all user functions or to extend the built in MDCS functions/commands chain.
# Version: 20171217
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -42,7 +42,7 @@ def sample00(self, data):
def sample01(self, data):
log = data['log'] # How to use logging within the user function.
log.Message('hello world', 0)
return True
return True

def sample02(self, data):
log = data['log'] # How to use logging within the user function.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ProcessInfo/ProcessInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: ProcessInfo.py
# Description: Class to read in process values from MDCS parameter/configuration XML file.
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/ProgramCheckAndUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ------------------------------------------------------------------------------
# Name: ProgramCheckandUpdate.py
# Description: Checks and Updates workflow from Github if required.
# Version: 20191117
# Version: 20201230
# Requirements:
# Author: Esri Imagery Workflows team
# ------------------------------------------------------------------------------
Expand Down
64 changes: 32 additions & 32 deletions scripts/SetMDProperties/SetMDProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#------------------------------------------------------------------------------
# Name: SetMDProperties.py
# Description: To set mosaic dataset properties
# Version: 20170222
# Version: 20201230
# Requirements: ArcGIS 10.1 SP1
# Author: Esri Imagery Workflows team
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -60,21 +60,21 @@ def __setpropertiesCallback(self, args, fn_name):
if (self.is101SP1() == False): # OrderField set to 'BEST' would fail in 10.1 without SP1
args[CONST_ORDER_FIELD_POS] = 'MinPS'
return args


# write json from dictionary object
def writeJson(self,filename,jsonData):
log = self.m_base.m_log
try:
with open(filename, "w") as fp:
json.dump(jsonData,fp) #dump the dictionary to the json file
json.dump(jsonData,fp) #dump the dictionary to the json file
return True

except Exception as exp:
log.Message(str(exp),log.const_critical_text)
return False


# read json file and create dictionary object
def readJson(self,jsonData):
log = self.m_base.m_log
Expand All @@ -96,7 +96,7 @@ def compare_dict(self, first_dict, second_dict, outputJson):
try:
log.Message("Differences",log.const_general_text)
mDifferences["Attribute"]="First Property | Second Property"

#getting the comman keys in between two dictionaries
common_keys = first_dict.keys() & second_dict.keys()
for k in set(common_keys):
Expand All @@ -113,13 +113,13 @@ def compare_dict(self, first_dict, second_dict, outputJson):
log.Message(message,log.const_general_text)

self.writeJson(outputJson,mDifferences)
log.Message("Completed",log.const_general_text)
log.Message("Completed",log.const_general_text)
return np.all(res_compare)

except Exception as exp:
log.Message(str(exp),log.const_critical_text)
return False


#Extracting the property of mosaic and dumping properties to dictionar file
def mosaicProperty(self,mdObj):
Expand Down Expand Up @@ -174,12 +174,12 @@ def mosaicProperty(self,mdObj):
dictObj[key] = getattr(MosaicObj, value)

return dictObj

except Exception as exp:
log.Message(str(exp),log.const_critical_text)
return False

#set property of the Mosaic using json
#set property of the Mosaic using json
def setPropertybyJson(self,inputJson):
log = self.m_base.m_log
try:
Expand All @@ -195,9 +195,9 @@ def setPropertybyJson(self,inputJson):
except Exception as exp:
log.Message(str(exp),self.const_critical_text)
return False
#extract property of the Mosaic and dump to json


#extract property of the Mosaic and dump to json
def extractPropertytoJson(self,mdObj,outputJson):
log = self.m_base.m_log
try:
Expand All @@ -220,7 +220,7 @@ def setPropertyByMosaic(self,external_mosaic):
try:
if len(jsData)>0:
for attribute in jsData:

self.dic_properties_lst[attribute] = jsData[attribute] #assign the each property of mosaic with dictionary

except Exception as exp:
Expand All @@ -233,7 +233,7 @@ def setPropertyByMosaic(self,external_mosaic):
except Exception as exp:
log.Message(str(exp),self.const_critical_text)
return False


#compare properties of two mosiac
def comparePropertyByMosiac(self,internal_mosaic,external_mosaic,outputJson):
Expand All @@ -243,7 +243,7 @@ def comparePropertyByMosiac(self,internal_mosaic,external_mosaic,outputJson):
firstMosaicProperty = self.mosaicProperty(internal_mosaic)
else:
log.Message("Given Mosaic is not found or invalid",self.const_critical_text)

if arcpy.Exists(external_mosaic):
secondMosiacProperty = self.mosaicProperty(external_mosaic)
else:
Expand All @@ -255,7 +255,7 @@ def comparePropertyByMosiac(self,internal_mosaic,external_mosaic,outputJson):
except Exception as exp:
log.Message(str(exp),self.const_critical_text)
return False

#compare properties of a mosaic and json (userinput)
def comparePropertyByJson(self,internal_mosaic,inputJson,outputJson):
log = self.m_base.m_log
Expand All @@ -264,8 +264,8 @@ def comparePropertyByJson(self,internal_mosaic,inputJson,outputJson):
firstMosaicProperty = self.mosaicProperty(internal_mosaic)
else:
log.Message("Given Mosaic is not found or invalid",self.const_critical_text)


secondMosiacProperty = self.readJson(inputJson)

self.compare_dict(firstMosaicProperty,secondMosiacProperty,outputJson)
Expand All @@ -274,10 +274,10 @@ def comparePropertyByJson(self,internal_mosaic,inputJson,outputJson):
except Exception as exp:
log.Message(str(exp),self.const_critical_text)
return False


#set property of the mosaic
def setProperty(self, mdPath):

#set property of the mosaic
def setProperty(self, mdPath):
args = []
mdName = os.path.basename(mdPath).upper()
args.append(mdPath)
Expand Down Expand Up @@ -322,11 +322,11 @@ def setProperty(self, mdPath):
args.append(self.getInternalPropValue(mdName, 'time_interval'))
args.append(self.getInternalPropValue(mdName, 'time_interval_units'))
setProperties = Base.DynaInvoke('arcpy.SetMosaicDatasetProperties_management', args, self.__setpropertiesCallback, self._message)

if (setProperties.init() == False):
return False
return setProperties.invoke()

#set property of the mosaic based on the user defined flag
def setMDProperties(self, mdPath):
base = self.m_base
Expand All @@ -338,7 +338,7 @@ def setMDProperties(self, mdPath):
sp_outputjson = base.getXMLNodeValue(xmlDOM, 'sp_outputjson')
sp_flag = base.getXMLNodeValue(xmlDOM, 'sp_flag')


try:
if sp_flag == "setpropertybyjson":
if sp_inputjson == "#":
Expand All @@ -350,16 +350,16 @@ def setMDProperties(self, mdPath):
sp_inputjson = os.path.join(jsonPath,sp_inputjson)
self.setPropertybyJson(sp_inputjson)
self.setProperty(mdPath)

elif sp_flag == "setpropertybymosiac":
if sp_mosaic == "#":
log.Message("Error: MosaicDataset not found!",self.const_critical_text)
return False
else:
self.setPropertyByMosaic(sp_mosaic)
self.setProperty(mdPath)


elif sp_flag == "extractproperty":
if sp_outputjson == "#":
log.Message("Missing Ouput file to Extract property",self.const_critical_text)
Expand All @@ -369,7 +369,7 @@ def setMDProperties(self, mdPath):
else:
self.extractPropertytoJson(mdPath,sp_outputjson)


elif sp_flag == "compareproperty":
if sp_mosaic == "#":
if sp_inputjson == "#":
Expand All @@ -383,15 +383,15 @@ def setMDProperties(self, mdPath):
if absPathCheck == False:
sp_inputjson = os.path.join(jsonPath,sp_inputjson)
self.comparePropertyByJson(mdPath,sp_inputjson,sp_outputjson)


else:
if sp_outputjson == "#":
log.Message("Missing Ouput file to Extract property",self.const_critical_text)
log.Message("Extracting property to Parameter/Json/compare.json",self.const_critical_text)
sp_outputjson = os.path.join(jsonPath,"compare"+str(datetime.strftime(datetime.now(),"%Y%m%d%H%M%S"))+".json")
self.comparePropertyByMosiac(mdPath,sp_mosaic,sp_outputjson)

else:
log.Message("SP flag is not found!",self.const_critical_text)
log.Message("Using default for Set property",self.const_critical_text)
Expand Down Expand Up @@ -438,4 +438,4 @@ def init(self, config):
except:
Error = True

return True
return True
4 changes: 2 additions & 2 deletions scripts/SolutionsLog/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ------------------------------------------------------------------------------
# Name: logger.py
# Description: Class to log status from Imagery w/f components to log files.
# Version: 20170222
# Version: 20201230
# Requirements: Python
# Author: Esri Imagery Workflows team
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -248,4 +248,4 @@ def WriteLog(self, project):
c.write(doc.toprettyxml())
c.close()
except:
print ("\nError creating log file.")
print ("\nError creating log file.")
Loading

0 comments on commit 1a046e2

Please sign in to comment.