Log of /branches/WIP-pyshapelib-bramz/test/test_dbf_table.py
Parent Directory
|
Revision Log
Revision
1662 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 27 13:51:01 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 9851 byte(s)
Diff to
previous 1399
Make the table interface distinguish between row ids (an integer
that uniquely identifies a row) and row ordinals (a simple row
count from 0 to NumRows() - 1)
* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
(PostGISTable.RowOrdinalToId): New methods to conver between row
ids and row ordinals
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
parameter row_is_ordinal to indicate whether the row parameter is
the row id or the ordinal
* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
(TransientTableBase.RowOrdinalToId)
(AutoTransientTable.RowIdToOrdinal)
(AutoTransientTable.RowOrdinalToId): Same new methods as in
PostGISTable.
(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
Same new parameter as in PostGISTable.
* Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
(DBFTable.ReadValue, DBFTable.ReadRowAsDict)
(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
parameter as in PostGISTable.
* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
(DataTable.RowOrdinalToId): New methods to convert between row ids
and row ordinals.
(TableGrid.SelectRowById): New method to select a row based on its
ID as opposed to its ordinal
(DataTable.GetValue, TableGrid.OnRangeSelect)
(TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
(QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
(LayerTableFrame.__init__): Convert between row ids and row
ordinals as appropriate
* test/postgissupport.py (PostGISDatabase.__init__): Add
doc-string.
(PostGISDatabase.initdb): The optional third item in a tuple in
tables is now a (key, value) list with additional arguments to
pass to upload_shapefile
(upload_shapefile): New parameter gid_offset to allow gids that
are not the same as the shapeids in the shapefile
(PostgreSQLServer.get_default_static_data_db): Use the new
gid_offset to make the gids in landmarks 1000 higher than the
shapeids in the shapefile
* test/test_viewport.py
(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
new shapeids in the landmarks table
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Add tests for
the new table methods and new keywords arguments.
* test/test_postgis_db.py
(TestPostGISTable.test_read_row_as_dict_row_count_mode)
(TestPostGISTable.test_read_value_row_count_mode)
(TestPostGISTable.test_row_id_to_ordinal)
(TestPostGISTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
(TestPostGISShapestorePoint.test_shapes_in_region)
(TestPostGISShapestorePoint.test_shape_raw_data)
(TestPostGISShapestorePoint.test_shape_points)
(TestPostGISShapestorePoint.test_shape_shapeid)
(TestPostGISShapestorePoint.test_all_shapes)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_read_value)
(TestPostGISTable.test_read_row_as_dict): Adapt to the new
shapeids in the landmarks table
* test/test_memory_table.py
(TestMemoryTable.test_read_row_as_dict_row_count_mode)
(TestMemoryTable.test_read_value_row_count_mode)
(TestMemoryTable.test_row_id_to_ordinal)
(TestMemoryTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
* test/test_dbf_table.py
(TestDBFTable.test_read_row_as_dict_row_count_mode)
(TestDBFTable.test_read_value_row_count_mode)
(TestDBFTable.test_row_id_to_ordinal)
(TestDBFTable.test_row_oridnal_to_id): New test for the new table
methods and the new arguments
Revision
1371 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 4 18:19:16 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 8175 byte(s)
Diff to
previous 1078
* Thuban/Model/table.py (_find_dbf_column_names): New. Helper
function for table_to_dbf
(table_to_dbf): Deal with names longer than the 10 character limit
* test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
doc-string
(TestTableToDBF.test_table_to_dbf_long_col_names): New test for
long column names
Revision
1078 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed May 28 09:07:30 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 7273 byte(s)
Diff to
previous 1042
* Thuban/Model/table.py (DBFTable.__init__): Omit the extension
when determining the title from the filename.
* test/test_dbf_table.py (TestDBFTable.test_title): Update to
reflect changes in the way the title is derived from the filename
Revision
998 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu May 22 19:29:39 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 6724 byte(s)
Diff to
previous 994
Give the tables titles so that the GUI can display more meaningful
names. For now the titles are fixed but depend on e.g. filenames
or the titles of the joined tables.
* Thuban/Model/transientdb.py (TransientTable.Title)
(TransientJoinedTable.Title, AutoTransientTable.Title): New.
* Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
* test/test_transientdb.py
(TestTransientTable.test_auto_transient_table_title): New. Test
for the Title method
(TestTransientTable.test_transient_joined_table)
(TestTransientTable.test_transient_table): Add test for the Title
methods
* test/test_memory_table.py (TestMemoryTable.test_title): New.
Test for the Title method
* test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
the Title method
Revision
994 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu May 22 18:05:16 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 6512 byte(s)
Diff to
previous 984
* Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
for the filename
* test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
for the FileName method
(TestDBFTableWriting.test_write): Fix spelling of filename
Revision
984 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu May 22 16:37:48 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 6297 byte(s)
Diff to
previous 839
Implement a way to discover dependencies between tables and
shapestores.
* Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
(TransientJoinedTable.Dependencies)
(AutoTransientTable.SimpleQuery): New. Implement the dependencies
interface
(TransientJoinedTable.__init__): Keep tack of the original table
objects in addition to the corresponding transient tables.
* Thuban/Model/table.py (DBFTable.Dependencies)
(MemoryTable.Dependencies): New. Implement the dependencies
interface
* Thuban/Model/data.py (ShapeTable): New. Helper class for
ShapefileStore
(ShapefileStore.__init__): Use ShapeTable instead of
AutoTransientTable
(ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
(ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
methods for filename and type
(ShapefileStore.Dependencies): New. Implement the dependencies
interface
(DerivedShapeStore): New class to replace SimpleStore. The main
difference to SimpleStore is that it depends not on a shapefile
but another shapestore which expresses the dependencies a bit
better
(SimpleStore.__init__): Add deprecation warning.
* test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
Test for the Dependencies method.
* test/test_memory_table.py (TestMemoryTable.test_dependencies):
New. Test for the Dependencies method.
* test/test_transientdb.py
(TestTransientTable.test_auto_transient_table_dependencies): New.
Test for the Dependencies method.
(TestTransientTable.test_transient_joined_table): Add test for the
Dependencies method.
* test/test_session.py (TestSessionSimple.setUp)
(TestSessionSimple.tearDown): New. Implement a better way to
destroy the sessions.
(TestSessionSimple.test_initial_state)
(TestSessionSimple.test_add_table): Bind session to self.session
so that it's destroyed by tearDown
(TestSessionSimple.test_open_shapefile): New. Test for
OpenShapefile and the object it returns
Revision
839 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue May 6 15:54:18 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 6077 byte(s)
Diff to
previous 818
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
Revision
818 -
(
view)
(
annotate)
-
[select for diffs]
Added
Mon May 5 17:18:31 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test/test_dbf_table.py
File length: 5705 byte(s)
Convert the table implementations to a new table interface. All
tables use a common mixin class to provide backwards compatibility
until all table users have been updated.
* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
provide backwards compatibility for table classes implementing the
new interface
(DBFTable, MemoryTable): Implement the new table interface. Use
OldTableInterfaceMixin as base for compatibility
(DBFColumn, MemoryColumn): New. Column description for DBFTable
and MemoryTable resp.
* test/test_dbf_table.py: New. Test cases for the DBFTable with
the new table interface.
* test/test_memory_table.py: New. Test cases for the MemoryTable
with the new table interface.
* test/test_table.py: Document the all tests in this file as only
for backwards compatibility. The equivalent tests for the new
interface are in test_memory_table.py and test_dbf_table.py
(MemoryTableTest.test_read): field_info should be returning tuples
with four items
(MemoryTableTest.test_write): Make doc-string a more precise.
* Thuban/Model/transientdb.py (TransientTableBase): Convert to new
table interface. Derive from from OldTableInterfaceMixin for
compatibility.
(TransientTableBase.create): New intance variable column_map to
map from names and indices to column objects
(TransientTable.create): Use the new table interface of the input
table
(AutoTransientTable): Convert to new table interface. Derive from
from OldTableInterfaceMixin for compatibility.
(AutoTransientTable.write_record): Removed. It's not implemented
yet and we still have to decide how to handle writing with the new
table and data framework.
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Use the new
table interface
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.