Explorar o código

pygrass: rename functions to utils

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62383 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli %!s(int64=10) %!d(string=hai) anos
pai
achega
fe52b6d2fa

+ 1 - 1
lib/python/pygrass/Makefile

@@ -7,7 +7,7 @@ PYDIR = $(ETC)/python
 GDIR = $(PYDIR)/grass
 GDIR = $(PYDIR)/grass
 DSTDIR = $(GDIR)/pygrass
 DSTDIR = $(GDIR)/pygrass
 
 
-MODULES = errors functions orderdict
+MODULES = errors utils orderdict
 
 
 CLEAN_SUBDIRS = messages modules raster vector gis shell tests
 CLEAN_SUBDIRS = messages modules raster vector gis shell tests
 
 

+ 1 - 1
lib/python/pygrass/gis/__init__.py

@@ -55,7 +55,7 @@ def _check(value, path, type):
     if value and CHECK_IS[type](join(path, value)):
     if value and CHECK_IS[type](join(path, value)):
         return value
         return value
     elif value is '':
     elif value is '':
-        from grass.pygrass.functions import getenv
+        from grass.pygrass.utils import getenv
         return getenv(type)
         return getenv(type)
     else:
     else:
         raise GrassError("%s <%s> not found" % (type.title(),
         raise GrassError("%s <%s> not found" % (type.title(),

+ 1 - 1
lib/python/pygrass/modules/grid/grid.py

@@ -11,7 +11,7 @@ from grass.script.setup import write_gisrc
 from grass.pygrass.gis import Mapset, Location
 from grass.pygrass.gis import Mapset, Location
 from grass.pygrass.gis.region import Region
 from grass.pygrass.gis.region import Region
 from grass.pygrass.modules import Module
 from grass.pygrass.modules import Module
-from grass.pygrass.functions import get_mapset_raster, findmaps
+from grass.pygrass.utils import get_mapset_raster, findmaps
 
 
 from grass.pygrass.modules.grid.split import split_region_tiles
 from grass.pygrass.modules.grid.split import split_region_tiles
 from grass.pygrass.modules.grid.patch import rpatch_map
 from grass.pygrass.modules.grid.patch import rpatch_map

+ 1 - 1
lib/python/pygrass/modules/grid/patch.py

@@ -8,7 +8,7 @@ from __future__ import (nested_scopes, generators, division, absolute_import,
                         with_statement, print_function, unicode_literals)
                         with_statement, print_function, unicode_literals)
 from grass.pygrass.gis.region import Region
 from grass.pygrass.gis.region import Region
 from grass.pygrass.raster import RasterRow
 from grass.pygrass.raster import RasterRow
-from grass.pygrass.functions import coor2pixel
+from grass.pygrass.utils import coor2pixel
 
 
 
 
 def get_start_end_index(bbox_list):
 def get_start_end_index(bbox_list):

+ 1 - 1
lib/python/pygrass/modules/interface/flag.py

@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 from __future__ import (nested_scopes, generators, division, absolute_import,
 from __future__ import (nested_scopes, generators, division, absolute_import,
                         with_statement, print_function, unicode_literals)
                         with_statement, print_function, unicode_literals)
-from grass.pygrass.functions import docstring_property
+from grass.pygrass.utils import docstring_property
 from grass.pygrass.modules.interface import read
 from grass.pygrass.modules.interface import read
 
 
 
 

+ 1 - 1
lib/python/pygrass/modules/interface/module.py

@@ -15,7 +15,7 @@ import time
 from grass.exceptions import CalledModuleError
 from grass.exceptions import CalledModuleError
 from grass.script.core import Popen, PIPE
 from grass.script.core import Popen, PIPE
 from grass.pygrass.errors import GrassError, ParameterError
 from grass.pygrass.errors import GrassError, ParameterError
-from grass.pygrass.functions import docstring_property
+from grass.pygrass.utils import docstring_property
 from grass.pygrass.modules.interface.parameter import Parameter
 from grass.pygrass.modules.interface.parameter import Parameter
 from grass.pygrass.modules.interface.flag import Flag
 from grass.pygrass.modules.interface.flag import Flag
 from grass.pygrass.modules.interface.typedict import TypeDict
 from grass.pygrass.modules.interface.typedict import TypeDict

+ 1 - 1
lib/python/pygrass/modules/interface/parameter.py

@@ -8,7 +8,7 @@ from __future__ import (nested_scopes, generators, division, absolute_import,
                         with_statement, print_function, unicode_literals)
                         with_statement, print_function, unicode_literals)
 import re
 import re
 
 
-from grass.pygrass.functions import docstring_property
+from grass.pygrass.utils import docstring_property
 from grass.pygrass.modules.interface.read import GETTYPE, element2dict, DOC
 from grass.pygrass.modules.interface.read import GETTYPE, element2dict, DOC
 
 
 
 

+ 1 - 1
lib/python/pygrass/modules/interface/typedict.py

@@ -12,7 +12,7 @@ try:
 except ImportError:
 except ImportError:
     from grass.pygrass.orderdict import OrderedDict
     from grass.pygrass.orderdict import OrderedDict
 
 
-from grass.pygrass.functions import docstring_property
+from grass.pygrass.utils import docstring_property
 
 
 
 
 class TypeDict(OrderedDict):
 class TypeDict(OrderedDict):

+ 2 - 2
lib/python/pygrass/testsuite/test_doctests.py

@@ -8,7 +8,7 @@ import doctest
 import grass.gunittest
 import grass.gunittest
 import grass.gunittest.utils
 import grass.gunittest.utils
 
 
-import grass.pygrass.functions as gfunctions
+import grass.pygrass.utils as gutils
 
 
 
 
 # doctest does not allow changing the base classes of test case, skip test case
 # doctest does not allow changing the base classes of test case, skip test case
@@ -30,7 +30,7 @@ def load_tests(loader, tests, ignore):
     # for now it is the only place where it works
     # for now it is the only place where it works
     grass.gunittest.utils.do_doctest_gettext_workaround()
     grass.gunittest.utils.do_doctest_gettext_workaround()
     # this should be called at some top level
     # this should be called at some top level
-    tests.addTests(doctest.DocTestSuite(gfunctions))
+    tests.addTests(doctest.DocTestSuite(gutils))
     return tests
     return tests
 
 
 
 

lib/python/pygrass/functions.py → lib/python/pygrass/utils.py