Refactor Model <---> View-model contract #97
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a major refactor and API change of the lower-level entities. It does not break any high-level APIs. The user code that I know of will not need any changes to account for this.
Description
Line
andImage
and in general ourArtist
model to an opaque callable that returns data instead of to aBlueskyRun
.Axes
. Instead of keeping separate listsaxes.lines
andaxes.images
, as well as a view of their union,artists
, just keep one heterogeneous list ofartists
and let the Views sort out what is what based on type. We were already relying on types in various places in the Views. It was not immediately clear to me that this "simplification" was a good one, but I am convinced by the result that it is.FigureSpec
->Figure
,AxesSpec
->Axes
, etc. in response to considered feedback. See commit message for details.Motivation and Context
BlueskyRun
. It may represent data aggregated from multipleBlueskyRun
s. Or, perhaps in the future, from something that isn't aBlueskyRun
at all.How Has This Been Tested?