You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the Plot attribute is set up. How can we reuse specifications?
Plot: Optional[List[Visualizations]]
I think we'll have to change the Visaulizations dataclass. Maybe we make more lists?
Right now we have:
class Visualizations(ytBaseModel):
"""
This class organizes the attributes below so users
can select the plot by name,
and see the correct arguments as suggestions
"""
SlicePlot: Optional[SlicePlot]
ProjectionPlot: Optional[ProjectionPlot]
PhasePlot: Optional[PhasePlot]
I think your suggestion of putting the *Plots into lists would work. If we do that, how do you feel about renaming the Visualizations attributes to be plural? i.e.,:
classVisualizations(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:
The text was updated successfully, but these errors were encountered: