[GRASS-SVN] r66555 - in grass/trunk/temporal: t.list t.merge/testsuite t.rast.algebra/testsuite t.rast3d.list/testsuite t.vect.algebra/testsuite t.vect.list/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 21 04:18:05 PDT 2015


Author: huhabla
Date: 2015-10-21 04:18:05 -0700 (Wed, 21 Oct 2015)
New Revision: 66555

Modified:
   grass/trunk/temporal/t.list/t.list.py
   grass/trunk/temporal/t.merge/testsuite/test.t.merge.sh
   grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
   grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity.py
   grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity_fails.py
   grass/trunk/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh
   grass/trunk/temporal/t.vect.algebra/testsuite/test_vector_algebra.py
   grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh
   grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh
Log:
temporal modules: Fixed several wrong t.register calls in the module tests


Modified: grass/trunk/temporal/t.list/t.list.py
===================================================================
--- grass/trunk/temporal/t.list/t.list.py	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.list/t.list.py	2015-10-21 11:18:05 UTC (rev 66555)
@@ -99,6 +99,8 @@
     tgis.init()
 
     sp = tgis.dataset_factory(type, None)
+    dbif = tgis.SQLDatabaseInterfaceConnection()
+    dbif.connect()
     first = True
     
     if  gscript.verbosity() > 0:
@@ -110,7 +112,7 @@
         else:
             time = "relative time"
 
-        stds_list = tgis.get_dataset_list(type,  ttype,  columns,  where,  order)
+        stds_list = tgis.get_dataset_list(type,  ttype,  columns,  where,  order, dbif=dbif)
 
         # Use the correct order of the mapsets, hence first the current mapset, then
         # alphabetic ordering
@@ -155,6 +157,8 @@
             
                         print output
 
+    dbif.close()
+
 if __name__ == "__main__":
     options, flags = gscript.parser()
     main()

Modified: grass/trunk/temporal/t.merge/testsuite/test.t.merge.sh
===================================================================
--- grass/trunk/temporal/t.merge/testsuite/test.t.merge.sh	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.merge/testsuite/test.t.merge.sh	2015-10-21 11:18:05 UTC (rev 66555)
@@ -22,7 +22,7 @@
 # in several space time datasets
 t.create --o type=strds temporaltype=absolute output=precip_abs1 \
 	title="Test" descr="This is the 1 test strds" semantictype=sum
-t.register -i --o input=precip_abs1 maps=prec_1,prec_2,prec_3 
+t.register --o input=precip_abs1 maps=prec_1,prec_2,prec_3 
 
 t.create --o type=strds temporaltype=absolute output=precip_abs2 \
 	title="Test" descr="This is the 2 test strds" semantictype=sum

Modified: grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py	2015-10-21 11:18:05 UTC (rev 66555)
@@ -57,7 +57,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d1,d2,d3",
                                                  start="2001-01-03", increment="1 day", interval=True)                                                 
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
         
     def tearDown(self):
         self.runModule("t.remove", flags="rf", inputs="R", quiet=True)

Modified: grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity.py	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity.py	2015-10-21 11:18:05 UTC (rev 66555)
@@ -62,7 +62,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d3",
                                                  start="2001-05-01", increment="5 days", interval=True)
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-03-01", end="2001-04-01", interval=True)
+                                                start="2001-03-01", end="2001-04-01")
         
     def tearDown(self):
         self.runModule("t.remove", flags="rf", inputs="R", quiet=True)

Modified: grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity_fails.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity_fails.py	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_granularity_fails.py	2015-10-21 11:18:05 UTC (rev 66555)
@@ -33,9 +33,9 @@
                                          title="A", descr="A", semantic="field", overwrite=True)
 
         tgis.register_maps_in_space_time_dataset(type="raster", name="A",  maps="a1", 
-                                                start="2001-02-01", end="2001-04-01", interval=True)
+                                                start="2001-02-01", end="2001-04-01")
         tgis.register_maps_in_space_time_dataset(type="raster", name="A",  maps="a2", 
-                                                start="2001-03-01", end="2001-05-01", interval=True)
+                                                start="2001-03-01", end="2001-05-01")
         
     @classmethod
     def tearDownClass(cls):

Modified: grass/trunk/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh
===================================================================
--- grass/trunk/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh	2015-10-21 11:18:05 UTC (rev 66555)
@@ -81,24 +81,24 @@
 t.rast3d.list separator=" | " method=delta     input=volume_abs1
 t.rast3d.list separator=" | " method=deltagaps input=volume_abs1
 
-t.register -i type=raster_3d input=volume_abs2 file="${n2}"
+t.register type=raster_3d input=volume_abs2 file="${n2}"
 t.rast3d.list    separator=" | " method=comma     input=volume_abs2
 t.rast3d.list input=volume_abs2
 t.rast3d.list separator=" | " method=cols      input=volume_abs2
 t.rast3d.list separator=" | " method=delta     input=volume_abs2
 t.rast3d.list separator=" | " method=deltagaps input=volume_abs2
 
-t.register -i type=raster_3d input=volume_abs3 file="${n3}"
+t.register type=raster_3d input=volume_abs3 file="${n3}"
 t.rast3d.list    separator=" | " method=comma     input=volume_abs3
 t.rast3d.list separator=" | " method=delta     input=volume_abs3
 t.rast3d.list separator=" | " method=deltagaps input=volume_abs3
 
-t.register -i type=raster_3d input=volume_abs4 file="${n4}"
+t.register type=raster_3d input=volume_abs4 file="${n4}"
 t.rast3d.list    separator=" | " method=comma     input=volume_abs4
 t.rast3d.list separator=" | " method=delta     input=volume_abs4
 t.rast3d.list separator=" | " method=deltagaps input=volume_abs4
 
-t.register -i type=raster_3d input=volume_abs5 file="${n5}"
+t.register type=raster_3d input=volume_abs5 file="${n5}"
 t.rast3d.list    separator=" | " method=comma     input=volume_abs5
 t.rast3d.list input=volume_abs5
 t.rast3d.list separator=" | " method=cols      input=volume_abs5

Modified: grass/trunk/temporal/t.vect.algebra/testsuite/test_vector_algebra.py
===================================================================
--- grass/trunk/temporal/t.vect.algebra/testsuite/test_vector_algebra.py	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.vect.algebra/testsuite/test_vector_algebra.py	2015-10-21 11:18:05 UTC (rev 66555)
@@ -57,7 +57,7 @@
         tgis.register_maps_in_space_time_dataset(type="vector", name="D", maps="d1,d2,d3",
                                                  start="2001-01-03", increment="1 day", interval=True)
         tgis.register_maps_in_space_time_dataset(type="vector", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
     
     def tearDown(self):
         self.runModule("t.remove", type="stvds", inputs="R", quiet=True)

Modified: grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh
===================================================================
--- grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.layer.sh	2015-10-21 11:18:05 UTC (rev 66555)
@@ -87,31 +87,31 @@
 t.create type=stvds temporaltype=absolute output=soils_abs5 title="A test with input files" descr="A test with input files"
 
 # The first @test
-t.register type=vector   input=soils_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=vector input=soils_abs1 file="${n1}" start="2001-01-01" increment="1 months"
 t.vect.list    separator=" | " method=comma     input=soils_abs1
 t.vect.list input=soils_abs1
 t.vect.list separator=" | " method=cols      input=soils_abs1
 t.vect.list separator=" | " method=delta     input=soils_abs1
 t.vect.list separator=" | " method=deltagaps input=soils_abs1
 
-t.register type=vector -i input=soils_abs2 file="${n2}"
+t.register type=vector input=soils_abs2 file="${n2}"
 t.vect.list    separator=" | " method=comma     input=soils_abs2
 t.vect.list input=soils_abs2
 t.vect.list separator=" | " method=cols      input=soils_abs2
 t.vect.list separator=" | " method=delta     input=soils_abs2
 t.vect.list separator=" | " method=deltagaps input=soils_abs2
 
-t.register type=vector -i input=soils_abs3 file="${n3}"
+t.register type=vector input=soils_abs3 file="${n3}"
 t.vect.list    separator=" | " method=comma     input=soils_abs3
 t.vect.list separator=" | " method=delta     input=soils_abs3
 t.vect.list separator=" | " method=deltagaps input=soils_abs3
 
-t.register type=vector -i input=soils_abs4 file="${n4}"
+t.register type=vector input=soils_abs4 file="${n4}"
 t.vect.list    separator=" | " method=comma     input=soils_abs4
 t.vect.list separator=" | " method=delta     input=soils_abs4
 t.vect.list separator=" | " method=deltagaps input=soils_abs4
 
-t.register type=vector -i input=soils_abs5 file="${n5}"
+t.register type=vector input=soils_abs5 file="${n5}"
 t.vect.list    separator=" | " method=comma     input=soils_abs5
 t.vect.list input=soils_abs5
 t.vect.list separator=" | " method=cols      input=soils_abs5

Modified: grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh
===================================================================
--- grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh	2015-10-21 10:16:50 UTC (rev 66554)
+++ grass/trunk/temporal/t.vect.list/testsuite/test.t.vect.list.sh	2015-10-21 11:18:05 UTC (rev 66555)
@@ -73,31 +73,31 @@
 t.create type=stvds temporaltype=absolute output=lidar_abs5 title="A test with input files" descr="A test with input files"
 
 # The first @test
-t.register type=vector  input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=vector input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
 t.vect.list    separator=" | " method=comma     input=lidar_abs1
 t.vect.list input=lidar_abs1
 t.vect.list separator=" | " method=cols      input=lidar_abs1
 t.vect.list separator=" | " method=delta     input=lidar_abs1
 t.vect.list separator=" | " method=deltagaps input=lidar_abs1
 
-t.register type=vector -i input=lidar_abs2 file="${n2}"
+t.register type=vector input=lidar_abs2 file="${n2}"
 t.vect.list    separator=" | " method=comma     input=lidar_abs2
 t.vect.list input=lidar_abs2
 t.vect.list separator=" | " method=cols      input=lidar_abs2
 t.vect.list separator=" | " method=delta     input=lidar_abs2
 t.vect.list separator=" | " method=deltagaps input=lidar_abs2
 
-t.register type=vector -i input=lidar_abs3 file="${n3}"
+t.register type=vector input=lidar_abs3 file="${n3}"
 t.vect.list    separator=" | " method=comma     input=lidar_abs3
 t.vect.list separator=" | " method=delta     input=lidar_abs3
 t.vect.list separator=" | " method=deltagaps input=lidar_abs3
 
-t.register type=vector -i input=lidar_abs4 file="${n4}"
+t.register type=vector input=lidar_abs4 file="${n4}"
 t.vect.list    separator=" | " method=comma     input=lidar_abs4
 t.vect.list separator=" | " method=delta     input=lidar_abs4
 t.vect.list separator=" | " method=deltagaps input=lidar_abs4
 
-t.register type=vector -i input=lidar_abs5 file="${n5}"
+t.register type=vector input=lidar_abs5 file="${n5}"
 t.vect.list    separator=" | " method=comma     input=lidar_abs5
 t.vect.list input=lidar_abs5
 t.vect.list separator=" | " method=cols      input=lidar_abs5



More information about the grass-commit mailing list