gui.model.unit_names

gui.model.unit_names(spec)

The names of the units, sorted: what the unit pickers offer.

Parameters

Name Type Description Default
spec RegenSpec The loaded spec. required

Returns

Name Type Description
list[str] list[str]: Dotted module names.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen import load_spec, make_sample_repo
from spotregen.gui.model import unit_names

with TemporaryDirectory() as tmp:
    print(unit_names(load_spec(make_sample_repo(Path(tmp) / "demo"))))
['samplepkg.core.calc']