Skip to content

pyflightstream.workspace.selections (provisional)

Generated from the docstrings at build time: every one of the 4 names in the __all__ of pyflightstream.workspace.selections has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

The entity selections of an input artifact, and the refusal of an empty one.

PFS-2005.02. A key whose list selects the entities a command applies to (a setup's boundary and family lists, an alias of its [aliases] table, a pproc's groups and the families of its plot groups and section distributions) looks like stating no preference when handed an empty list, and it is not: the command it feeds is either not emitted, which is the solver's own default and is asked for by dropping the key, or emitted naming nothing, and either way the run proceeds against a setup nobody selected. :data:ENTITY_SELECTIONS holds one :class:EntitySelection per key with the domain seat's verdict on an empty list (admitted, refused, or not yet decided and so refused) and its reason, and :func:refuse_empty_selections applies it to a setup or a pproc artifact before its model validates.

Every public name is re-exported, unchanged, by :mod:pyflightstream.workspace.inputs, its path (AD-11).

Advanced

pyflightstream.workspace.selections.ALIASES_TABLE module-attribute

ALIASES_TABLE = 'aliases'

pyflightstream.workspace.selections.ENTITY_SELECTIONS module-attribute

ENTITY_SELECTIONS: tuple[EntitySelection, ...] = (
    EntitySelection(
        "setup",
        "viscous_excluded",
        "DELETE_VISCOUS_EXCLUDED_BOUNDARIES",
        True,
        "An empty selection emits the clearing command (FSM-26.120 p.341).",
    ),
    EntitySelection(
        "setup",
        "valarezo_separation_boundaries",
        "DELETE_VALAREZO_SEPARATION_BOUNDARIES",
        True,
        "An empty selection requests the dedicated clearing command (RPT-018); the build's command evidence still governs its availability.",
    ),
    EntitySelection(
        "setup",
        "crossflow_separation_boundaries",
        "DELETE_CROSSFLOW_SEPARATION_BOUNDARIES",
        True,
        "An empty selection emits the clearing command (FSM-26.100 p.340).",
    ),
    EntitySelection(
        "setup",
        "axial_separation_families",
        "SET_AXIAL_SEPARATION_BOUNDARIES",
        False,
        "This family selector must resolve to at least one boundary; it does not request the separate clearing command.",
    ),
    EntitySelection(
        "setup",
        "disabled_wake_trailing_edges",
        "DISABLE_WAKE_NODES_ON_TRAILING_EDGE",
        None,
        "No empty-list clearing form is established for this sequence of edge selections.",
    ),
    EntitySelection(
        "setup",
        "leading_edge_wake_boundaries",
        "DETECT_LEADING_EDGES_WAKES_BY_SURFACE",
        None,
        "No empty boundary selection is established for this detection request.",
    ),
    EntitySelection(
        "setup",
        "delete_inlets",
        "DELETE_INLET",
        None,
        "No empty-list meaning is established for this sequence of inlet deletions.",
    ),
    EntitySelection(
        "setup",
        "delete_outlets",
        "DELETE_OUTLET",
        None,
        "No empty-list meaning is established for this sequence of outlet deletions.",
    ),
    EntitySelection(
        "setup",
        "proximal_boundaries",
        "SOLVER_PROXIMAL_BOUNDARIES",
        None,
        "The all-boundaries form is the explicit all token on supported builds, not an established empty-list clearing form.",
    ),
    EntitySelection(
        "setup",
        "delete_transition_trips",
        "DELETE_TRANSITION_TRIP",
        None,
        "No empty-list meaning is established for this sequence of trip deletions.",
    ),
    EntitySelection(
        "setup",
        "delete_surfaces",
        "DELETE_SURFACES",
        None,
        "No empty-list meaning is established for this sequence of named surface deletions.",
    ),
    EntitySelection(
        "setup",
        "vorticity_drag_boundaries",
        "SET_VORTICITY_DRAG_BOUNDARIES",
        False,
        _VORTICITY_EMPTY,
    ),
    EntitySelection(
        "setup",
        "set_vorticity_drag_boundaries",
        "SET_VORTICITY_DRAG_BOUNDARIES",
        False,
        _VORTICITY_EMPTY,
    ),
    EntitySelection(
        "setup",
        "vorticity_drag_families",
        "SET_VORTICITY_DRAG_BOUNDARIES",
        False,
        _VORTICITY_EMPTY,
    ),
    EntitySelection(
        "setup",
        "analysis_families",
        "SET_SOLVER_ANALYSIS_BOUNDARIES",
        False,
        _ANALYSIS_EMPTY,
    ),
    EntitySelection(
        "setup",
        "set_solver_analysis_boundaries",
        "SET_SOLVER_ANALYSIS_BOUNDARIES",
        False,
        _ANALYSIS_EMPTY,
    ),
    EntitySelection(
        "setup",
        "aliases.<name>",
        "every boundary-citing key of a row naming this preset",
        False,
        "An alias stands for the boundary names or families listed after it, and over none it would name nothing while reading as though it named a set; the empty list that means every family is the pproc group's, one line below.",
    ),
    EntitySelection(
        "pproc",
        "groups.<name>",
        "the polar table written per group (products.polars)",
        True,
        "An empty group is every family the geometry carries: the polar table sums every surface row of the loads table, and a motion naming the group moves every boundary of the file.",
    ),
    EntitySelection(
        "pproc",
        "plots.groups[].families",
        "UNSTEADY_SOLVER_NEW_FORCE_PLOT",
        False,
        "The entry exists to emit one plot per parameter over the families it names; over none it would emit nothing while reading as though it had. A family the geometry does not carry is left out at emission, which is the documented way an entry resolves to fewer families than it names.",
    ),
    EntitySelection(
        "pproc",
        "sections.distributions[].families",
        "NEW_SURFACE_SECTION_DISTRIBUTION",
        False,
        "The entry exists to emit one distribution per plane over the families it names; over none it would emit nothing while reading as though it had. A family the geometry does not carry is left out at emission, which is the documented way an entry resolves to fewer families than it names.",
    ),
)

pyflightstream.workspace.selections.EntitySelection dataclass

EntitySelection(
    kind: str,
    key: str,
    consumer: str,
    empty_admitted: bool | None,
    reason: str,
)

One artifact key whose list selects the entities a command applies to.

PFS-2005.02. Handing such a key an empty list looks like stating no preference, and it is not: the command the list feeds is either not emitted at all, which is the solver's own default and is asked for by dropping the key, or emitted naming nothing, and either way the run proceeds against a setup nobody selected and still reports numbers. Whether an empty list can mean anything is decided one key at a time, by the domain seat, and the decision is written beside the key so the refusal can say whose it is.

Attributes:

Name Type Description
kind str

The artifact kind the key lives in, setup or pproc.

key str

The key as the file spells it; a placeholder marks a table whose every entry is a selection (groups.<name>) or a list of tables (plots.groups[].families).

consumer str

What the list feeds: the FlightStream command, or the product this package writes from it.

empty_admitted bool or None

True where an empty list has a documented meaning and is accepted, False where it is refused on the manual's word, and None where the domain seat has not yet decided, in which case it is refused until the owning seat rules.

reason str

The sentence the refusal prints beside the verdict: what the manual says, or that nothing does yet.

pyflightstream.workspace.selections.refuse_empty_selections

refuse_empty_selections(
    kind: str,
    path: Path,
    data: Mapping[str, Any],
    *,
    rules: Sequence[EntitySelection] = ENTITY_SELECTIONS,
) -> None

Refuse an artifact stating an empty list for an entity-selecting key.

PFS-2005.02. Called by the readers before the model validates, so the refusal names the artifact FILE, the key as the file spells it, and what the empty list would have disabled, with the domain seat's verdict beside it. The model's own validators stay: they guard the Python path, and this guards the file a matrix row names.

Parameters:

Name Type Description Default
kind str

setup or pproc.

required
path Path

The artifact file, for the message.

required
data mapping

The file's TOML table as loaded.

required
rules sequence of EntitySelection, keyword-only

The verdicts the plain keys are judged by, :data:ENTITY_SELECTIONS by default; the table-shaped keys keep their own entries.

ENTITY_SELECTIONS

Raises:

Type Description
InputArtifactError

The first key stated empty whose verdict is not "admitted".