Open samwalkow opened 2 years ago
I think your suggestion of putting the *Plot
s into lists would work. If we do that, how do you feel about renaming the Visualizations
attributes to be plural? i.e.,:
class Visualizations(ytBaseModel):
"""
This class organizes the attributes below so users
can select the plot by name,
and see the correct arguments as suggestions
"""
SlicePlots: Optional[List[SlicePlot]]
ProjectionPlots: Optional[List[ProjectionPlot]]
PhasePlots: Optional[List[PhasePlot]]
IMO it's a nice way to grammatically signal that you can put multiples of any of them.
The new Visualizations
runner in _model_instantiation
would need some minor tweaking to account for the lists. See here:
Description
Once you pick a visualization, that option disappears. What if you want to create a list of two projection plots? That's not possible right now.
What I Did
In the
schema_model.py
file, this is how thePlot
attribute is set up. How can we reuse specifications?I think we'll have to change the
Visaulizations
dataclass. Maybe we make more lists?Right now we have:
Should it be: