Renaming functions

This commit is contained in:
Philip Sargent
2020-06-27 18:00:24 +01:00
parent 4716eaa4b6
commit 467baec7da
2 changed files with 8 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ def import_survex():
import troggle.parsers.survex import troggle.parsers.survex
print("Importing Survex Blocks") print("Importing Survex Blocks")
print(" - Survex Blocks") print(" - Survex Blocks")
troggle.parsers.survex.LoadAllSurvexBlocks() troggle.parsers.survex.LoadSurvexBlocks()
print(" - Survex entrances x/y/z Positions") print(" - Survex entrances x/y/z Positions")
troggle.parsers.survex.LoadPos() troggle.parsers.survex.LoadPos()

View File

@@ -26,7 +26,7 @@ class SurvexLeg():
compass = 0.0 compass = 0.0
clino = 0.0 clino = 0.0
class LoadSurvex(): class LoadingSurvex():
"""A 'survex block' is a *begin...*end set of cave data. """A 'survex block' is a *begin...*end set of cave data.
A survex file can contain many begin-end blocks, which can be nested, and which can *include A survex file can contain many begin-end blocks, which can be nested, and which can *include
other survex files. other survex files.
@@ -707,7 +707,7 @@ class LoadSurvex():
def FindAndLoadAllSurvex(survexblockroot): def FindAndLoadSurvex(survexblockroot):
"""Follows the *include links recursively to find files """Follows the *include links recursively to find files
""" """
print(' - redirecting stdout to svxblks.log...') print(' - redirecting stdout to svxblks.log...')
@@ -720,7 +720,7 @@ def FindAndLoadAllSurvex(survexblockroot):
collatefilename = "_" + survexfileroot.path + ".svx" collatefilename = "_" + survexfileroot.path + ".svx"
svx_scan = LoadSurvex() svx_scan = LoadingSurvex()
svx_scan.callcount = 0 svx_scan.callcount = 0
svx_scan.depthinclude = 0 svx_scan.depthinclude = 0
indent="" indent=""
@@ -758,7 +758,7 @@ def FindAndLoadAllSurvex(survexblockroot):
print('\n - Loading All Survex Blocks...',file=sys.stderr) print('\n - Loading All Survex Blocks...',file=sys.stderr)
svx_load = LoadSurvex() svx_load = LoadingSurvex()
with open(collatefilename, "r") as fcollate: with open(collatefilename, "r") as fcollate:
#svx_load.LinearRecursiveLoad(survexblockroot,survexfileroot.path,fcollate, 0) #svx_load.LinearRecursiveLoad(survexblockroot,survexfileroot.path,fcollate, 0)
pass pass
@@ -772,7 +772,7 @@ def FindAndLoadAllSurvex(survexblockroot):
svx_load = None svx_load = None
print('\n - Loading All Survex Blocks...',file=sys.stderr) print('\n - Loading All Survex Blocks...',file=sys.stderr)
svxlrl = LoadSurvex() svxlrl = LoadingSurvex()
finroot = survexfileroot.OpenFile() finroot = survexfileroot.OpenFile()
svxlrl.RecursiveRecursiveLoad(survexblockroot, survexfileroot, finroot) svxlrl.RecursiveRecursiveLoad(survexblockroot, survexfileroot, finroot)
@@ -789,7 +789,7 @@ def FindAndLoadAllSurvex(survexblockroot):
return (survexlegsnumber, survexlegsalllength) return (survexlegsnumber, survexlegsalllength)
def LoadAllSurvexBlocks(): def LoadSurvexBlocks():
print(' - Flushing All Survex Blocks...') print(' - Flushing All Survex Blocks...')
models_survex.SurvexBlock.objects.all().delete() models_survex.SurvexBlock.objects.all().delete()
@@ -810,7 +810,7 @@ def LoadAllSurvexBlocks():
print(' - Loading All Survex Blocks...') print(' - Loading All Survex Blocks...')
memstart = models.get_process_memory() memstart = models.get_process_memory()
survexlegsnumber, survexlegsalllength = FindAndLoadAllSurvex(survexblockroot) survexlegsnumber, survexlegsalllength = FindAndLoadSurvex(survexblockroot)
memend = models.get_process_memory() memend = models.get_process_memory()
print(" - MEMORY start:{:.3f} MB end:{:.3f} MB increase={:.3f} MB".format(memstart,memend, memend-memstart)) print(" - MEMORY start:{:.3f} MB end:{:.3f} MB increase={:.3f} MB".format(memstart,memend, memend-memstart))