Skip to content

Deprecate ShapeIndex in favor of Model#209

Merged
mtdowling merged 1 commit intomasterfrom
deprecate-shape-index
Nov 26, 2019
Merged

Deprecate ShapeIndex in favor of Model#209
mtdowling merged 1 commit intomasterfrom
deprecate-shape-index

Conversation

@mtdowling
Copy link
Copy Markdown
Member

ShapeIndex is not adding any value as a separate abstraction from
Model. Separating ShapeIndex from Model made building models much more
verbose, interacting with shapes in a model more verbose, updating
models verbose, and caused an awkward API if you need to access things
like knowledge indexes but only have access to a ShapeIndex (knowledge
indexes are only on models).

This commit first deprecates all ShapeIndex APIs and provides
alternatives that are to be used instead. In some cases, the
alternative, Model based APIs, still call into the deprecated ShapeIndex
APIs. This is because a Model always has a ShapeIndex but a ShapeIndex
is not a model, and it cuts down on code duplication. In the next
version bump (likely 0.10.0), we will remove the ShapeIndex APIs
altogether.

Issue #, if available:

Description of changes:

Addresses #208

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling force-pushed the deprecate-shape-index branch from 9481be1 to 767e9f0 Compare November 25, 2019 18:33
@mtdowling mtdowling requested a review from kstich November 25, 2019 18:33
Model. Separating ShapeIndex from Model made building models much more
verbose, interacting with shapes in a model more verbose, updating
models verbose, and caused an awkward API if you need to access things
like knowledge indexes but only have access to a ShapeIndex (knowledge
indexes are only on models).

This commit first deprecates all ShapeIndex APIs and provides
alternatives that are to be used instead. In some cases, the
alternative, Model based APIs, still call into the deprecated ShapeIndex
APIs. This is because a Model always has a ShapeIndex but a ShapeIndex
is not a model, and it cuts down on code duplication. In the next
version bump (likely 0.10.0), we will remove the ShapeIndex APIs
altogether.
@mtdowling mtdowling force-pushed the deprecate-shape-index branch from 767e9f0 to 9d9831a Compare November 25, 2019 18:50
@mtdowling mtdowling merged commit 3829739 into master Nov 26, 2019
@mtdowling mtdowling deleted the deprecate-shape-index branch December 10, 2019 20:45
@trivikr trivikr mentioned this pull request Dec 27, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants