enthought / enthought/chaco

AbstractDataSource subclasses don't adhere to interface

Open
#247 0 comments 0 reactions 0 assignees View on GitHub
type: backwards incompatible type: bug
Dominant language
Python
Stars
305
Forks
97
PR merge metrics
No merged PRs in 30d

Description

In working through #244 a number of inconsistencies are apparent between different subclasses of the base `AbstractDataSource` class. Most noticeable are:
- the `index_dimension` and `value_dimension` are not provided by all subclasses, and even then are not used consistently. `ImageData` lacks them and uses a single `dimension` trait instead, and `MultiArrayDataSource` instead uses them to indicate whether the data is row or column based.
- the `get_data` methods do not have a consistent signature. The correct approach here is to perhaps have some further specialization of abstract data source subclasses.
- the behaviour of bounds with respect to `nan` values is inconsistent.
- some methods (particularly mask methods) are not implemented by all classes. These methods should probably assume an appropriate mask of all `True` values.

The end result of this is that it is very unclear how to define an abstract data source subclass for something like a Pandas dataframe that can be used interchangeably with the standard array-based data sources.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.