diff --git a/ApplicationCode/GrpcInterface/Python/rips/GridCaseGroup.py b/ApplicationCode/GrpcInterface/Python/rips/GridCaseGroup.py index d00d2f9e40..5a073928b4 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/GridCaseGroup.py +++ b/ApplicationCode/GrpcInterface/Python/rips/GridCaseGroup.py @@ -17,22 +17,22 @@ class GridCaseGroup (PdmObject): id (int): Grid Case Group Id corresponding to case group Id in ResInsight project. name (str): Case name """ - def __init__(self, pdmObject): - self.groupId = pdmObject.getValue("GroupId") - PdmObject.__init__(self, pdmObject.pb2Object, pdmObject.channel) + def __init__(self, pdm_object): + self.groupId = pdm_object.getValue("GroupId") + PdmObject.__init__(self, pdm_object.pb2Object, pdm_object.channel) - def statisticsCases(self): + def statistics_cases(self): """Get a list of all statistics cases in the Grid Case Group""" - statCaseCollection = self.children("StatisticsCaseCollection")[0] - return statCaseCollection.children("Reservoirs") + stat_case_collection = self.children("StatisticsCaseCollection")[0] + return stat_case_collection.children("Reservoirs") def views(self): """Get a list of views belonging to a grid case group""" - pbmObjects = self.descendants("ReservoirView") - viewList = [] - for pbmObject in pbmObjects: - viewList.append(View(pbmObject)) - return viewList + pbm_objects = self.descendants("ReservoirView") + view_list = [] + for pbm_object in pbm_objects: + view_list.append(View(pbm_object)) + return view_list def view(self, id): """Get a particular view belonging to a case group by providing view id @@ -43,7 +43,7 @@ class GridCaseGroup (PdmObject): """ views = self.views() - for viewObject in views: - if viewObject.id == id: - return viewObject + for view_object in views: + if view_object.id == id: + return view_object return None diff --git a/ApplicationCode/GrpcInterface/Python/rips/PythonExamples/CaseGridGroup.py b/ApplicationCode/GrpcInterface/Python/rips/PythonExamples/CaseGridGroup.py index 4eccd101ba..d2089b83dc 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/PythonExamples/CaseGridGroup.py +++ b/ApplicationCode/GrpcInterface/Python/rips/PythonExamples/CaseGridGroup.py @@ -13,7 +13,7 @@ caseGroup = resinsight.project.create_grid_case_group(casePaths=casePaths) caseGroup.printObjectInfo() -#statCases = caseGroup.statisticsCases() +#statCases = caseGroup.statistics_cases() #caseIds = [] #for statCase in statCases: # statCase.setValue("DynamicPropertiesToCalculate", ["SWAT"])