[GRASS-SVN] r62385 - in grass-addons/grass7: gui/wxpython/wx.metadata/r.info.iso gui/wxpython/wx.metadata/v.info.iso imagery/i.segment.hierarchical raster/r.modis/r.modis.download raster/r.modis/r.modis.import vector/v.class.ml vector/v.stats vector/v.what.strds

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 26 10:18:34 PDT 2014


Author: zarch
Date: 2014-10-26 10:18:34 -0700 (Sun, 26 Oct 2014)
New Revision: 62385

Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
   grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py
   grass-addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py
   grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py
   grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
   grass-addons/grass7/vector/v.class.ml/v.class.ml.py
   grass-addons/grass7/vector/v.stats/v.stats.py
   grass-addons/grass7/vector/v.what.strds/v.what.strds.py
Log:
update import pygrass.functions to pygrass.utils

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -36,14 +36,14 @@
 import sys
 
 from grass.script import parser, fatal
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 
 def load_mdlib():
     path = get_lib_path(modname='wx.metadata', libname='mdgrass')
     if path is None:
         fatal("Not able to find the metadata library directory")
     sys.path.append(path)
-    
+
 def main():
     # load metadata library
     load_mdlib()
@@ -61,7 +61,7 @@
         xml_file = md.saveXML(path=destination,
                               xml_out_name=name,
                               overwrite=os.getenv('GRASS_OVERWRITE', False))
-        
+
         if xml_file is not False:
             md.readXML(xml_file)
             print md.validate_inspire()
@@ -71,7 +71,7 @@
         xml_file = md.saveXML(path=destination,
                               xml_out_name=name,
                               overwrite=os.getenv('GRASS_OVERWRITE', False))
-        
+
         if xml_file is not False:
             md.readXML(xml_file)
             print md.validate_basic()

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -35,7 +35,7 @@
 import sys
 
 from grass.script import parser, fatal
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 
 def load_mdlib():
     path = get_lib_path(modname='wx.metadata', libname='mdgrass')
@@ -60,7 +60,7 @@
         xml_file = md.saveXML(path=destination,
                               xml_out_name=name,
                               overwrite=os.getenv('GRASS_OVERWRITE', False))
-        
+
         if xml_file is not False:
             md.readXML(xml_file)
             print md.validate_inspire()
@@ -70,7 +70,7 @@
         xml_file = md.saveXML(path=destination,
                               xml_out_name=name,
                               overwrite=os.getenv('GRASS_OVERWRITE', False))
-        
+
         if xml_file is not False:
             md.readXML(xml_file)
             print md.validate_basic()

Modified: grass-addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py
===================================================================
--- grass-addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -148,7 +148,7 @@
 from grass.pygrass.modules.grid.split import split_region_tiles
 
 from grass.pygrass.gis import Location
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 
 path = get_lib_path("i.segment.hierarchical", "")
 if path is None:

Modified: grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -5,7 +5,7 @@
 #
 # MODULE:        r.in.modis.download
 # AUTHOR(S):     Luca Delucchi
-# PURPOSE:       r.in.modis.download is an interface to pyModis for download 
+# PURPOSE:       r.in.modis.download is an interface to pyModis for download
 #                several tiles of MODIS produts from NASA ftp
 #
 # COPYRIGHT:        (C) 2011 by Luca Delucchi
@@ -78,7 +78,7 @@
 import sys
 from datetime import *
 import grass.script as grass
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 
 
 path = get_lib_path(modname='r.modis', libname='libmodis')

Modified: grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -5,7 +5,7 @@
 #
 # MODULE:        r.modis.import
 # AUTHOR(S):     Luca Delucchi
-# PURPOSE:       r.modis.import is an interface to pyModis for import into 
+# PURPOSE:       r.modis.import is an interface to pyModis for import into
 #                GRASS GIS level 3 MODIS produts
 #
 # COPYRIGHT:        (C) 2011 by Luca Delucchi
@@ -90,7 +90,7 @@
 import shutil
 import grass.script as grass
 from datetime import date
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 
 path = get_lib_path(modname='r.modis', libname='libmodis')
 if path is None:

Modified: grass-addons/grass7/vector/v.class.ml/v.class.ml.py
===================================================================
--- grass-addons/grass7/vector/v.class.ml/v.class.ml.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/vector/v.class.ml/v.class.ml.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -146,7 +146,7 @@
 #%  multiple: no
 #%  description: choose a decomposition method (PCA, KernelPCA, ProbabilisticPCA, RandomizedPCA, FastICA, TruncatedSVD) and set the parameters using the | to separate the decomposition method from the parameters like: PCA|n_components=98
 #%  required: no
-#%  answer: 
+#%  answer:
 #%end
 #%option
 #%  key: n_training
@@ -359,7 +359,7 @@
 from sklearn.preprocessing import StandardScaler
 from sklearn.svm import SVC
 
-from grass.pygrass.functions import get_lib_path
+from grass.pygrass.utils import get_lib_path
 from grass.pygrass.messages import get_msgr
 from grass.pygrass.vector import Vector
 from grass.pygrass.modules import Module
@@ -509,8 +509,8 @@
                                 with_std='with_std' in scapar)
 
     if opt['decomposition']:
-        decmp, params = (opt['decomposition'].split('|') 
-                         if '|' in opt['decomposition'] 
+        decmp, params = (opt['decomposition'].split('|')
+                         if '|' in opt['decomposition']
                          else (opt['decomposition'], ''))
         kwargs = ({k: v for k, v in (p.split('=') for p in params.split(','))}
                   if params else {})

Modified: grass-addons/grass7/vector/v.stats/v.stats.py
===================================================================
--- grass-addons/grass7/vector/v.stats/v.stats.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/vector/v.stats/v.stats.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -132,7 +132,7 @@
 from grass.script.core import parser
 
 
-from grass.pygrass.functions import get_lib_path, get_mapset_raster
+from grass.pygrass.utils import get_lib_path, get_mapset_raster
 from grass.pygrass.vector import VectorTopo, Vector
 from grass.pygrass.vector.table import Link
 

Modified: grass-addons/grass7/vector/v.what.strds/v.what.strds.py
===================================================================
--- grass-addons/grass7/vector/v.what.strds/v.what.strds.py	2014-10-26 17:18:06 UTC (rev 62384)
+++ grass-addons/grass7/vector/v.what.strds/v.what.strds.py	2014-10-26 17:18:34 UTC (rev 62385)
@@ -43,7 +43,7 @@
 
 import grass.script as grass
 import grass.temporal as tgis
-from grass.pygrass.functions import copy as gcopy
+from grass.pygrass.utils import copy as gcopy
 from grass.pygrass.messages import Messenger
 from grass.pygrass.vector import Vector
 
@@ -139,7 +139,7 @@
                                "type_b":dataset.get_temporal_type()}))
 
         mapmatrizes = tgis.sample_stds_by_stds_topology("strds", "strds",
-                                                        strds_names, 
+                                                        strds_names,
                                                         strds_names[0], False,
                                                         None, "equal", False,
                                                         False)



More information about the grass-commit mailing list