1717
1818
1919_indices = TupleEntry (inner_from_toml = lprs .slice_or_int_parser )
20+ _plots = TupleEntry .wrapping (
21+ TupleEntry .wrapping (TupleEntry (str ), str_sep = "." ), str_sep = "-" )
2022
2123HOME_DIR = Path .home ()
2224CONFIG_DIR = HOME_DIR / '.config' / 'stagpy'
@@ -87,9 +89,8 @@ class Scaling(Section):
8789class Field (Section ):
8890 """Options of the field command."""
8991
90- plot : str = entry (
91- val = 'T,stream' , cli_short = 'o' ,
92- cli_kwargs = {'nargs' : '?' , 'const' : '' , 'type' : str },
92+ plot : Sequence [Sequence [Sequence [str ]]] = _plots .entry (
93+ default = 'T,stream' , cli_short = 'o' ,
9394 doc = "variables to plot (see stagpy var)" )
9495 perturbation : bool = switch_opt (
9596 False , None , "plot departure from average profile" )
@@ -120,9 +121,8 @@ class Field(Section):
120121class Rprof (Section ):
121122 """Options of the rprof command."""
122123
123- plot : str = entry (
124- val = "Tmean" , cli_short = 'o' ,
125- cli_kwargs = {'nargs' : '?' , 'const' : '' },
124+ plot : Sequence [Sequence [Sequence [str ]]] = _plots .entry (
125+ default = "Tmean" , cli_short = 'o' ,
126126 doc = "variables to plot (see stagpy var)" )
127127 style : str = entry (val = '-' , doc = "matplotlib line style" )
128128 average : bool = switch_opt (False , 'a' , 'plot temporal average' )
@@ -134,9 +134,8 @@ class Rprof(Section):
134134class Time (Section ):
135135 """Options of the time command."""
136136
137- plot : str = entry (
138- val = "Nutop,ebalance,Nubot.Tmean" , cli_short = 'o' ,
139- cli_kwargs = {'nargs' : '?' , 'const' : '' },
137+ plot : Sequence [Sequence [Sequence [str ]]] = _plots .entry (
138+ default = "Nutop,ebalance,Nubot.Tmean" , cli_short = 'o' ,
140139 doc = "variables to plot (see stagpy var)" )
141140 style : str = entry (val = '-' , doc = "matplotlib line style" )
142141 compstat : Sequence [str ] = TupleEntry (str ).entry (
@@ -159,19 +158,17 @@ class Time(Section):
159158class Refstate (Section ):
160159 """Options of the refstate command."""
161160
162- plot : str = entry (
163- val = 'T' , cli_short = 'o' , cli_kwargs = {'nargs' : '?' , 'const' : '' },
164- doc = "variables to plot (see stagpy var)" )
161+ plot : Sequence [str ] = TupleEntry (str ).entry (
162+ default = 'T' , cli_short = 'o' , doc = "variables to plot (see stagpy var)" )
165163 style : str = entry (val = '-' , doc = "matplotlib line style" )
166164
167165
168166@dataclass
169167class Plates (Section ):
170168 """Options of the plates command."""
171169
172- plot : str = entry (
173- val = 'c.T.v2-v2.dv2-v2.topo_top' , cli_short = 'o' ,
174- cli_kwargs = {'nargs' : '?' , 'const' : '' },
170+ plot : Sequence [Sequence [Sequence [str ]]] = _plots .entry (
171+ default = 'c.T.v2-v2.dv2-v2.topo_top' , cli_short = 'o' ,
175172 doc = "variables to plot, can be a surface field, field, or dv2" )
176173 field : str = entry (val = 'eta' , doc = "field to plot with plates info" )
177174 stress : bool = switch_opt (
@@ -192,8 +189,9 @@ class Plates(Section):
192189class Info (Section ):
193190 """Options of the info command."""
194191
195- output : str = entry (val = 't,Tmean,vrms,Nutop,Nubot' , cli_short = 'o' ,
196- doc = "time series to print" )
192+ output : Sequence [str ] = TupleEntry (str ).entry (
193+ default = 't,Tmean,vrms,Nutop,Nubot' , cli_short = 'o' ,
194+ doc = "time series to print" )
197195
198196
199197@dataclass
0 commit comments