init
constraints ¶
This module contains common constraints that may be needed when modeling pipelines.
__all__ = ['is_unique_in_prior_tasks'] module-attribute ¶
is_unique_in_prior_tasks(vs: Mapping[str, CoSyLuigiTask], required_to_be_unique: type[CoSyLuigiTask] | Sequence[type[CoSyLuigiTask]]) -> bool ¶
Wrapper around _is_unique_in_prior_tasks that allows passing either a single type of a CoSyLuigiTask or a Sequence of CoSyLuigiTasks' types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vs | Mapping[str, CoSyLuigiTask] | The variables passed to the function by CoSy during synthesis. Populated by the partial pipelines beginning at current tasks required tasks. | required |
required_to_be_unique | type[CoSyLuigiTask] | Sequence[type[CoSyLuigiTask]] | The CoSyLuigiTask's type or types that are intended to be unique. | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if all types contained in required_to_be_unique are unique, False otherwise. |