/[thuban]
ViewVC logotype

Revision 839


Jump to revision: Previous Next
Author: bh
Date: Tue May 6 15:54:18 2003 UTC (21 years, 10 months ago)
Changed paths: 8
Log Message:
Convert all table users to use the new table interface. This only
covers Thuban itself, not GREAT-ER or other applications built on
Thuban yet, so the compatibility interface stays in place for the
time being but it now issues DeprecationWarnings.

Finally, the new Table interface has a new method, HasColumn.

* Thuban/Model/table.py (OldTableInterfaceMixin): All methods
issue deprecation warnings when they're. The warnings refer to the
caller of the method.
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method
for the deprecation warnings

* test/test_table.py: Ignore the deprecation warnings for the old
table in the tests in this module. The purpose of the tests is to
test the old interface, after all.

* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests): Use the
constants for the types. Add a test for HasColumn
(TestTransientTable.test_transient_joined_table): Adapt to new
table interface. Add a test for HasColumn
(TestTransientTable.test_transient_table_read_twice): Adapt to new
table interface

* Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
(AutoTransientTable.HasColumn): Implement the new table interface
method
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
(AutoTransientTable.UniqueValues): Adapt to new table interface

* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
Adapt to new table interface

* test/test_layer.py (TestLayer.open_shapefile): Helper method to
simplify opening shapefiles a bit easier.
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
(TestLayer.test_point_layer): Use the new helper method
(TestLayer.test_get_field_type): New. Test for the GetFieldType
method

* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
the new table method

* test/test_memory_table.py (TestMemoryTable.test_has_column):
Test for the new table method HasColumn


Changed paths

Path Details
Directorytrunk/thuban/Thuban/Model/layer.py modified , text changed
Directorytrunk/thuban/Thuban/Model/table.py modified , text changed
Directorytrunk/thuban/Thuban/Model/transientdb.py modified , text changed
Directorytrunk/thuban/test/test_dbf_table.py modified , text changed
Directorytrunk/thuban/test/test_layer.py modified , text changed
Directorytrunk/thuban/test/test_memory_table.py modified , text changed
Directorytrunk/thuban/test/test_table.py modified , text changed
Directorytrunk/thuban/test/test_transientdb.py modified , text changed

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26